From d9507dc5aa11e3b32163ed9073d2f9a23abd37c1 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 14 Mar 2024 03:38:03 +0000 Subject: [PATCH] [Automation] Generate Fluent Lite from security#package-composite-v3 --- .../CHANGELOG.md | 471 +- .../azure-resourcemanager-security/README.md | 8 +- .../azure-resourcemanager-security/SAMPLE.md | 6365 ++++++++++------- .../azure-resourcemanager-security/pom.xml | 3 +- .../security/SecurityManager.java | 1299 ++-- .../AdaptiveApplicationControlsClient.java | 48 +- .../AdaptiveNetworkHardeningsClient.java | 103 +- .../AdvancedThreatProtectionsClient.java | 20 +- .../security/fluent/AlertsClient.java | 204 +- .../fluent/AlertsSuppressionRulesClient.java | 32 +- .../fluent/AllowedConnectionsClient.java | 48 +- .../ApiCollectionOffboardingsClient.java | 50 - .../ApiCollectionOnboardingsClient.java | 52 - .../security/fluent/ApiCollectionsClient.java | 265 +- .../fluent/ApplicationOperationsClient.java | 20 +- .../security/fluent/ApplicationsClient.java | 16 +- .../security/fluent/AssessmentsClient.java | 44 +- .../fluent/AssessmentsMetadatasClient.java | 48 +- .../AutoProvisioningSettingsClient.java | 20 +- .../security/fluent/AutomationsClient.java | 97 +- .../fluent/AzureDevOpsOrgsClient.java | 237 + .../fluent/AzureDevOpsProjectsClient.java | 225 + .../fluent/AzureDevOpsReposClient.java | 239 + .../fluent/ComplianceResultsClient.java | 16 +- .../security/fluent/CompliancesClient.java | 20 +- .../security/fluent/ConnectorsClient.java | 28 +- .../CustomAssessmentAutomationsClient.java | 96 +- .../CustomEntityStoreAssignmentsClient.java | 104 +- .../fluent/DefenderForStoragesClient.java | 76 + .../fluent/DevOpsConfigurationsClient.java | 253 + .../fluent/DevOpsOperationResultsClient.java | 46 + .../fluent/DeviceSecurityGroupsClient.java | 47 +- .../DiscoveredSecuritySolutionsClient.java | 48 +- .../ExternalSecuritySolutionsClient.java | 52 +- .../security/fluent/GitHubOwnersClient.java | 103 + .../security/fluent/GitHubReposClient.java | 80 + .../security/fluent/GitLabGroupsClient.java | 103 + .../security/fluent/GitLabProjectsClient.java | 82 + .../fluent/GitLabSubgroupsClient.java | 46 + .../fluent/GovernanceAssignmentsClient.java | 76 +- .../fluent/GovernanceRulesClient.java | 144 +- .../security/fluent/HealthReportsClient.java | 36 +- .../InformationProtectionPoliciesClient.java | 41 +- .../fluent/IngestionSettingsClient.java | 169 - .../IotSecuritySolutionAnalyticsClient.java | 28 +- ...utionsAnalyticsAggregatedAlertsClient.java | 36 +- ...lutionsAnalyticsRecommendationsClient.java | 36 +- .../fluent/IotSecuritySolutionsClient.java | 78 +- .../JitNetworkAccessPoliciesClient.java | 130 +- .../security/fluent/LocationsClient.java | 16 +- .../security/fluent/MdeOnboardingsClient.java | 16 +- .../security/fluent/OperationsClient.java | 16 +- .../security/fluent/PricingsClient.java | 132 +- ...RegulatoryComplianceAssessmentsClient.java | 36 +- .../RegulatoryComplianceControlsClient.java | 24 +- .../RegulatoryComplianceStandardsClient.java | 16 +- .../fluent/ResourceProvidersClient.java | 65 + .../SecureScoreControlDefinitionsClient.java | 12 +- .../fluent/SecureScoreControlsClient.java | 28 +- .../security/fluent/SecureScoresClient.java | 18 +- .../security/fluent/SecurityCenter.java | 570 +- ...yConnectorApplicationOperationsClient.java | 44 +- .../SecurityConnectorApplicationsClient.java | 16 +- .../fluent/SecurityConnectorsClient.java | 74 +- .../fluent/SecurityContactsClient.java | 37 +- .../fluent/SecurityOperatorsClient.java | 24 +- .../fluent/SecuritySolutionsClient.java | 24 +- ...SecuritySolutionsReferenceDatasClient.java | 16 +- ...nt.java => SensitivitySettingsClient.java} | 29 +- .../ServerVulnerabilityAssessmentsClient.java | 84 +- ...ulnerabilityAssessmentsSettingsClient.java | 124 + .../security/fluent/SettingsClient.java | 27 +- .../fluent/SoftwareInventoriesClient.java | 55 +- ...rabilityAssessmentBaselineRulesClient.java | 28 +- ...nerabilityAssessmentScanResultsClient.java | 12 +- ...SqlVulnerabilityAssessmentScansClient.java | 12 +- .../security/fluent/SubAssessmentsClient.java | 44 +- .../security/fluent/TasksClient.java | 100 +- .../security/fluent/TopologiesClient.java | 44 +- .../fluent/WorkspaceSettingsClient.java | 32 +- .../AdaptiveApplicationControlGroupData.java | 34 +- .../AdaptiveApplicationControlGroupInner.java | 44 +- ...AdaptiveApplicationControlGroupsInner.java | 10 +- .../models/AdaptiveNetworkHardeningInner.java | 28 +- .../AdaptiveNetworkHardeningProperties.java | 26 +- .../AdvancedThreatProtectionProperties.java | 14 +- .../AdvancedThreatProtectionSettingInner.java | 16 +- .../security/fluent/models/AlertInner.java | 70 +- .../fluent/models/AlertProperties.java | 68 +- .../models/AlertSyncSettingProperties.java | 14 +- .../models/AlertsSuppressionRuleInner.java | 42 +- .../AlertsSuppressionRuleProperties.java | 61 +- .../AllowedConnectionsResourceInner.java | 18 +- .../AllowedConnectionsResourceProperties.java | 14 +- .../fluent/models/ApiCollectionInner.java | 145 + .../models/ApiCollectionProperties.java | 179 +- .../models/ApiCollectionResponseInner.java | 90 - .../fluent/models/ApplicationInner.java | 28 +- .../fluent/models/ApplicationProperties.java | 38 +- .../fluent/models/AscLocationInner.java | 14 +- .../models/AutoProvisioningSettingInner.java | 16 +- .../AutoProvisioningSettingProperties.java | 20 +- .../fluent/models/AutomationInner.java | 48 +- .../fluent/models/AutomationProperties.java | 34 +- .../AutomationValidationStatusInner.java | 18 +- .../fluent/models/AzureDevOpsOrgInner.java | 75 + .../AzureDevOpsOrgListResponseInner.java | 84 + .../models/AzureDevOpsProjectInner.java | 75 + .../models/AzureDevOpsRepositoryInner.java | 75 + .../fluent/models/ComplianceInner.java | 22 +- .../fluent/models/ComplianceProperties.java | 16 +- .../fluent/models/ComplianceResultInner.java | 14 +- .../models/ComplianceResultProperties.java | 12 +- .../fluent/models/ConnectionStringsInner.java | 62 - .../fluent/models/ConnectorSettingInner.java | 20 +- .../models/ConnectorSettingProperties.java | 18 +- .../CustomAssessmentAutomationInner.java | 48 +- .../CustomAssessmentAutomationProperties.java | 44 +- ...AssessmentAutomationRequestProperties.java | 34 +- .../CustomEntityStoreAssignmentInner.java | 22 +- ...CustomEntityStoreAssignmentProperties.java | 18 +- ...ntityStoreAssignmentRequestProperties.java | 22 +- .../models/DataExportSettingProperties.java | 14 +- .../DefenderForStorageSettingInner.java | 220 + .../DefenderForStorageSettingProperties.java | 237 + .../models/DevOpsConfigurationInner.java | 75 + .../models/DeviceSecurityGroupInner.java | 28 +- .../models/DeviceSecurityGroupProperties.java | 26 +- .../DiscoveredSecuritySolutionInner.java | 36 +- .../DiscoveredSecuritySolutionProperties.java | 50 +- .../models/ExternalSecuritySolutionInner.java | 11 +- ...tSensitivitySettingsListResponseInner.java | 58 + .../GetSensitivitySettingsResponseInner.java | 59 + .../fluent/models/GitHubOwnerInner.java | 75 + .../models/GitHubOwnerListResponseInner.java | 84 + .../fluent/models/GitHubRepositoryInner.java | 75 + .../fluent/models/GitLabGroupInner.java | 75 + .../models/GitLabGroupListResponseInner.java | 84 + .../fluent/models/GitLabProjectInner.java | 75 + .../models/GovernanceAssignmentInner.java | 48 +- .../GovernanceAssignmentProperties.java | 54 +- .../fluent/models/GovernanceRuleInner.java | 80 +- .../models/GovernanceRuleProperties.java | 108 +- .../fluent/models/HealthReportInner.java | 70 +- .../fluent/models/HealthReportProperties.java | 80 +- .../InformationProtectionPolicyInner.java | 24 +- ...InformationProtectionPolicyProperties.java | 48 +- .../fluent/models/IngestionSettingInner.java | 51 - .../models/IngestionSettingTokenInner.java | 40 - .../IoTSecurityAggregatedAlertInner.java | 42 +- .../IoTSecurityAggregatedAlertProperties.java | 36 +- ...SecurityAggregatedRecommendationInner.java | 38 +- ...ityAggregatedRecommendationProperties.java | 32 +- ...oTSecuritySolutionAnalyticsModelInner.java | 40 +- ...curitySolutionAnalyticsModelListInner.java | 22 +- ...uritySolutionAnalyticsModelProperties.java | 36 +- .../models/IoTSecuritySolutionModelInner.java | 82 +- .../models/IoTSecuritySolutionProperties.java | 82 +- .../models/JitNetworkAccessPolicyInner.java | 34 +- .../JitNetworkAccessPolicyProperties.java | 30 +- .../models/JitNetworkAccessRequestInner.java | 48 +- .../models/MalwareScanningProperties.java | 141 + .../fluent/models/MdeOnboardingDataInner.java | 26 +- .../models/MdeOnboardingDataListInner.java | 14 +- .../models/MdeOnboardingDataProperties.java | 18 +- .../fluent/models/OnUploadProperties.java | 80 + .../fluent/models/OperationInner.java | 18 +- .../OperationResultAutoGeneratedInner.java | 12 +- .../models/OperationStatusResultInner.java | 249 + .../security/fluent/models/PricingInner.java | 140 +- .../fluent/models/PricingListInner.java | 19 +- .../fluent/models/PricingProperties.java | 197 +- .../RegulatoryComplianceAssessmentInner.java | 30 +- ...ulatoryComplianceAssessmentProperties.java | 28 +- .../RegulatoryComplianceControlInner.java | 24 +- ...RegulatoryComplianceControlProperties.java | 22 +- .../RegulatoryComplianceStandardInner.java | 24 +- ...egulatoryComplianceStandardProperties.java | 22 +- .../fluent/models/RuleResultsInner.java | 14 +- .../fluent/models/RulesResultsInner.java | 14 +- .../security/fluent/models/ScanInner.java | 14 +- .../fluent/models/ScanResultInner.java | 14 +- .../fluent/models/ScanResultsInner.java | 14 +- .../security/fluent/models/ScansInner.java | 14 +- .../security/fluent/models/ScoreDetails.java | 16 +- ...SecureScoreControlDefinitionItemInner.java | 22 +- ...eScoreControlDefinitionItemProperties.java | 20 +- .../SecureScoreControlDetailsInner.java | 32 +- .../SecureScoreControlScoreDetailsInner.java | 32 +- .../fluent/models/SecureScoreItemInner.java | 22 +- .../models/SecureScoreItemProperties.java | 22 +- .../SecurityAssessmentMetadataProperties.java | 74 +- ...yAssessmentMetadataPropertiesResponse.java | 82 +- ...curityAssessmentMetadataResponseInner.java | 78 +- .../models/SecurityAssessmentProperties.java | 36 +- .../SecurityAssessmentPropertiesResponse.java | 36 +- .../SecurityAssessmentResponseInner.java | 36 +- .../fluent/models/SecurityConnectorInner.java | 40 +- .../models/SecurityConnectorProperties.java | 28 +- .../fluent/models/SecurityContactInner.java | 74 +- .../models/SecurityContactProperties.java | 86 +- .../fluent/models/SecurityOperatorInner.java | 14 +- .../models/SecurityOperatorListInner.java | 19 +- .../fluent/models/SecuritySolutionInner.java | 30 +- .../models/SecuritySolutionProperties.java | 50 +- ...curitySolutionsReferenceDataListInner.java | 14 +- ...uritySolutionsReferenceDataProperties.java | 81 +- .../models/SecuritySubAssessmentInner.java | 38 +- .../SecuritySubAssessmentProperties.java | 36 +- .../fluent/models/SecurityTaskInner.java | 24 +- .../fluent/models/SecurityTaskProperties.java | 22 +- .../SensitiveDataDiscoveryProperties.java | 74 + .../ServerVulnerabilityAssessmentInner.java | 14 +- ...rverVulnerabilityAssessmentProperties.java | 12 +- ...lityAssessmentsAzureSettingProperties.java | 66 + ...rverVulnerabilityAssessmentsListInner.java | 14 +- ...rVulnerabilityAssessmentsSettingInner.java | 56 + .../security/fluent/models/SettingInner.java | 13 +- .../security/fluent/models/SoftwareInner.java | 53 +- .../fluent/models/SoftwareProperties.java | 46 +- .../fluent/models/TopologyResourceInner.java | 18 +- .../models/TopologyResourceProperties.java | 14 +- .../UpdateIoTSecuritySolutionProperties.java | 26 +- .../fluent/models/WorkspaceSettingInner.java | 28 +- .../models/WorkspaceSettingProperties.java | 38 +- .../security/fluent/models/package-info.java | 4 +- .../security/fluent/package-info.java | 4 +- .../AdaptiveApplicationControlGroupImpl.java | 65 +- .../AdaptiveApplicationControlGroupsImpl.java | 12 +- ...AdaptiveApplicationControlsClientImpl.java | 415 +- .../AdaptiveApplicationControlsImpl.java | 105 +- .../AdaptiveNetworkHardeningImpl.java | 4 +- .../AdaptiveNetworkHardeningsClientImpl.java | 743 +- .../AdaptiveNetworkHardeningsImpl.java | 114 +- .../AdvancedThreatProtectionSettingImpl.java | 35 +- .../AdvancedThreatProtectionsClientImpl.java | 161 +- .../AdvancedThreatProtectionsImpl.java | 40 +- .../implementation/AlertsClientImpl.java | 2012 ++---- .../security/implementation/AlertsImpl.java | 115 +- .../AlertsSuppressionRuleImpl.java | 4 +- .../AlertsSuppressionRulesClientImpl.java | 469 +- .../AlertsSuppressionRulesImpl.java | 38 +- .../AllowedConnectionsClientImpl.java | 511 +- .../AllowedConnectionsImpl.java | 37 +- .../AllowedConnectionsResourceImpl.java | 3 +- .../implementation/ApiCollectionImpl.java | 81 + .../ApiCollectionOffboardingsClientImpl.java | 248 - .../ApiCollectionOffboardingsImpl.java | 43 - .../ApiCollectionOnboardingsClientImpl.java | 252 - .../ApiCollectionOnboardingsImpl.java | 60 - .../ApiCollectionResponseImpl.java | 55 - .../ApiCollectionsClientImpl.java | 1409 +++- .../implementation/ApiCollectionsImpl.java | 97 +- .../implementation/ApplicationImpl.java | 50 +- .../ApplicationOperationsClientImpl.java | 239 +- .../ApplicationOperationsImpl.java | 41 +- .../ApplicationsClientImpl.java | 195 +- .../implementation/ApplicationsImpl.java | 8 +- .../implementation/AssessmentsClientImpl.java | 360 +- .../implementation/AssessmentsImpl.java | 119 +- .../AssessmentsMetadatasClientImpl.java | 677 +- .../AssessmentsMetadatasImpl.java | 82 +- .../AutoProvisioningSettingImpl.java | 36 +- .../AutoProvisioningSettingsClientImpl.java | 322 +- .../AutoProvisioningSettingsImpl.java | 35 +- .../implementation/AutomationImpl.java | 119 +- .../AutomationValidationStatusImpl.java | 3 +- .../implementation/AutomationsClientImpl.java | 941 ++- .../implementation/AutomationsImpl.java | 118 +- .../implementation/AzureDevOpsOrgImpl.java | 121 + .../AzureDevOpsOrgListResponseImpl.java | 47 + .../AzureDevOpsOrgsClientImpl.java | 1105 +++ .../implementation/AzureDevOpsOrgsImpl.java | 135 + .../AzureDevOpsProjectImpl.java | 127 + .../AzureDevOpsProjectsClientImpl.java | 1049 +++ .../AzureDevOpsProjectsImpl.java | 127 + .../AzureDevOpsReposClientImpl.java | 1117 +++ .../implementation/AzureDevOpsReposImpl.java | 138 + .../AzureDevOpsRepositoryImpl.java | 133 + .../implementation/ComplianceResultImpl.java | 4 +- .../ComplianceResultsClientImpl.java | 219 +- .../implementation/ComplianceResultsImpl.java | 17 +- .../implementation/CompliancesClientImpl.java | 219 +- .../implementation/CompliancesImpl.java | 13 +- .../implementation/ConnectionStringsImpl.java | 40 - .../implementation/ConnectorSettingImpl.java | 46 +- .../implementation/ConnectorsClientImpl.java | 404 +- .../implementation/ConnectorsImpl.java | 45 +- .../CustomAssessmentAutomationImpl.java | 42 +- ...CustomAssessmentAutomationsClientImpl.java | 869 +-- .../CustomAssessmentAutomationsImpl.java | 141 +- .../CustomEntityStoreAssignmentImpl.java | 46 +- ...ustomEntityStoreAssignmentsClientImpl.java | 868 +-- .../CustomEntityStoreAssignmentsImpl.java | 141 +- .../DefenderForStorageSettingImpl.java | 149 + .../DefenderForStoragesClientImpl.java | 323 + .../DefenderForStoragesImpl.java | 96 + .../DevOpsConfigurationImpl.java | 50 + .../DevOpsConfigurationsClientImpl.java | 1152 +++ .../DevOpsConfigurationsImpl.java | 123 + .../DevOpsOperationResultsClientImpl.java | 210 + .../DevOpsOperationResultsImpl.java | 58 + .../DeviceSecurityGroupImpl.java | 71 +- .../DeviceSecurityGroupsClientImpl.java | 398 +- .../DeviceSecurityGroupsImpl.java | 153 +- .../DiscoveredSecuritySolutionImpl.java | 3 +- ...DiscoveredSecuritySolutionsClientImpl.java | 515 +- .../DiscoveredSecuritySolutionsImpl.java | 42 +- .../ExternalSecuritySolutionImpl.java | 4 +- .../ExternalSecuritySolutionsClientImpl.java | 511 +- .../ExternalSecuritySolutionsImpl.java | 38 +- ...etSensitivitySettingsListResponseImpl.java | 44 + .../GetSensitivitySettingsResponseImpl.java | 45 + .../implementation/GitHubOwnerImpl.java | 49 + .../GitHubOwnerListResponseImpl.java | 47 + .../GitHubOwnersClientImpl.java | 566 ++ .../implementation/GitHubOwnersImpl.java | 93 + .../implementation/GitHubReposClientImpl.java | 458 ++ .../implementation/GitHubReposImpl.java | 74 + .../implementation/GitHubRepositoryImpl.java | 50 + .../implementation/GitLabGroupImpl.java | 49 + .../GitLabGroupListResponseImpl.java | 47 + .../GitLabGroupsClientImpl.java | 568 ++ .../implementation/GitLabGroupsImpl.java | 93 + .../implementation/GitLabProjectImpl.java | 50 + .../GitLabProjectsClientImpl.java | 466 ++ .../implementation/GitLabProjectsImpl.java | 74 + .../GitLabSubgroupsClientImpl.java | 209 + .../implementation/GitLabSubgroupsImpl.java | 58 + .../GovernanceAssignmentImpl.java | 85 +- .../GovernanceAssignmentsClientImpl.java | 497 +- .../GovernanceAssignmentsImpl.java | 217 +- .../implementation/GovernanceRuleImpl.java | 60 +- .../GovernanceRulesClientImpl.java | 776 +- .../implementation/GovernanceRulesImpl.java | 130 +- .../implementation/HealthReportImpl.java | 19 + .../HealthReportOperationsClientImpl.java | 180 - .../HealthReportOperationsImpl.java | 58 - .../HealthReportsClientImpl.java | 267 +- .../implementation/HealthReportsImpl.java | 29 +- ...formationProtectionPoliciesClientImpl.java | 395 +- .../InformationProtectionPoliciesImpl.java | 102 +- .../InformationProtectionPolicyImpl.java | 78 +- .../implementation/IngestionSettingImpl.java | 117 - .../IngestionSettingTokenImpl.java | 32 - .../IngestionSettingsClientImpl.java | 1030 --- .../implementation/IngestionSettingsImpl.java | 183 - .../IoTSecurityAggregatedAlertImpl.java | 3 +- ...TSecurityAggregatedRecommendationImpl.java | 3 +- ...IoTSecuritySolutionAnalyticsModelImpl.java | 3 +- ...ecuritySolutionAnalyticsModelListImpl.java | 12 +- .../IoTSecuritySolutionModelImpl.java | 66 +- ...otSecuritySolutionAnalyticsClientImpl.java | 226 +- .../IotSecuritySolutionAnalyticsImpl.java | 29 +- ...nsAnalyticsAggregatedAlertsClientImpl.java | 450 +- ...olutionsAnalyticsAggregatedAlertsImpl.java | 43 +- ...onsAnalyticsRecommendationsClientImpl.java | 377 +- ...SolutionsAnalyticsRecommendationsImpl.java | 41 +- .../IotSecuritySolutionsClientImpl.java | 835 +-- .../IotSecuritySolutionsImpl.java | 121 +- .../JitNetworkAccessPoliciesClientImpl.java | 1297 ++-- .../JitNetworkAccessPoliciesImpl.java | 211 +- .../JitNetworkAccessPolicyImpl.java | 75 +- .../JitNetworkAccessRequestImpl.java | 4 +- .../implementation/LocationsClientImpl.java | 249 +- .../implementation/LocationsImpl.java | 13 +- .../implementation/MdeOnboardingDataImpl.java | 4 +- .../MdeOnboardingDataListImpl.java | 12 +- .../MdeOnboardingsClientImpl.java | 146 +- .../implementation/MdeOnboardingsImpl.java | 14 +- .../OperationResultAutoGeneratedImpl.java | 3 +- .../OperationStatusResultImpl.java | 71 + .../implementation/OperationsClientImpl.java | 170 +- .../implementation/OperationsImpl.java | 8 +- .../security/implementation/PricingImpl.java | 31 +- .../implementation/PricingListImpl.java | 5 +- .../implementation/PricingsClientImpl.java | 614 +- .../security/implementation/PricingsImpl.java | 56 +- .../RegulatoryComplianceAssessmentImpl.java | 3 +- ...latoryComplianceAssessmentsClientImpl.java | 427 +- .../RegulatoryComplianceAssessmentsImpl.java | 68 +- .../RegulatoryComplianceControlImpl.java | 3 +- ...egulatoryComplianceControlsClientImpl.java | 351 +- .../RegulatoryComplianceControlsImpl.java | 44 +- .../RegulatoryComplianceStandardImpl.java | 3 +- ...gulatoryComplianceStandardsClientImpl.java | 284 +- .../RegulatoryComplianceStandardsImpl.java | 22 +- .../{Utils.java => ResourceManagerUtils.java} | 45 +- .../ResourceProvidersClientImpl.java | 270 + .../implementation/ResourceProvidersImpl.java | 79 + .../implementation/RuleResultsImpl.java | 50 +- .../implementation/RulesResultsImpl.java | 8 +- .../implementation/ScanResultsImpl.java | 8 +- .../security/implementation/ScansImpl.java | 5 +- .../SecureScoreControlDefinitionItemImpl.java | 3 +- ...cureScoreControlDefinitionsClientImpl.java | 339 +- .../SecureScoreControlDefinitionsImpl.java | 15 +- .../SecureScoreControlDetailsImpl.java | 4 +- .../SecureScoreControlScoreDetailsImpl.java | 3 +- .../SecureScoreControlsClientImpl.java | 415 +- .../SecureScoreControlsImpl.java | 20 +- .../implementation/SecureScoreItemImpl.java | 4 +- .../SecureScoresClientImpl.java | 254 +- .../implementation/SecureScoresImpl.java | 13 +- ...ecurityAssessmentMetadataResponseImpl.java | 43 +- .../SecurityAssessmentResponseImpl.java | 67 +- .../implementation/SecurityCenterBuilder.java | 46 +- .../implementation/SecurityCenterImpl.java | 1333 ++-- ...nectorApplicationOperationsClientImpl.java | 354 +- ...ityConnectorApplicationOperationsImpl.java | 53 +- ...curityConnectorApplicationsClientImpl.java | 238 +- .../SecurityConnectorApplicationsImpl.java | 11 +- .../implementation/SecurityConnectorImpl.java | 58 +- .../SecurityConnectorsClientImpl.java | 807 +-- .../SecurityConnectorsImpl.java | 113 +- .../implementation/SecurityContactImpl.java | 71 +- .../SecurityContactsClientImpl.java | 459 +- .../implementation/SecurityContactsImpl.java | 76 +- .../implementation/SecurityOperatorImpl.java | 4 +- .../SecurityOperatorListImpl.java | 12 +- .../SecurityOperatorsClientImpl.java | 341 +- .../implementation/SecurityOperatorsImpl.java | 39 +- .../implementation/SecuritySolutionImpl.java | 4 +- .../SecuritySolutionsClientImpl.java | 280 +- .../implementation/SecuritySolutionsImpl.java | 21 +- ...ecuritySolutionsReferenceDataListImpl.java | 3 +- ...ritySolutionsReferenceDatasClientImpl.java | 181 +- .../SecuritySolutionsReferenceDatasImpl.java | 21 +- .../SecuritySubAssessmentImpl.java | 4 +- .../SensitivitySettingsClientImpl.java | 146 + .../SensitivitySettingsImpl.java | 55 + .../ServerVulnerabilityAssessmentImpl.java | 3 +- ...verVulnerabilityAssessmentsClientImpl.java | 574 +- .../ServerVulnerabilityAssessmentsImpl.java | 80 +- ...erverVulnerabilityAssessmentsListImpl.java | 12 +- ...erVulnerabilityAssessmentsSettingImpl.java | 45 + ...rabilityAssessmentsSettingsClientImpl.java | 641 ++ ...rVulnerabilityAssessmentsSettingsImpl.java | 105 + .../implementation/SettingsClientImpl.java | 322 +- .../security/implementation/SettingsImpl.java | 25 +- .../SoftwareInventoriesClientImpl.java | 556 +- .../SoftwareInventoriesImpl.java | 63 +- ...lityAssessmentBaselineRulesClientImpl.java | 294 +- ...nerabilityAssessmentBaselineRulesImpl.java | 34 +- ...bilityAssessmentScanResultsClientImpl.java | 156 +- ...ulnerabilityAssessmentScanResultsImpl.java | 29 +- ...ulnerabilityAssessmentScansClientImpl.java | 121 +- .../SqlVulnerabilityAssessmentScansImpl.java | 13 +- .../SubAssessmentsClientImpl.java | 433 +- .../implementation/SubAssessmentsImpl.java | 25 +- .../implementation/TasksClientImpl.java | 1102 +-- .../security/implementation/TasksImpl.java | 92 +- .../implementation/TopologiesClientImpl.java | 483 +- .../implementation/TopologiesImpl.java | 25 +- .../implementation/TopologyResourceImpl.java | 4 +- .../implementation/WorkspaceSettingImpl.java | 54 +- .../WorkspaceSettingsClientImpl.java | 507 +- .../implementation/WorkspaceSettingsImpl.java | 53 +- .../security/implementation/package-info.java | 4 +- .../security/models/AadConnectivityState.java | 22 +- .../AadConnectivityStateAutoGenerated.java | 14 +- .../models/AadExternalSecuritySolution.java | 14 +- .../models/AadSolutionProperties.java | 26 +- .../security/models/ActionType.java | 22 +- .../models/ActionableRemediation.java | 157 + .../models/ActionableRemediationState.java | 61 + .../ActiveConnectionsNotInAllowedRange.java | 26 +- .../AdaptiveApplicationControlGroup.java | 155 +- .../AdaptiveApplicationControlGroups.java | 8 +- .../AdaptiveApplicationControlIssue.java | 46 +- ...daptiveApplicationControlIssueSummary.java | 18 +- .../models/AdaptiveApplicationControls.java | 38 +- .../models/AdaptiveNetworkHardening.java | 18 +- ...daptiveNetworkHardeningEnforceRequest.java | 39 +- .../models/AdaptiveNetworkHardenings.java | 76 +- .../models/AdaptiveNetworkHardeningsList.java | 18 +- .../security/models/AdditionalData.java | 13 +- .../models/AdditionalWorkspaceDataType.java | 18 +- .../models/AdditionalWorkspaceType.java | 14 +- .../AdditionalWorkspacesProperties.java | 22 +- .../AdvancedThreatProtectionSetting.java | 51 +- .../models/AdvancedThreatProtections.java | 14 +- .../security/models/Alert.java | 66 +- .../security/models/AlertEntity.java | 19 +- .../security/models/AlertList.java | 16 +- .../AlertPropertiesSupportingEvidence.java | 19 +- .../security/models/AlertSeverity.java | 22 +- ...lertSimulatorBundlesRequestProperties.java | 14 +- .../models/AlertSimulatorRequestBody.java | 14 +- .../AlertSimulatorRequestProperties.java | 19 +- .../security/models/AlertStatus.java | 26 +- .../security/models/AlertSyncSettings.java | 16 +- .../security/models/Alerts.java | 184 +- .../models/AlertsSuppressionRule.java | 28 +- .../models/AlertsSuppressionRules.java | 28 +- .../models/AlertsSuppressionRulesList.java | 22 +- .../security/models/AllowedConnections.java | 48 +- .../models/AllowedConnectionsList.java | 14 +- .../models/AllowedConnectionsResource.java | 18 +- .../models/AllowlistCustomAlertRule.java | 27 +- .../AmqpC2DMessagesNotInAllowedRange.java | 26 +- ...pC2DRejectedMessagesNotInAllowedRange.java | 26 +- .../AmqpD2CMessagesNotInAllowedRange.java | 26 +- .../models/AnnotateDefaultBranchState.java | 56 + .../security/models/ApiCollection.java | 116 + ...sponseList.java => ApiCollectionList.java} | 24 +- .../models/ApiCollectionOffboardings.java | 46 - .../models/ApiCollectionOnboardings.java | 47 - .../security/models/ApiCollections.java | 212 +- .../security/models/Application.java | 128 +- .../models/ApplicationOperations.java | 22 +- .../models/ApplicationSourceResourceType.java | 14 +- .../security/models/Applications.java | 16 +- .../security/models/ApplicationsList.java | 14 +- .../security/models/AscLocation.java | 14 +- .../security/models/AscLocationList.java | 14 +- .../security/models/AssessedResourceType.java | 26 +- .../security/models/AssessmentLinks.java | 12 +- .../security/models/AssessmentStatus.java | 27 +- .../security/models/AssessmentStatusCode.java | 22 +- .../models/AssessmentStatusResponse.java | 26 +- .../security/models/AssessmentType.java | 22 +- .../security/models/Assessments.java | 42 +- .../security/models/AssessmentsMetadatas.java | 46 +- .../models/AtaExternalSecuritySolution.java | 14 +- .../models/AtaSolutionProperties.java | 26 +- .../AuthenticationDetailsProperties.java | 17 +- .../AuthenticationProvisioningState.java | 26 +- .../security/models/AuthenticationType.java | 18 +- .../security/models/Authorization.java | 60 + .../security/models/AutoDiscovery.java | 58 + .../security/models/AutoProvision.java | 18 +- .../models/AutoProvisioningSetting.java | 44 +- .../models/AutoProvisioningSettingList.java | 16 +- .../models/AutoProvisioningSettings.java | 18 +- .../security/models/Automation.java | 220 +- .../security/models/AutomationAction.java | 13 +- .../models/AutomationActionEventHub.java | 42 +- .../models/AutomationActionLogicApp.java | 18 +- .../models/AutomationActionWorkspace.java | 18 +- .../security/models/AutomationList.java | 21 +- .../security/models/AutomationRuleSet.java | 14 +- .../security/models/AutomationScope.java | 18 +- .../security/models/AutomationSource.java | 14 +- .../models/AutomationTriggeringRule.java | 22 +- .../models/AutomationUpdateModel.java | 183 + .../models/AutomationValidationStatus.java | 10 +- .../security/models/Automations.java | 58 +- ...meRoleAuthenticationDetailsProperties.java | 38 +- ...sCredsAuthenticationDetailsProperties.java | 29 +- .../security/models/AwsEnvironmentData.java | 46 +- .../models/AwsOrganizationalData.java | 13 +- .../models/AwsOrganizationalDataMaster.java | 18 +- .../models/AwsOrganizationalDataMember.java | 14 +- .../security/models/AzureDevOpsOrg.java | 189 + .../models/AzureDevOpsOrgListResponse.java | 34 + .../models/AzureDevOpsOrgProperties.java | 182 + .../security/models/AzureDevOpsOrgs.java | 124 + .../security/models/AzureDevOpsProject.java | 191 + .../AzureDevOpsProjectListResponse.java | 85 + .../models/AzureDevOpsProjectProperties.java | 223 + .../security/models/AzureDevOpsProjects.java | 103 + .../security/models/AzureDevOpsRepos.java | 109 + .../models/AzureDevOpsRepository.java | 192 + .../AzureDevOpsRepositoryListResponse.java | 85 + .../AzureDevOpsRepositoryProperties.java | 280 + .../AzureDevOpsScopeEnvironmentData.java | 10 +- .../security/models/AzureResourceDetails.java | 12 +- .../models/AzureResourceIdentifier.java | 12 +- .../security/models/AzureResourceLink.java | 12 +- .../security/models/AzureServersSetting.java | 81 + .../models/AzureTrackedResourceLocation.java | 14 +- .../security/models/Baseline.java | 18 +- .../models/BaselineAdjustedResult.java | 26 +- .../security/models/BenchmarkReference.java | 18 +- .../security/models/BuiltInInfoType.java | 107 + .../security/models/BundleType.java | 46 +- .../security/models/Categories.java | 30 +- .../models/CategoryConfiguration.java | 98 + .../models/CefExternalSecuritySolution.java | 14 +- .../models/CefSolutionProperties.java | 34 +- .../security/models/CloudName.java | 34 +- .../security/models/CloudOffering.java | 15 +- .../resourcemanager/security/models/Code.java | 18 +- .../security/models/Compliance.java | 18 +- .../security/models/ComplianceList.java | 16 +- .../security/models/ComplianceResult.java | 14 +- .../security/models/ComplianceResultList.java | 21 +- .../security/models/ComplianceResults.java | 16 +- .../security/models/ComplianceSegment.java | 14 +- .../security/models/Compliances.java | 20 +- .../security/models/ConfigurationStatus.java | 30 +- .../security/models/ConnectableResource.java | 16 +- .../security/models/ConnectedResource.java | 16 +- .../security/models/ConnectedWorkspace.java | 14 +- .../models/ConnectionFromIpNotAllowed.java | 18 +- .../security/models/ConnectionStrings.java | 25 - .../models/ConnectionToIpNotAllowed.java | 18 +- .../security/models/ConnectionType.java | 18 +- .../security/models/ConnectorSetting.java | 90 +- .../security/models/ConnectorSettingList.java | 16 +- .../security/models/Connectors.java | 30 +- ...tainerRegistryVulnerabilityProperties.java | 39 +- .../security/models/ControlType.java | 18 +- .../models/CspmMonitorAwsOffering.java | 18 +- ...nitorAwsOfferingNativeCloudConnection.java | 14 +- .../CspmMonitorAzureDevOpsOffering.java | 10 +- .../models/CspmMonitorGcpOffering.java | 18 +- ...nitorGcpOfferingNativeCloudConnection.java | 26 +- .../models/CspmMonitorGitLabOffering.java | 10 +- .../models/CspmMonitorGithubOffering.java | 10 +- .../security/models/CustomAlertRule.java | 21 +- .../models/CustomAssessmentAutomation.java | 114 +- .../CustomAssessmentAutomationRequest.java | 36 +- .../models/CustomAssessmentAutomations.java | 104 +- ...CustomAssessmentAutomationsListResult.java | 16 +- .../models/CustomEntityStoreAssignment.java | 59 +- .../CustomEntityStoreAssignmentRequest.java | 24 +- .../models/CustomEntityStoreAssignments.java | 104 +- ...ustomEntityStoreAssignmentsListResult.java | 16 +- .../resourcemanager/security/models/Cve.java | 14 +- .../resourcemanager/security/models/Cvss.java | 12 +- .../security/models/DataExportSettings.java | 16 +- .../security/models/DataSource.java | 14 +- .../models/DefenderCspmAwsOffering.java | 119 +- .../models/DefenderCspmAwsOfferingCiem.java | 86 + .../DefenderCspmAwsOfferingCiemDiscovery.java | 54 + .../DefenderCspmAwsOfferingCiemOidc.java | 82 + ...pmAwsOfferingDataSensitivityDiscovery.java | 18 +- .../DefenderCspmAwsOfferingDatabasesDspm.java | 18 +- ...ingMdcContainersAgentlessDiscoveryK8S.java | 80 + ...sOfferingMdcContainersImageAssessment.java | 80 + .../DefenderCspmAwsOfferingVmScanners.java | 22 +- ...spmAwsOfferingVmScannersConfiguration.java | 22 +- .../models/DefenderCspmGcpOffering.java | 167 +- .../DefenderCspmGcpOfferingCiemDiscovery.java | 110 + ...pmGcpOfferingDataSensitivityDiscovery.java | 108 + ...ingMdcContainersAgentlessDiscoveryK8S.java | 108 + ...pOfferingMdcContainersImageAssessment.java | 108 + .../DefenderCspmGcpOfferingVmScanners.java | 84 + ...spmGcpOfferingVmScannersConfiguration.java | 83 + .../DefenderFoDatabasesAwsOffering.java | 26 +- ...tabasesAwsOfferingArcAutoProvisioning.java | 26 +- ...eringArcAutoProvisioningConfiguration.java | 22 +- ...erFoDatabasesAwsOfferingDatabasesDspm.java | 18 +- .../DefenderFoDatabasesAwsOfferingRds.java | 18 +- .../DefenderForContainersAwsOffering.java | 134 +- ...tainersAwsOfferingCloudWatchToKinesis.java | 14 +- ...eringContainerVulnerabilityAssessment.java | 14 +- ...gContainerVulnerabilityAssessmentTask.java | 14 +- ...erForContainersAwsOfferingKinesisToS3.java | 14 +- ...inersAwsOfferingKubernetesScubaReader.java | 14 +- ...ontainersAwsOfferingKubernetesService.java | 14 +- ...ingMdcContainersAgentlessDiscoveryK8S.java | 80 + ...sOfferingMdcContainersImageAssessment.java | 80 + .../DefenderForContainersGcpOffering.java | 104 +- ...ringDataPipelineNativeCloudConnection.java | 26 +- ...ingMdcContainersAgentlessDiscoveryK8S.java | 108 + ...pOfferingMdcContainersImageAssessment.java | 108 + ...inersGcpOfferingNativeCloudConnection.java | 26 +- .../DefenderForDatabasesGcpOffering.java | 28 +- ...tabasesGcpOfferingArcAutoProvisioning.java | 22 +- ...eringArcAutoProvisioningConfiguration.java | 22 +- ...fenderForDatabasesArcAutoProvisioning.java | 26 +- .../DefenderForDevOpsAzureDevOpsOffering.java | 10 +- .../DefenderForDevOpsGitLabOffering.java | 10 +- .../DefenderForDevOpsGithubOffering.java | 10 +- .../models/DefenderForServersAwsOffering.java | 50 +- ...ServersAwsOfferingArcAutoProvisioning.java | 26 +- ...eringArcAutoProvisioningConfiguration.java | 18 +- ...rServersAwsOfferingDefenderForServers.java | 14 +- ...ServersAwsOfferingMdeAutoProvisioning.java | 18 +- .../DefenderForServersAwsOfferingSubPlan.java | 14 +- ...rServersAwsOfferingVaAutoProvisioning.java | 22 +- ...feringVaAutoProvisioningConfiguration.java | 14 +- ...fenderForServersAwsOfferingVmScanners.java | 22 +- ...ersAwsOfferingVmScannersConfiguration.java | 22 +- .../models/DefenderForServersGcpOffering.java | 50 +- ...ServersGcpOfferingArcAutoProvisioning.java | 22 +- ...eringArcAutoProvisioningConfiguration.java | 18 +- ...rServersGcpOfferingDefenderForServers.java | 26 +- ...ServersGcpOfferingMdeAutoProvisioning.java | 18 +- .../DefenderForServersGcpOfferingSubPlan.java | 14 +- ...rServersGcpOfferingVaAutoProvisioning.java | 22 +- ...feringVaAutoProvisioningConfiguration.java | 14 +- ...fenderForServersGcpOfferingVmScanners.java | 22 +- ...ersGcpOfferingVmScannersConfiguration.java | 18 +- .../models/DefenderForStorageSetting.java | 262 + .../security/models/DefenderForStorages.java | 69 + .../models/DenylistCustomAlertRule.java | 24 +- .../security/models/DevOpsConfiguration.java | 55 + .../DevOpsConfigurationListResponse.java | 85 + .../models/DevOpsConfigurationProperties.java | 194 + .../security/models/DevOpsConfigurations.java | 147 + .../models/DevOpsOperationResults.java | 41 + .../models/DevOpsProvisioningState.java | 86 + .../security/models/DeviceSecurityGroup.java | 135 +- .../models/DeviceSecurityGroupList.java | 16 +- .../security/models/DeviceSecurityGroups.java | 38 +- .../DirectMethodInvokesNotInAllowedRange.java | 26 +- .../security/models/Direction.java | 18 +- .../models/DiscoveredSecuritySolution.java | 22 +- .../DiscoveredSecuritySolutionList.java | 16 +- .../models/DiscoveredSecuritySolutions.java | 44 +- .../EffectiveNetworkSecurityGroups.java | 18 +- .../security/models/EndOfSupportStatus.java | 34 +- .../security/models/Enforce.java | 55 + .../security/models/EnforcementMode.java | 22 +- .../security/models/EnforcementSupport.java | 22 +- .../security/models/EnvironmentData.java | 13 +- .../security/models/EnvironmentDetails.java | 38 +- .../security/models/EnvironmentType.java | 30 +- .../resourcemanager/security/models/Etag.java | 14 +- .../security/models/EventSource.java | 68 +- .../models/ExecuteGovernanceRuleParams.java | 14 +- .../security/models/ExpandControlsEnum.java | 14 +- .../security/models/ExpandEnum.java | 18 +- .../security/models/ExportData.java | 14 +- .../security/models/Extension.java | 73 +- .../models/ExternalSecuritySolution.java | 14 +- .../models/ExternalSecuritySolutionKind.java | 22 +- .../models/ExternalSecuritySolutionList.java | 16 +- .../ExternalSecuritySolutionProperties.java | 29 +- .../models/ExternalSecuritySolutions.java | 48 +- .../FailedLocalLoginsNotInAllowedRange.java | 26 +- .../security/models/FileType.java | 34 +- .../models/FileUploadsNotInAllowedRange.java | 26 +- .../GcpCredentialsDetailsProperties.java | 120 +- .../models/GcpOrganizationalData.java | 13 +- .../models/GcpOrganizationalDataMember.java | 18 +- .../GcpOrganizationalDataOrganization.java | 24 +- .../security/models/GcpProjectDetails.java | 22 +- .../models/GcpProjectEnvironmentData.java | 44 +- .../GetSensitivitySettingsListResponse.java | 27 + .../GetSensitivitySettingsResponse.java | 47 + ...SensitivitySettingsResponseProperties.java | 146 + ...tingsResponsePropertiesMipInformation.java | 144 + ...llectionResponse.java => GitHubOwner.java} | 38 +- .../models/GitHubOwnerListResponse.java | 34 + .../models/GitHubOwnerProperties.java | 183 + .../security/models/GitHubOwners.java | 93 + .../security/models/GitHubRepos.java | 72 + .../security/models/GitHubRepository.java | 55 + .../models/GitHubRepositoryListResponse.java | 85 + .../models/GitHubRepositoryProperties.java | 251 + .../security/models/GitLabGroup.java | 55 + .../models/GitLabGroupListResponse.java | 34 + .../models/GitLabGroupProperties.java | 209 + .../security/models/GitLabGroups.java | 93 + .../security/models/GitLabProject.java | 55 + .../models/GitLabProjectListResponse.java | 85 + .../models/GitLabProjectProperties.java | 229 + .../security/models/GitLabProjects.java | 74 + .../security/models/GitLabSubgroups.java | 41 + .../models/GithubScopeEnvironmentData.java | 10 +- .../models/GitlabScopeEnvironmentData.java | 10 +- .../security/models/GovernanceAssignment.java | 187 +- .../GovernanceAssignmentAdditionalData.java | 22 +- .../models/GovernanceAssignments.java | 62 +- .../models/GovernanceAssignmentsList.java | 14 +- .../models/GovernanceEmailNotification.java | 20 +- .../security/models/GovernanceRule.java | 355 +- .../GovernanceRuleEmailNotification.java | 22 +- .../security/models/GovernanceRuleList.java | 14 +- .../models/GovernanceRuleMetadata.java | 18 +- .../models/GovernanceRuleOwnerSource.java | 18 +- .../models/GovernanceRuleOwnerSourceType.java | 18 +- .../GovernanceRuleSourceResourceType.java | 14 +- .../security/models/GovernanceRuleType.java | 18 +- .../security/models/GovernanceRules.java | 98 +- ...overnanceRulesOperationResultsHeaders.java | 12 +- ...vernanceRulesOperationResultsResponse.java | 16 +- .../models/HealthDataClassification.java | 28 +- .../security/models/HealthReport.java | 40 +- .../security/models/HealthReports.java | 34 +- .../security/models/HealthReportsList.java | 14 +- .../HttpC2DMessagesNotInAllowedRange.java | 26 +- ...pC2DRejectedMessagesNotInAllowedRange.java | 26 +- .../HttpD2CMessagesNotInAllowedRange.java | 26 +- .../HybridComputeProvisioningState.java | 22 +- .../HybridComputeSettingsProperties.java | 38 +- .../security/models/Identity.java | 18 +- .../security/models/ImplementationEffort.java | 22 +- .../security/models/InfoType.java | 107 + .../InformationProtectionAwsOffering.java | 18 +- ...ctionAwsOfferingInformationProtection.java | 14 +- .../models/InformationProtectionKeyword.java | 26 +- .../models/InformationProtectionPolicies.java | 30 +- .../models/InformationProtectionPolicy.java | 97 +- .../InformationProtectionPolicyList.java | 16 +- .../InformationProtectionPolicyName.java | 18 +- .../security/models/InformationType.java | 38 +- .../models/IngestionConnectionString.java | 54 - .../security/models/IngestionSetting.java | 142 - .../models/IngestionSettingToken.java | 25 - .../security/models/IngestionSettings.java | 180 - .../models/InheritFromParentState.java | 56 + .../security/models/Inherited.java | 56 + .../security/models/Intent.java | 70 +- .../models/IoTSecurityAggregatedAlert.java | 40 +- .../IoTSecurityAggregatedAlertList.java | 22 +- ...atedAlertPropertiesTopDevicesListItem.java | 16 +- .../IoTSecurityAggregatedRecommendation.java | 34 +- ...TSecurityAggregatedRecommendationList.java | 22 +- .../models/IoTSecurityAlertedDevice.java | 14 +- .../models/IoTSecurityDeviceAlert.java | 16 +- .../IoTSecurityDeviceRecommendation.java | 16 +- .../IoTSecuritySolutionAnalyticsModel.java | 24 +- ...IoTSecuritySolutionAnalyticsModelList.java | 10 +- ...ticsModelPropertiesDevicesMetricsItem.java | 22 +- .../models/IoTSecuritySolutionModel.java | 224 +- .../models/IoTSecuritySolutionsList.java | 21 +- .../security/models/IoTSeverityMetrics.java | 22 +- .../models/IotSecuritySolutionAnalytics.java | 28 +- .../security/models/IotSecuritySolutions.java | 50 +- ...itySolutionsAnalyticsAggregatedAlerts.java | 40 +- ...ritySolutionsAnalyticsRecommendations.java | 40 +- .../security/models/IsEnabled.java | 18 +- .../security/models/Issue.java | 46 +- .../models/JitNetworkAccessPolicies.java | 107 +- .../models/JitNetworkAccessPoliciesList.java | 16 +- .../models/JitNetworkAccessPolicy.java | 126 +- .../JitNetworkAccessPolicyInitiatePort.java | 28 +- ...JitNetworkAccessPolicyInitiateRequest.java | 28 +- ...orkAccessPolicyInitiateVirtualMachine.java | 30 +- .../JitNetworkAccessPolicyVirtualMachine.java | 34 +- .../models/JitNetworkAccessPortRule.java | 42 +- .../models/JitNetworkAccessRequest.java | 14 +- .../models/JitNetworkAccessRequestPort.java | 56 +- ...JitNetworkAccessRequestVirtualMachine.java | 30 +- .../resourcemanager/security/models/Kind.java | 14 +- .../security/models/KindAutoGenerated.java | 14 +- .../security/models/Label.java | 109 + .../security/models/ListCustomAlertRule.java | 19 +- .../security/models/LocalUserNotAllowed.java | 18 +- .../security/models/Location.java | 12 +- .../security/models/Locations.java | 16 +- .../models/LogAnalyticsIdentifier.java | 18 +- .../security/models/MdeOnboardingData.java | 16 +- .../models/MdeOnboardingDataList.java | 8 +- .../security/models/MdeOnboardings.java | 16 +- .../security/models/MinimalRiskLevel.java | 63 + .../security/models/MinimalSeverity.java | 22 +- .../security/models/MipIntegrationStatus.java | 63 + .../MqttC2DMessagesNotInAllowedRange.java | 26 +- ...tC2DRejectedMessagesNotInAllowedRange.java | 26 +- .../MqttD2CMessagesNotInAllowedRange.java | 26 +- .../security/models/NotificationsSource.java | 39 + .../models/NotificationsSourceAlert.java | 60 + .../models/NotificationsSourceAttackPath.java | 62 + .../security/models/OfferingType.java | 78 +- .../models/OnPremiseResourceDetails.java | 51 +- .../models/OnPremiseSqlResourceDetails.java | 46 +- .../security/models/OnboardingState.java | 69 + .../security/models/Operation.java | 12 +- .../security/models/OperationDisplay.java | 18 +- .../security/models/OperationList.java | 16 +- .../security/models/OperationResult.java | 22 +- .../models/OperationResultAutoGenerated.java | 8 +- .../security/models/OperationStatus.java | 24 +- .../models/OperationStatusAutoGenerated.java | 80 + .../models/OperationStatusResult.java | 78 + .../security/models/Operations.java | 16 +- .../security/models/Operator.java | 46 +- .../models/OrganizationMembershipType.java | 18 +- .../security/models/PathRecommendation.java | 46 +- .../security/models/PermissionProperty.java | 34 +- .../security/models/Pricing.java | 87 +- .../security/models/PricingList.java | 8 +- .../security/models/PricingTier.java | 19 +- .../security/models/Pricings.java | 129 +- .../security/models/ProcessNotAllowed.java | 18 +- .../security/models/PropertyType.java | 26 +- .../security/models/ProtectionMode.java | 22 +- .../security/models/Protocol.java | 22 +- .../security/models/ProvisioningState.java | 22 +- .../models/ProxyServerProperties.java | 14 +- .../security/models/PublisherInfo.java | 28 +- .../security/models/QueryCheck.java | 22 +- .../models/QueuePurgesNotInAllowedRange.java | 26 +- .../resourcemanager/security/models/Rank.java | 34 +- .../security/models/RecommendationAction.java | 22 +- .../models/RecommendationConfigStatus.java | 18 +- ...RecommendationConfigurationProperties.java | 32 +- .../security/models/RecommendationStatus.java | 26 +- .../security/models/RecommendationType.java | 90 +- .../RegulatoryComplianceAssessment.java | 28 +- .../RegulatoryComplianceAssessmentList.java | 22 +- .../RegulatoryComplianceAssessments.java | 34 +- .../models/RegulatoryComplianceControl.java | 22 +- .../RegulatoryComplianceControlList.java | 22 +- .../models/RegulatoryComplianceControls.java | 20 +- .../models/RegulatoryComplianceStandard.java | 22 +- .../RegulatoryComplianceStandardList.java | 22 +- .../models/RegulatoryComplianceStandards.java | 12 +- .../security/models/Remediation.java | 26 +- .../security/models/RemediationEta.java | 28 +- .../security/models/ReportedSeverity.java | 26 +- .../security/models/ResourceDetails.java | 13 +- .../models/ResourceDetailsAutoGenerated.java | 18 +- .../security/models/ResourceIdentifier.java | 13 +- .../models/ResourceIdentifierType.java | 18 +- .../security/models/ResourceIdentityType.java | 18 +- .../security/models/ResourceProviders.java | 57 + .../security/models/ResourceStatus.java | 26 +- .../models/ResourcesCoverageStatus.java | 61 + .../security/models/Roles.java | 53 - .../resourcemanager/security/models/Rule.java | 26 +- .../security/models/RuleCategory.java | 79 + .../security/models/RuleResults.java | 112 +- .../security/models/RuleResultsInput.java | 26 +- .../models/RuleResultsProperties.java | 14 +- .../security/models/RuleSeverity.java | 30 +- .../security/models/RuleState.java | 26 +- .../security/models/RuleStatus.java | 22 +- .../security/models/RuleType.java | 26 +- .../security/models/RulesResults.java | 8 +- .../security/models/RulesResultsInput.java | 26 +- .../resourcemanager/security/models/Scan.java | 14 +- .../security/models/ScanProperties.java | 70 +- .../security/models/ScanResult.java | 14 +- .../security/models/ScanResultProperties.java | 38 +- .../security/models/ScanResults.java | 8 +- .../security/models/ScanState.java | 26 +- .../security/models/ScanTriggerType.java | 18 +- .../security/models/ScanningMode.java | 14 +- .../security/models/Scans.java | 8 +- .../security/models/ScopeElement.java | 21 +- .../security/models/ScopeName.java | 53 - .../SecureScoreControlDefinitionItem.java | 22 +- .../SecureScoreControlDefinitionList.java | 14 +- .../SecureScoreControlDefinitionSource.java | 14 +- .../models/SecureScoreControlDefinitions.java | 12 +- .../models/SecureScoreControlDetails.java | 30 +- .../models/SecureScoreControlList.java | 14 +- .../SecureScoreControlScoreDetails.java | 24 +- .../security/models/SecureScoreControls.java | 28 +- .../security/models/SecureScoreItem.java | 22 +- .../security/models/SecureScores.java | 18 +- .../security/models/SecureScoresList.java | 14 +- .../security/models/SecurityAssessment.java | 36 +- .../models/SecurityAssessmentList.java | 14 +- ...SecurityAssessmentMetadataPartnerData.java | 36 +- ...etadataPropertiesResponsePublishDates.java | 29 +- .../SecurityAssessmentMetadataResponse.java | 190 +- ...ecurityAssessmentMetadataResponseList.java | 14 +- .../models/SecurityAssessmentPartnerData.java | 32 +- .../SecurityAssessmentPropertiesBase.java | 36 +- .../models/SecurityAssessmentResponse.java | 157 +- .../security/models/SecurityConnector.java | 187 +- ...ecurityConnectorApplicationOperations.java | 48 +- .../models/SecurityConnectorApplications.java | 16 +- .../security/models/SecurityConnectors.java | 50 +- .../models/SecurityConnectorsList.java | 21 +- .../security/models/SecurityContact.java | 118 +- .../security/models/SecurityContactList.java | 39 +- .../security/models/SecurityContactName.java | 48 + ...tyContactPropertiesAlertNotifications.java | 76 - ...yContactPropertiesNotificationsByRole.java | 28 +- .../security/models/SecurityContactRole.java | 63 + .../security/models/SecurityContacts.java | 36 +- .../security/models/SecurityFamily.java | 26 +- .../security/models/SecurityOperator.java | 14 +- .../security/models/SecurityOperatorList.java | 8 +- .../security/models/SecurityOperators.java | 24 +- .../security/models/SecuritySolution.java | 22 +- .../security/models/SecuritySolutionList.java | 16 +- .../models/SecuritySolutionStatus.java | 18 +- .../security/models/SecuritySolutions.java | 24 +- .../SecuritySolutionsReferenceData.java | 48 +- .../SecuritySolutionsReferenceDataList.java | 8 +- .../SecuritySolutionsReferenceDatas.java | 16 +- .../models/SecuritySubAssessment.java | 32 +- .../models/SecuritySubAssessmentList.java | 14 +- .../security/models/SecurityTask.java | 22 +- .../security/models/SecurityTaskList.java | 14 +- .../models/SecurityTaskParameters.java | 19 +- .../security/models/SensitivityLabel.java | 30 +- ...erations.java => SensitivitySettings.java} | 27 +- .../models/ServerVulnerabilityAssessment.java | 14 +- ...AssessmentPropertiesProvisioningState.java | 38 +- .../ServerVulnerabilityAssessments.java | 68 +- ...sessmentsAzureSettingSelectedProvider.java | 49 + .../ServerVulnerabilityAssessmentsList.java | 8 +- ...ServerVulnerabilityAssessmentsSetting.java | 49 + ...erVulnerabilityAssessmentsSettingKind.java | 50 + ...lnerabilityAssessmentsSettingKindName.java | 50 + ...erverVulnerabilityAssessmentsSettings.java | 112 + ...VulnerabilityAssessmentsSettingsList.java} | 30 +- .../models/ServerVulnerabilityProperties.java | 37 +- .../models/ServicePrincipalProperties.java | 26 +- .../security/models/Setting.java | 12 +- .../security/models/SettingKind.java | 22 +- .../security/models/SettingName.java | 29 +- .../models/SettingNameAutoGenerated.java | 69 + .../security/models/Settings.java | 24 +- .../security/models/SettingsList.java | 16 +- .../security/models/Severity.java | 22 +- .../security/models/SeverityEnum.java | 22 +- .../security/models/Software.java | 30 +- .../security/models/SoftwareInventories.java | 55 +- .../security/models/SoftwaresList.java | 16 +- .../security/models/Source.java | 22 +- .../security/models/SourceSystem.java | 30 +- .../security/models/SourceType.java | 53 + .../SqlServerVulnerabilityProperties.java | 14 +- ...lVulnerabilityAssessmentBaselineRules.java | 26 +- ...SqlVulnerabilityAssessmentScanResults.java | 16 +- .../SqlVulnerabilityAssessmentScans.java | 12 +- .../security/models/State.java | 26 +- .../security/models/Status.java | 18 +- .../security/models/StatusAutoGenerated.java | 55 +- .../security/models/StatusName.java | 22 +- .../security/models/StatusReason.java | 22 +- .../security/models/SubAssessmentStatus.java | 18 +- .../models/SubAssessmentStatusCode.java | 22 +- .../security/models/SubAssessments.java | 44 +- .../security/models/SubPlan.java | 18 +- .../security/models/SupportedCloudEnum.java | 18 +- .../models/SuppressionAlertsScope.java | 19 +- .../security/models/Tactics.java | 66 +- .../resourcemanager/security/models/Tags.java | 14 +- .../security/models/TagsResource.java | 14 +- .../models/TargetBranchConfiguration.java | 90 + .../security/models/TaskUpdateActionType.java | 30 +- .../security/models/Tasks.java | 96 +- .../security/models/Techniques.java | 462 +- .../security/models/Threats.java | 42 +- .../models/ThresholdCustomAlertRule.java | 24 +- .../models/TimeWindowCustomAlertRule.java | 31 +- .../security/models/Topologies.java | 44 +- .../security/models/TopologyList.java | 14 +- .../security/models/TopologyResource.java | 18 +- .../models/TopologySingleResource.java | 26 +- .../models/TopologySingleResourceChild.java | 12 +- .../models/TopologySingleResourceParent.java | 12 +- .../security/models/TrackedResource.java | 26 +- .../security/models/TransportProtocol.java | 18 +- .../models/TwinUpdatesNotInAllowedRange.java | 26 +- .../resourcemanager/security/models/Type.java | 18 +- ...authorizedOperationsNotInAllowedRange.java | 26 +- .../models/UnmaskedIpLoggingStatus.java | 18 +- .../models/UpdateIotSecuritySolutionData.java | 28 +- .../UpdateSensitivitySettingsRequest.java | 120 + .../UserDefinedResourcesProperties.java | 30 +- .../security/models/UserImpact.java | 22 +- .../security/models/UserRecommendation.java | 18 +- .../security/models/VaRule.java | 46 +- .../security/models/ValueType.java | 18 +- .../security/models/VendorReference.java | 14 +- .../security/models/VmRecommendation.java | 26 +- .../security/models/WorkspaceSetting.java | 86 +- .../security/models/WorkspaceSettingList.java | 21 +- .../security/models/WorkspaceSettings.java | 26 +- .../security/models/package-info.java | 4 +- .../security/package-info.java | 4 +- .../src/main/java/module-info.java | 10 +- .../proxy-config.json | 1 + .../reflect-config.json | 2856 ++++++++ ...ptiveApplicationControlsDeleteSamples.java | 19 +- ...AdaptiveApplicationControlsGetSamples.java | 19 +- ...daptiveApplicationControlsListSamples.java | 10 +- ...AdaptiveApplicationControlsPutSamples.java | 154 +- ...aptiveNetworkHardeningsEnforceSamples.java | 56 +- .../AdaptiveNetworkHardeningsGetSamples.java | 20 +- ...rdeningsListByExtendedResourceSamples.java | 16 +- ...AdvancedThreatProtectionCreateSamples.java | 20 +- .../AdvancedThreatProtectionGetSamples.java | 18 +- .../AlertsGetResourceGroupLevelSamples.java | 18 +- .../AlertsGetSubscriptionLevelSamples.java | 17 +- .../AlertsListByResourceGroupSamples.java | 9 +- ...ListResourceGroupLevelByRegionSamples.java | 9 +- .../security/generated/AlertsListSamples.java | 9 +- ...sListSubscriptionLevelByRegionSamples.java | 9 +- .../generated/AlertsSimulateSamples.java | 39 +- .../AlertsSuppressionRulesDeleteSamples.java | 14 +- .../AlertsSuppressionRulesGetSamples.java | 14 +- .../AlertsSuppressionRulesListSamples.java | 16 +- .../AlertsSuppressionRulesUpdateSamples.java | 53 +- ...ourceGroupLevelStateToActivateSamples.java | 18 +- ...sourceGroupLevelStateToDismissSamples.java | 18 +- ...rceGroupLevelStateToInProgressSamples.java | 18 +- ...sourceGroupLevelStateToResolveSamples.java | 18 +- ...bscriptionLevelStateToActivateSamples.java | 17 +- ...ubscriptionLevelStateToDismissSamples.java | 17 +- ...criptionLevelStateToInProgressSamples.java | 17 +- ...ubscriptionLevelStateToResolveSamples.java | 17 +- .../AllowedConnectionsGetSamples.java | 15 +- ...wedConnectionsListByHomeRegionSamples.java | 10 +- .../AllowedConnectionsListSamples.java | 14 +- .../generated/ApiCollectionGetSamples.java | 21 - .../generated/ApiCollectionListSamples.java | 21 - ...ApiCollectionOffboardingDeleteSamples.java | 23 - .../ApiCollectionOnboardingCreateSamples.java | 23 - ...GetByAzureApiManagementServiceSamples.java | 26 + ...istByAzureApiManagementServiceSamples.java | 26 + ...CollectionsListByResourceGroupSamples.java | 26 + .../generated/ApiCollectionsListSamples.java | 26 + ...sOffboardAzureApiManagementApiSamples.java | 26 + ...nsOnboardAzureApiManagementApiSamples.java | 26 + ...icationOperationCreateOrUpdateSamples.java | 29 +- .../ApplicationOperationDeleteSamples.java | 15 +- .../ApplicationOperationGetSamples.java | 19 +- .../generated/ApplicationsListSamples.java | 14 +- .../AssessmentsCreateOrUpdateSamples.java | 24 +- .../generated/AssessmentsDeleteSamples.java | 23 +- .../generated/AssessmentsGetSamples.java | 36 +- .../generated/AssessmentsListSamples.java | 15 +- ...tsMetadataCreateInSubscriptionSamples.java | 34 +- ...tsMetadataDeleteInSubscriptionSamples.java | 19 +- ...mentsMetadataGetInSubscriptionSamples.java | 19 +- .../AssessmentsMetadataGetSamples.java | 15 +- ...entsMetadataListBySubscriptionSamples.java | 14 +- .../AssessmentsMetadataListSamples.java | 10 +- ...AutoProvisioningSettingsCreateSamples.java | 14 +- .../AutoProvisioningSettingsGetSamples.java | 14 +- .../AutoProvisioningSettingsListSamples.java | 14 +- .../AutomationsCreateOrUpdateSamples.java | 167 +- .../generated/AutomationsDeleteSamples.java | 15 +- .../AutomationsGetByResourceGroupSamples.java | 16 +- ...AutomationsListByResourceGroupSamples.java | 10 +- .../generated/AutomationsListSamples.java | 14 +- .../generated/AutomationsUpdateSamples.java | 56 + .../generated/AutomationsValidateSamples.java | 74 +- .../AzureDevOpsOrgsCreateOrUpdateSamples.java | 33 + .../generated/AzureDevOpsOrgsGetSamples.java | 25 + .../AzureDevOpsOrgsListAvailableSamples.java | 25 + .../generated/AzureDevOpsOrgsListSamples.java | 24 + .../AzureDevOpsOrgsUpdateSamples.java | 36 + ...reDevOpsProjectsCreateOrUpdateSamples.java | 33 + .../AzureDevOpsProjectsGetSamples.java | 25 + .../AzureDevOpsProjectsListSamples.java | 25 + .../AzureDevOpsProjectsUpdateSamples.java | 35 + ...AzureDevOpsReposCreateOrUpdateSamples.java | 33 + .../generated/AzureDevOpsReposGetSamples.java | 25 + .../AzureDevOpsReposListSamples.java | 25 + .../AzureDevOpsReposUpdateSamples.java | 35 + .../ComplianceResultsGetSamples.java | 18 +- .../ComplianceResultsListSamples.java | 15 +- .../generated/CompliancesGetSamples.java | 16 +- .../generated/CompliancesListSamples.java | 15 +- .../ConnectorsCreateOrUpdateSamples.java | 99 +- .../generated/ConnectorsDeleteSamples.java | 14 +- .../generated/ConnectorsGetSamples.java | 14 +- .../generated/ConnectorsListSamples.java | 14 +- ...tomAssessmentAutomationsCreateSamples.java | 23 +- ...tomAssessmentAutomationsDeleteSamples.java | 16 +- ...tAutomationsGetByResourceGroupSamples.java | 16 +- ...AutomationsListByResourceGroupSamples.java | 15 +- ...ustomAssessmentAutomationsListSamples.java | 14 +- ...omEntityStoreAssignmentsCreateSamples.java | 14 +- ...omEntityStoreAssignmentsDeleteSamples.java | 16 +- ...eAssignmentsGetByResourceGroupSamples.java | 16 +- ...AssignmentsListByResourceGroupSamples.java | 15 +- ...stomEntityStoreAssignmentsListSamples.java | 14 +- .../DefenderForStorageCreateSamples.java | 33 + .../DefenderForStorageGetSamples.java | 29 + ...psConfigurationsCreateOrUpdateSamples.java | 73 + .../DevOpsConfigurationsDeleteSamples.java | 24 + .../DevOpsConfigurationsGetSamples.java | 25 + .../DevOpsConfigurationsListSamples.java | 24 + .../DevOpsConfigurationsUpdateSamples.java | 31 + .../DevOpsOperationResultsGetSamples.java | 40 + ...ceSecurityGroupsCreateOrUpdateSamples.java | 27 +- .../DeviceSecurityGroupsDeleteSamples.java | 19 +- .../DeviceSecurityGroupsGetSamples.java | 19 +- .../DeviceSecurityGroupsListSamples.java | 18 +- ...DiscoveredSecuritySolutionsGetSamples.java | 15 +- ...uritySolutionsListByHomeRegionSamples.java | 10 +- ...iscoveredSecuritySolutionsListSamples.java | 10 +- .../ExternalSecuritySolutionsGetSamples.java | 19 +- ...uritySolutionsListByHomeRegionSamples.java | 10 +- .../ExternalSecuritySolutionsListSamples.java | 14 +- .../generated/GitHubOwnersGetSamples.java | 25 + .../GitHubOwnersListAvailableSamples.java | 25 + .../generated/GitHubOwnersListSamples.java | 24 + .../generated/GitHubReposGetSamples.java | 25 + .../generated/GitHubReposListSamples.java | 25 + .../generated/GitLabGroupsGetSamples.java | 25 + .../GitLabGroupsListAvailableSamples.java | 25 + .../generated/GitLabGroupsListSamples.java | 24 + .../generated/GitLabProjectsGetSamples.java | 25 + .../generated/GitLabProjectsListSamples.java | 25 + .../generated/GitLabSubgroupsListSamples.java | 25 + ...nanceAssignmentsCreateOrUpdateSamples.java | 39 +- .../GovernanceAssignmentsDeleteSamples.java | 21 +- .../GovernanceAssignmentsGetSamples.java | 21 +- .../GovernanceAssignmentsListSamples.java | 18 +- .../GovernanceRulesCreateOrUpdateSamples.java | 138 +- .../GovernanceRulesDeleteSamples.java | 59 +- .../GovernanceRulesExecuteSamples.java | 62 +- .../generated/GovernanceRulesGetSamples.java | 59 +- .../generated/GovernanceRulesListSamples.java | 52 +- ...overnanceRulesOperationResultsSamples.java | 53 +- .../HealthReportOperationGetSamples.java | 25 - .../generated/HealthReportsGetSamples.java | 26 + .../generated/HealthReportsListSamples.java | 15 +- ...otectionPoliciesCreateOrUpdateSamples.java | 63 +- ...formationProtectionPoliciesGetSamples.java | 34 +- ...ormationProtectionPoliciesListSamples.java | 18 +- .../IngestionSettingsCreateSamples.java | 21 - .../IngestionSettingsDeleteSamples.java | 21 - .../IngestionSettingsGetSamples.java | 20 - ...nSettingsListConnectionStringsSamples.java | 21 - .../IngestionSettingsListSamples.java | 20 - .../IngestionSettingsListTokensSamples.java | 20 - ...otSecuritySolutionAnalyticsGetSamples.java | 9 +- ...tSecuritySolutionAnalyticsListSamples.java | 9 +- ...SecuritySolutionCreateOrUpdateSamples.java | 52 +- .../IotSecuritySolutionDeleteSamples.java | 15 +- ...ritySolutionGetByResourceGroupSamples.java | 15 +- ...itySolutionListByResourceGroupSamples.java | 34 +- .../IotSecuritySolutionListSamples.java | 29 +- .../IotSecuritySolutionUpdateSamples.java | 48 +- ...nalyticsAggregatedAlertDismissSamples.java | 22 +- ...onsAnalyticsAggregatedAlertGetSamples.java | 14 +- ...nsAnalyticsAggregatedAlertListSamples.java | 14 +- ...ionsAnalyticsRecommendationGetSamples.java | 14 +- ...onsAnalyticsRecommendationListSamples.java | 14 +- ...rkAccessPoliciesCreateOrUpdateSamples.java | 72 +- ...JitNetworkAccessPoliciesDeleteSamples.java | 15 +- .../JitNetworkAccessPoliciesGetSamples.java | 15 +- ...tNetworkAccessPoliciesInitiateSamples.java | 43 +- ...workAccessPoliciesListByRegionSamples.java | 10 +- ...esListByResourceGroupAndRegionSamples.java | 15 +- ...essPoliciesListByResourceGroupSamples.java | 14 +- .../JitNetworkAccessPoliciesListSamples.java | 14 +- .../generated/LocationsGetSamples.java | 10 +- .../generated/LocationsListSamples.java | 10 +- .../generated/MdeOnboardingsGetSamples.java | 10 +- .../generated/MdeOnboardingsListSamples.java | 10 +- .../generated/PricingsDeleteSamples.java | 26 + .../generated/PricingsGetSamples.java | 82 +- .../generated/PricingsListSamples.java | 45 +- .../generated/PricingsUpdateSamples.java | 77 +- ...latoryComplianceAssessmentsGetSamples.java | 16 +- ...atoryComplianceAssessmentsListSamples.java | 10 +- ...egulatoryComplianceControlsGetSamples.java | 10 +- ...gulatoryComplianceControlsListSamples.java | 10 +- ...gulatoryComplianceStandardsGetSamples.java | 10 +- ...ulatoryComplianceStandardsListSamples.java | 10 +- ...ProviderGetSensitivitySettingsSamples.java | 24 + ...viderUpdateSensitivitySettingsSamples.java | 35 + ...lDefinitionsListBySubscriptionSamples.java | 13 +- ...ureScoreControlDefinitionsListSamples.java | 9 +- ...ScoreControlsListBySecureScoreSamples.java | 21 +- .../SecureScoreControlsListSamples.java | 10 +- .../generated/SecureScoresGetSamples.java | 10 +- .../generated/SecureScoresListSamples.java | 10 +- ...icationOperationCreateOrUpdateSamples.java | 39 +- ...ctorApplicationOperationDeleteSamples.java | 19 +- ...nnectorApplicationOperationGetSamples.java | 23 +- ...urityConnectorApplicationsListSamples.java | 15 +- ...curityConnectorsCreateOrUpdateSamples.java | 35 +- .../SecurityConnectorsDeleteSamples.java | 15 +- ...tyConnectorsGetByResourceGroupSamples.java | 16 +- ...yConnectorsListByResourceGroupSamples.java | 14 +- .../SecurityConnectorsListSamples.java | 14 +- .../SecurityConnectorsUpdateSamples.java | 37 +- .../SecurityContactsCreateSamples.java | 37 +- .../SecurityContactsDeleteSamples.java | 14 +- .../generated/SecurityContactsGetSamples.java | 14 +- .../SecurityContactsListSamples.java | 10 +- ...ecurityOperatorsCreateOrUpdateSamples.java | 20 +- .../SecurityOperatorsDeleteSamples.java | 20 +- .../SecurityOperatorsGetSamples.java | 15 +- .../SecurityOperatorsListSamples.java | 10 +- .../SecuritySolutionsGetSamples.java | 19 +- .../SecuritySolutionsListSamples.java | 10 +- ...sReferenceDataListByHomeRegionSamples.java | 18 +- ...ritySolutionsReferenceDataListSamples.java | 9 +- .../SensitivitySettingsListSamples.java | 24 + ...bilityAssessmentCreateOrUpdateSamples.java | 15 +- ...rVulnerabilityAssessmentDeleteSamples.java | 14 +- ...rverVulnerabilityAssessmentGetSamples.java | 14 +- ...sessmentListByExtendedResourceSamples.java | 15 +- ...essmentsSettingsCreateOrUpdateSamples.java | 31 + ...ilityAssessmentsSettingsDeleteSamples.java | 27 + ...rabilityAssessmentsSettingsGetSamples.java | 28 + ...abilityAssessmentsSettingsListSamples.java | 24 + .../generated/SettingsGetSamples.java | 14 +- .../generated/SettingsListSamples.java | 10 +- .../generated/SettingsUpdateSamples.java | 18 +- .../SoftwareInventoriesGetSamples.java | 25 +- ...entoriesListByExtendedResourceSamples.java | 20 +- .../SoftwareInventoriesListSamples.java | 10 +- ...lityAssessmentBaselineRulesAddSamples.java | 47 +- ...entBaselineRulesCreateOrUpdateSamples.java | 41 +- ...yAssessmentBaselineRulesDeleteSamples.java | 21 +- ...lityAssessmentBaselineRulesGetSamples.java | 21 +- ...ityAssessmentBaselineRulesListSamples.java | 19 +- ...bilityAssessmentScanResultsGetSamples.java | 40 +- ...ilityAssessmentScanResultsListSamples.java | 38 +- ...ulnerabilityAssessmentScansGetSamples.java | 37 +- ...lnerabilityAssessmentScansListSamples.java | 19 +- .../generated/SubAssessmentsGetSamples.java | 21 +- .../SubAssessmentsListAllSamples.java | 15 +- .../generated/SubAssessmentsListSamples.java | 18 +- ...TasksGetResourceGroupLevelTaskSamples.java | 20 +- .../TasksGetSubscriptionLevelTaskSamples.java | 16 +- .../TasksListByHomeRegionSamples.java | 10 +- .../TasksListByResourceGroupSamples.java | 14 +- .../security/generated/TasksListSamples.java | 10 +- ...ateResourceGroupLevelTaskStateSamples.java | 24 +- ...dateSubscriptionLevelTaskStateSamples.java | 23 +- .../generated/TopologyGetSamples.java | 10 +- .../TopologyListByHomeRegionSamples.java | 14 +- .../generated/TopologyListSamples.java | 10 +- .../WorkspaceSettingsCreateSamples.java | 24 +- .../WorkspaceSettingsDeleteSamples.java | 14 +- .../WorkspaceSettingsGetSamples.java | 10 +- .../WorkspaceSettingsListSamples.java | 10 +- .../WorkspaceSettingsUpdateSamples.java | 24 +- ...adConnectivityStateAutoGeneratedTests.java | 14 +- .../AadExternalSecuritySolutionTests.java | 32 +- .../generated/AadSolutionPropertiesTests.java | 33 +- .../generated/ActionableRemediationTests.java | 55 + ...tiveConnectionsNotInAllowedRangeTests.java | 33 +- ...ptiveApplicationControlGroupDataTests.java | 179 +- ...tiveApplicationControlGroupInnerTests.java | 185 +- ...iveApplicationControlGroupsInnerTests.java | 155 +- ...veApplicationControlIssueSummaryTests.java | 19 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...ationControlsGetWithResponseMockTests.java | 71 +- ...tionControlsListWithResponseMockTests.java | 48 +- ...ationControlsPutWithResponseMockTests.java | 112 +- ...veNetworkHardeningEnforceRequestTests.java | 49 +- .../AdaptiveNetworkHardeningInnerTests.java | 89 +- ...aptiveNetworkHardeningPropertiesTests.java | 92 +- ...tiveNetworkHardeningsEnforceMockTests.java | 60 +- ...orkHardeningsGetWithResponseMockTests.java | 52 +- ...eningsListByExtendedResourceMockTests.java | 56 +- .../AdaptiveNetworkHardeningsListTests.java | 139 +- .../generated/AdditionalDataTests.java | 4 +- .../AdditionalWorkspacesPropertiesTests.java | 21 +- ...vancedThreatProtectionPropertiesTests.java | 10 +- ...ncedThreatProtectionSettingInnerTests.java | 9 +- ...rotectionsCreateWithResponseMockTests.java | 37 +- ...atProtectionsGetWithResponseMockTests.java | 37 +- .../security/generated/AlertEntityTests.java | 12 +- ...lertPropertiesSupportingEvidenceTests.java | 11 +- ...imulatorBundlesRequestPropertiesTests.java | 16 +- .../AlertSimulatorRequestBodyTests.java | 17 +- .../AlertSimulatorRequestPropertiesTests.java | 13 +- .../AlertSyncSettingPropertiesTests.java | 4 +- .../generated/AlertSyncSettingsTests.java | 8 +- .../AlertsSuppressionRuleInnerTests.java | 61 +- .../AlertsSuppressionRulePropertiesTests.java | 52 +- ...ssionRulesDeleteWithResponseMockTests.java | 36 +- ...pressionRulesGetWithResponseMockTests.java | 46 +- .../AlertsSuppressionRulesListMockTests.java | 50 +- .../AlertsSuppressionRulesListTests.java | 96 +- ...ssionRulesUpdateWithResponseMockTests.java | 80 +- ...lStateToActivateWithResponseMockTests.java | 36 +- ...elStateToDismissWithResponseMockTests.java | 36 +- ...tateToInProgressWithResponseMockTests.java | 36 +- ...elStateToResolveWithResponseMockTests.java | 36 +- ...lStateToActivateWithResponseMockTests.java | 39 +- ...elStateToDismissWithResponseMockTests.java | 36 +- ...tateToInProgressWithResponseMockTests.java | 39 +- ...elStateToResolveWithResponseMockTests.java | 36 +- ...edConnectionsGetWithResponseMockTests.java | 42 +- ...dConnectionsListByHomeRegionMockTests.java | 38 +- .../AllowedConnectionsListMockTests.java | 38 +- .../AllowedConnectionsListTests.java | 8 +- .../AllowedConnectionsResourceInnerTests.java | 8 +- ...wedConnectionsResourcePropertiesTests.java | 8 +- .../AllowlistCustomAlertRuleTests.java | 18 +- ...AmqpC2DMessagesNotInAllowedRangeTests.java | 28 +- ...ejectedMessagesNotInAllowedRangeTests.java | 33 +- ...AmqpD2CMessagesNotInAllowedRangeTests.java | 32 +- .../generated/ApiCollectionInnerTests.java | 23 + .../generated/ApiCollectionListTests.java | 23 + ...nboardingsCreateWithResponseMockTests.java | 71 - .../ApiCollectionPropertiesTests.java | 33 +- .../ApiCollectionResponseInnerTests.java | 46 - .../ApiCollectionResponseListTests.java | 25 - ...anagementServiceWithResponseMockTests.java | 55 + ...piCollectionsGetWithResponseMockTests.java | 71 - ...tByAzureApiManagementServiceMockTests.java | 55 + ...llectionsListByResourceGroupMockTests.java | 55 + .../ApiCollectionsListMockTests.java | 41 +- ...piManagementApiWithResponseMockTests.java} | 45 +- ...OnboardAzureApiManagementApiMockTests.java | 54 + .../generated/ApplicationInnerTests.java | 25 +- ...nsCreateOrUpdateWithResponseMockTests.java | 56 +- ...OperationsDeleteWithResponseMockTests.java | 36 +- ...ionOperationsGetWithResponseMockTests.java | 41 +- .../generated/ApplicationPropertiesTests.java | 25 +- .../generated/ApplicationsListMockTests.java | 41 +- .../generated/ApplicationsListTests.java | 8 +- .../generated/AscLocationInnerTests.java | 11 +- .../generated/AscLocationListTests.java | 8 +- .../generated/AssessmentLinksTests.java | 4 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...teInSubscriptionWithResponseMockTests.java | 37 +- .../AtaExternalSecuritySolutionTests.java | 35 +- .../generated/AtaSolutionPropertiesTests.java | 33 +- .../AuthenticationDetailsPropertiesTests.java | 8 +- .../AutoProvisioningSettingInnerTests.java | 14 +- .../AutoProvisioningSettingListTests.java | 19 +- ...utoProvisioningSettingPropertiesTests.java | 12 +- ...ngSettingsCreateWithResponseMockTests.java | 37 +- ...oningSettingsGetWithResponseMockTests.java | 40 +- ...AutoProvisioningSettingsListMockTests.java | 39 +- .../AutomationActionEventHubTests.java | 24 +- .../AutomationActionLogicAppTests.java | 19 +- .../generated/AutomationActionTests.java | 4 +- .../AutomationActionWorkspaceTests.java | 11 +- .../generated/AutomationInnerTests.java | 77 +- .../generated/AutomationListTests.java | 136 +- .../generated/AutomationPropertiesTests.java | 98 +- .../generated/AutomationRuleSetTests.java | 37 +- .../generated/AutomationScopeTests.java | 16 +- .../generated/AutomationSourceTests.java | 52 +- .../AutomationTriggeringRuleTests.java | 32 +- .../generated/AutomationUpdateModelTests.java | 71 + .../AutomationValidationStatusInnerTests.java | 17 +- ...nsCreateOrUpdateWithResponseMockTests.java | 81 +- ...eByResourceGroupWithResponseMockTests.java | 41 +- ...tByResourceGroupWithResponseMockTests.java | 53 +- ...tomationsListByResourceGroupMockTests.java | 47 +- .../generated/AutomationsListMockTests.java | 45 +- ...omationsValidateWithResponseMockTests.java | 67 +- ...eAuthenticationDetailsPropertiesTests.java | 21 +- .../generated/AwsEnvironmentDataTests.java | 20 +- .../AwsOrganizationalDataMasterTests.java | 22 +- .../AwsOrganizationalDataMemberTests.java | 13 +- .../generated/AwsOrganizationalDataTests.java | 5 +- .../generated/AzureDevOpsOrgInnerTests.java | 74 + .../AzureDevOpsOrgListResponseInnerTests.java | 96 + .../AzureDevOpsOrgPropertiesTests.java | 67 + ...zureDevOpsOrgsCreateOrUpdateMockTests.java | 94 + ...ureDevOpsOrgsGetWithResponseMockTests.java | 76 + ...rgsListAvailableWithResponseMockTests.java | 68 + .../AzureDevOpsOrgsListMockTests.java | 78 + .../AzureDevOpsProjectInnerTests.java | 79 + .../AzureDevOpsProjectListResponseTests.java | 99 + .../AzureDevOpsProjectPropertiesTests.java | 73 + ...DevOpsProjectsCreateOrUpdateMockTests.java | 93 + ...evOpsProjectsGetWithResponseMockTests.java | 77 + .../AzureDevOpsProjectsListMockTests.java | 79 + ...ureDevOpsReposCreateOrUpdateMockTests.java | 100 + ...reDevOpsReposGetWithResponseMockTests.java | 78 + .../AzureDevOpsReposListMockTests.java | 80 + .../AzureDevOpsRepositoryInnerTests.java | 76 + ...zureDevOpsRepositoryListResponseTests.java | 108 + .../AzureDevOpsRepositoryPropertiesTests.java | 74 + .../AzureDevOpsScopeEnvironmentDataTests.java | 6 +- .../generated/AzureResourceDetailsTests.java | 4 +- .../AzureResourceIdentifierTests.java | 5 +- .../generated/AzureResourceLinkTests.java | 4 +- .../generated/AzureServersSettingTests.java | 30 + .../AzureTrackedResourceLocationTests.java | 10 +- .../BaselineAdjustedResultTests.java | 61 +- .../security/generated/BaselineTests.java | 28 +- .../generated/BenchmarkReferenceTests.java | 15 +- .../generated/BuiltInInfoTypeTests.java | 32 + .../generated/CategoryConfigurationTests.java | 30 + .../CefExternalSecuritySolutionTests.java | 46 +- .../generated/CefSolutionPropertiesTests.java | 43 +- .../generated/CloudOfferingTests.java | 6 +- .../generated/ComplianceInnerTests.java | 8 +- .../generated/ComplianceListTests.java | 19 +- .../generated/CompliancePropertiesTests.java | 8 +- .../generated/ComplianceResultInnerTests.java | 8 +- .../generated/ComplianceResultListTests.java | 13 +- .../ComplianceResultPropertiesTests.java | 4 +- ...lianceResultsGetWithResponseMockTests.java | 38 +- .../ComplianceResultsListMockTests.java | 38 +- .../generated/ComplianceSegmentTests.java | 5 +- .../CompliancesGetWithResponseMockTests.java | 38 +- .../generated/CompliancesListMockTests.java | 37 +- .../generated/ConnectableResourceTests.java | 8 +- .../generated/ConnectedResourceTests.java | 7 +- .../generated/ConnectedWorkspaceTests.java | 9 +- .../ConnectionFromIpNotAllowedTests.java | 22 +- .../ConnectionStringsInnerTests.java | 29 - .../ConnectionToIpNotAllowedTests.java | 18 +- .../generated/ConnectorSettingInnerTests.java | 42 - .../generated/ConnectorSettingListTests.java | 35 - ...rsCreateOrUpdateWithResponseMockTests.java | 81 - ...ConnectorsDeleteWithResponseMockTests.java | 36 +- .../ConnectorsGetWithResponseMockTests.java | 70 - .../generated/ConnectorsListMockTests.java | 70 - ...rRegistryVulnerabilityPropertiesTests.java | 8 +- ...AwsOfferingNativeCloudConnectionTests.java | 13 +- .../CspmMonitorAwsOfferingTests.java | 18 +- .../CspmMonitorAzureDevOpsOfferingTests.java | 5 +- ...GcpOfferingNativeCloudConnectionTests.java | 21 +- .../CspmMonitorGcpOfferingTests.java | 25 +- .../CspmMonitorGitLabOfferingTests.java | 5 +- .../CspmMonitorGithubOfferingTests.java | 5 +- .../generated/CustomAlertRuleTests.java | 14 +- ...smentAutomationRequestPropertiesTests.java | 44 +- ...ustomAssessmentAutomationRequestTests.java | 40 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...CustomEntityStoreAssignmentInnerTests.java | 22 +- ...mEntityStoreAssignmentPropertiesTests.java | 19 +- ...StoreAssignmentRequestPropertiesTests.java | 14 +- ...stomEntityStoreAssignmentRequestTests.java | 12 +- ...ssignmentsCreateWithResponseMockTests.java | 46 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...tByResourceGroupWithResponseMockTests.java | 44 +- ...signmentsListByResourceGroupMockTests.java | 41 +- ...omEntityStoreAssignmentsListMockTests.java | 41 +- ...EntityStoreAssignmentsListResultTests.java | 16 +- .../security/generated/CveTests.java | 2 +- .../security/generated/CvssTests.java | 2 +- .../DataExportSettingPropertiesTests.java | 4 +- .../generated/DataExportSettingsTests.java | 8 +- ...nderCspmAwsOfferingCiemDiscoveryTests.java | 25 + .../DefenderCspmAwsOfferingCiemOidcTests.java | 29 + .../DefenderCspmAwsOfferingCiemTests.java | 35 + ...OfferingDataSensitivityDiscoveryTests.java | 17 +- ...nderCspmAwsOfferingDatabasesDspmTests.java | 17 +- ...cContainersAgentlessDiscoveryK8STests.java | 30 + ...ringMdcContainersImageAssessmentTests.java | 29 + .../DefenderCspmAwsOfferingTests.java | 83 +- ...sOfferingVmScannersConfigurationTests.java | 26 +- ...efenderCspmAwsOfferingVmScannersTests.java | 38 +- ...nderCspmGcpOfferingCiemDiscoveryTests.java | 32 + ...OfferingDataSensitivityDiscoveryTests.java | 32 + ...cContainersAgentlessDiscoveryK8STests.java | 33 + ...ringMdcContainersImageAssessmentTests.java | 32 + .../DefenderCspmGcpOfferingTests.java | 78 +- ...pOfferingVmScannersConfigurationTests.java | 46 + ...efenderCspmGcpOfferingVmScannersTests.java | 49 + ...ArcAutoProvisioningConfigurationTests.java | 24 +- ...esAwsOfferingArcAutoProvisioningTests.java | 32 +- ...atabasesAwsOfferingDatabasesDspmTests.java | 13 +- ...efenderFoDatabasesAwsOfferingRdsTests.java | 17 +- .../DefenderFoDatabasesAwsOfferingTests.java | 55 +- ...rsAwsOfferingCloudWatchToKinesisTests.java | 13 +- ...ainerVulnerabilityAssessmentTaskTests.java | 21 +- ...ContainerVulnerabilityAssessmentTests.java | 19 +- ...ContainersAwsOfferingKinesisToS3Tests.java | 13 +- ...AwsOfferingKubernetesScubaReaderTests.java | 13 +- ...nersAwsOfferingKubernetesServiceTests.java | 13 +- ...cContainersAgentlessDiscoveryK8STests.java | 31 + ...ringMdcContainersImageAssessmentTests.java | 31 + ...DefenderForContainersAwsOfferingTests.java | 95 +- ...ataPipelineNativeCloudConnectionTests.java | 27 +- ...cContainersAgentlessDiscoveryK8STests.java | 34 + ...ringMdcContainersImageAssessmentTests.java | 34 + ...GcpOfferingNativeCloudConnectionTests.java | 23 +- ...DefenderForContainersGcpOfferingTests.java | 78 +- ...ArcAutoProvisioningConfigurationTests.java | 26 +- ...esGcpOfferingArcAutoProvisioningTests.java | 31 +- ...rForDatabasesArcAutoProvisioningTests.java | 29 +- .../DefenderForDatabasesGcpOfferingTests.java | 50 +- ...nderForDevOpsAzureDevOpsOfferingTests.java | 7 +- .../DefenderForDevOpsGitLabOfferingTests.java | 5 +- .../DefenderForDevOpsGithubOfferingTests.java | 5 +- ...ArcAutoProvisioningConfigurationTests.java | 24 +- ...rsAwsOfferingArcAutoProvisioningTests.java | 32 +- ...ersAwsOfferingDefenderForServersTests.java | 14 +- ...rsAwsOfferingMdeAutoProvisioningTests.java | 9 +- ...nderForServersAwsOfferingSubPlanTests.java | 4 +- .../DefenderForServersAwsOfferingTests.java | 99 +- ...gVaAutoProvisioningConfigurationTests.java | 17 +- ...ersAwsOfferingVaAutoProvisioningTests.java | 17 +- ...sOfferingVmScannersConfigurationTests.java | 34 +- ...rForServersAwsOfferingVmScannersTests.java | 30 +- ...ArcAutoProvisioningConfigurationTests.java | 24 +- ...rsGcpOfferingArcAutoProvisioningTests.java | 27 +- ...ersGcpOfferingDefenderForServersTests.java | 21 +- ...rsGcpOfferingMdeAutoProvisioningTests.java | 13 +- ...nderForServersGcpOfferingSubPlanTests.java | 10 +- .../DefenderForServersGcpOfferingTests.java | 99 +- ...gVaAutoProvisioningConfigurationTests.java | 18 +- ...ersGcpOfferingVaAutoProvisioningTests.java | 13 +- ...pOfferingVmScannersConfigurationTests.java | 22 +- ...rForServersGcpOfferingVmScannersTests.java | 28 +- .../DenylistCustomAlertRuleTests.java | 22 +- .../DevOpsConfigurationsDeleteMockTests.java | 51 + ...rationResultsGetWithResponseMockTests.java | 76 + .../DeviceSecurityGroupInnerTests.java | 96 +- .../DeviceSecurityGroupListTests.java | 121 +- .../DeviceSecurityGroupPropertiesTests.java | 94 +- ...psCreateOrUpdateWithResponseMockTests.java | 85 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...ecurityGroupsGetWithResponseMockTests.java | 54 +- .../DeviceSecurityGroupsListMockTests.java | 54 +- ...ctMethodInvokesNotInAllowedRangeTests.java | 32 +- .../DiscoveredSecuritySolutionInnerTests.java | 32 +- .../DiscoveredSecuritySolutionListTests.java | 52 +- ...overedSecuritySolutionPropertiesTests.java | 30 +- ...ritySolutionsGetWithResponseMockTests.java | 54 +- ...itySolutionsListByHomeRegionMockTests.java | 51 +- ...coveredSecuritySolutionsListMockTests.java | 43 +- .../EffectiveNetworkSecurityGroupsTests.java | 23 +- .../generated/EnvironmentDataTests.java | 4 +- .../generated/EnvironmentDetailsTests.java | 38 +- .../security/generated/EtagTests.java | 8 +- .../ExecuteGovernanceRuleParamsTests.java | 4 +- .../ExternalSecuritySolutionInnerTests.java | 8 +- .../ExternalSecuritySolutionListTests.java | 13 +- ...ternalSecuritySolutionPropertiesTests.java | 30 +- ...ritySolutionsGetWithResponseMockTests.java | 41 +- ...itySolutionsListByHomeRegionMockTests.java | 38 +- ...xternalSecuritySolutionsListMockTests.java | 38 +- ...iledLocalLoginsNotInAllowedRangeTests.java | 28 +- .../FileUploadsNotInAllowedRangeTests.java | 32 +- .../GcpOrganizationalDataMemberTests.java | 22 +- ...cpOrganizationalDataOrganizationTests.java | 28 +- .../generated/GcpOrganizationalDataTests.java | 5 +- .../generated/GcpProjectDetailsTests.java | 19 +- .../GcpProjectEnvironmentDataTests.java | 26 +- ...itivitySettingsListResponseInnerTests.java | 72 + ...SensitivitySettingsResponseInnerTests.java | 86 + ...ResponsePropertiesMipInformationTests.java | 74 + ...tivitySettingsResponsePropertiesTests.java | 92 + .../generated/GitHubOwnerInnerTests.java | 33 + .../GitHubOwnerListResponseInnerTests.java | 49 + .../generated/GitHubOwnerPropertiesTests.java | 32 + .../GitHubOwnersGetWithResponseMockTests.java | 59 + ...ersListAvailableWithResponseMockTests.java | 61 + .../generated/GitHubOwnersListMockTests.java | 62 + .../GitHubReposGetWithResponseMockTests.java | 61 + .../generated/GitHubReposListMockTests.java | 62 + .../generated/GitHubRepositoryInnerTests.java | 35 + .../GitHubRepositoryListResponseTests.java | 56 + .../GitHubRepositoryPropertiesTests.java | 34 + .../generated/GitLabGroupInnerTests.java | 33 + .../GitLabGroupListResponseInnerTests.java | 41 + .../generated/GitLabGroupPropertiesTests.java | 32 + .../GitLabGroupsGetWithResponseMockTests.java | 59 + ...upsListAvailableWithResponseMockTests.java | 61 + .../generated/GitLabGroupsListMockTests.java | 62 + .../generated/GitLabProjectInnerTests.java | 33 + .../GitLabProjectListResponseTests.java | 50 + .../GitLabProjectPropertiesTests.java | 32 + ...itLabProjectsGetWithResponseMockTests.java | 60 + .../GitLabProjectsListMockTests.java | 62 + ...LabSubgroupsListWithResponseMockTests.java | 63 + .../GithubScopeEnvironmentDataTests.java | 4 +- .../GitlabScopeEnvironmentDataTests.java | 4 +- ...vernanceAssignmentAdditionalDataTests.java | 24 +- .../GovernanceAssignmentInnerTests.java | 67 +- .../GovernanceAssignmentPropertiesTests.java | 75 +- ...tsCreateOrUpdateWithResponseMockTests.java | 84 +- ...ssignmentsDeleteWithResponseMockTests.java | 36 +- ...ceAssignmentsGetWithResponseMockTests.java | 56 +- .../GovernanceAssignmentsListMockTests.java | 69 +- .../GovernanceAssignmentsListTests.java | 8 +- .../GovernanceEmailNotificationTests.java | 13 +- .../GovernanceRuleEmailNotificationTests.java | 17 +- .../generated/GovernanceRuleInnerTests.java | 74 +- .../generated/GovernanceRuleListTests.java | 8 +- .../GovernanceRuleMetadataTests.java | 8 +- .../GovernanceRuleOwnerSourceTests.java | 18 +- .../GovernanceRulePropertiesTests.java | 77 +- ...esCreateOrUpdateWithResponseMockTests.java | 91 +- .../GovernanceRulesDeleteMockTests.java | 36 +- ...vernanceRulesGetWithResponseMockTests.java | 56 +- .../GovernanceRulesListMockTests.java | 69 +- ...OperationResultsWithResponseMockTests.java | 39 +- .../HealthDataClassificationTests.java | 25 +- .../generated/HealthReportsListTests.java | 25 - ...HttpC2DMessagesNotInAllowedRangeTests.java | 33 +- ...ejectedMessagesNotInAllowedRangeTests.java | 29 +- ...HttpD2CMessagesNotInAllowedRangeTests.java | 28 +- .../security/generated/IdentityTests.java | 7 +- .../security/generated/InfoTypeTests.java | 33 + ...AwsOfferingInformationProtectionTests.java | 13 +- ...InformationProtectionAwsOfferingTests.java | 18 +- .../InformationProtectionKeywordTests.java | 24 +- ...esCreateOrUpdateWithResponseMockTests.java | 84 - ...ctionPoliciesGetWithResponseMockTests.java | 68 - ...mationProtectionPoliciesListMockTests.java | 65 - .../InformationProtectionPolicyListTests.java | 46 - .../IngestionConnectionStringTests.java | 24 - .../generated/IngestionSettingInnerTests.java | 24 - .../generated/IngestionSettingListTests.java | 25 - ...onnectionStringsWithResponseMockTests.java | 67 - .../IoTSecurityAggregatedAlertInnerTests.java | 17 +- .../IoTSecurityAggregatedAlertListTests.java | 24 +- ...ecurityAggregatedAlertPropertiesTests.java | 8 +- ...lertPropertiesTopDevicesListItemTests.java | 12 +- ...ityAggregatedRecommendationInnerTests.java | 32 +- ...rityAggregatedRecommendationListTests.java | 46 +- ...gregatedRecommendationPropertiesTests.java | 16 +- .../IoTSecurityAlertedDeviceTests.java | 5 +- .../IoTSecurityDeviceAlertTests.java | 8 +- .../IoTSecurityDeviceRecommendationTests.java | 8 +- ...uritySolutionAnalyticsModelInnerTests.java | 31 +- ...ySolutionAnalyticsModelListInnerTests.java | 31 +- ...odelPropertiesDevicesMetricsItemTests.java | 40 +- ...SolutionAnalyticsModelPropertiesTests.java | 34 +- .../IoTSecuritySolutionModelInnerTests.java | 138 +- .../IoTSecuritySolutionPropertiesTests.java | 165 +- .../IoTSecuritySolutionsListTests.java | 184 +- .../generated/IoTSeverityMetricsTests.java | 26 +- ...tionAnalyticsGetWithResponseMockTests.java | 41 +- ...ionAnalyticsListWithResponseMockTests.java | 41 +- ...tedAlertsDismissWithResponseMockTests.java | 39 +- ...regatedAlertsGetWithResponseMockTests.java | 43 +- ...nalyticsAggregatedAlertsListMockTests.java | 41 +- ...commendationsGetWithResponseMockTests.java | 44 +- ...AnalyticsRecommendationsListMockTests.java | 44 +- ...nsCreateOrUpdateWithResponseMockTests.java | 126 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...tByResourceGroupWithResponseMockTests.java | 69 +- ...SolutionsListByResourceGroupMockTests.java | 64 +- .../IotSecuritySolutionsListMockTests.java | 64 +- ...esCreateOrUpdateWithResponseMockTests.java | 80 +- ...ssPoliciesDeleteWithResponseMockTests.java | 39 +- ...ccessPoliciesGetWithResponseMockTests.java | 54 +- ...PoliciesInitiateWithResponseMockTests.java | 108 +- ...rkAccessPoliciesListByRegionMockTests.java | 53 +- ...ListByResourceGroupAndRegionMockTests.java | 55 +- ...sPoliciesListByResourceGroupMockTests.java | 56 +- ...JitNetworkAccessPoliciesListMockTests.java | 54 +- .../JitNetworkAccessPoliciesListTests.java | 166 +- ...tNetworkAccessPolicyInitiatePortTests.java | 27 +- ...tworkAccessPolicyInitiateRequestTests.java | 73 +- ...cessPolicyInitiateVirtualMachineTests.java | 43 +- .../JitNetworkAccessPolicyInnerTests.java | 230 +- ...JitNetworkAccessPolicyPropertiesTests.java | 209 +- ...etworkAccessPolicyVirtualMachineTests.java | 79 +- .../JitNetworkAccessPortRuleTests.java | 39 +- .../JitNetworkAccessRequestInnerTests.java | 70 +- .../JitNetworkAccessRequestPortTests.java | 50 +- ...tworkAccessRequestVirtualMachineTests.java | 90 +- .../generated/KindAutoGeneratedTests.java | 9 +- .../security/generated/LabelTests.java | 32 + .../generated/ListCustomAlertRuleTests.java | 14 +- .../generated/LocalUserNotAllowedTests.java | 22 +- .../security/generated/LocationTests.java | 2 +- .../LocationsGetWithResponseMockTests.java | 37 +- .../generated/LocationsListMockTests.java | 34 +- .../LogAnalyticsIdentifierTests.java | 8 +- .../MdeOnboardingDataInnerTests.java | 6 +- .../MdeOnboardingDataListInnerTests.java | 16 +- ...deOnboardingsGetWithResponseMockTests.java | 40 +- ...eOnboardingsListWithResponseMockTests.java | 41 +- ...MqttC2DMessagesNotInAllowedRangeTests.java | 32 +- ...ejectedMessagesNotInAllowedRangeTests.java | 29 +- ...MqttD2CMessagesNotInAllowedRangeTests.java | 33 +- .../NotificationsSourceAlertTests.java | 26 + .../NotificationsSourceAttackPathTests.java | 28 + .../generated/NotificationsSourceTests.java | 22 + .../OnPremiseResourceDetailsTests.java | 32 +- .../OnPremiseSqlResourceDetailsTests.java | 43 +- .../generated/OnUploadPropertiesTests.java | 27 + .../generated/OperationDisplayTests.java | 8 +- .../generated/OperationInnerTests.java | 8 +- .../generated/OperationListTests.java | 18 +- ...perationResultAutoGeneratedInnerTests.java | 4 +- .../OperationStatusResultInnerTests.java | 109 + .../generated/PathRecommendationTests.java | 91 +- .../security/generated/PricingInnerTests.java | 61 - .../generated/PricingListInnerTests.java | 61 +- ...ByResourceGroupWithResponseMockTests.java} | 38 +- .../PricingsGetWithResponseMockTests.java | 68 - .../PricingsListWithResponseMockTests.java | 50 +- .../PricingsUpdateWithResponseMockTests.java | 80 - .../generated/ProcessNotAllowedTests.java | 16 +- .../generated/ProtectionModeTests.java | 19 +- .../generated/ProxyServerPropertiesTests.java | 14 +- .../generated/PublisherInfoTests.java | 32 +- .../security/generated/QueryCheckTests.java | 34 +- .../QueuePurgesNotInAllowedRangeTests.java | 28 +- ...mendationConfigurationPropertiesTests.java | 23 +- ...ulatoryComplianceAssessmentInnerTests.java | 14 +- ...gulatoryComplianceAssessmentListTests.java | 24 +- ...ryComplianceAssessmentPropertiesTests.java | 16 +- ...ceAssessmentsGetWithResponseMockTests.java | 40 +- ...oryComplianceAssessmentsListMockTests.java | 39 +- ...RegulatoryComplianceControlInnerTests.java | 14 +- .../RegulatoryComplianceControlListTests.java | 20 +- ...atoryComplianceControlPropertiesTests.java | 12 +- ...ianceControlsGetWithResponseMockTests.java | 42 +- ...latoryComplianceControlsListMockTests.java | 41 +- ...egulatoryComplianceStandardInnerTests.java | 14 +- ...RegulatoryComplianceStandardListTests.java | 22 +- ...toryComplianceStandardPropertiesTests.java | 16 +- ...anceStandardsGetWithResponseMockTests.java | 42 +- ...atoryComplianceStandardsListMockTests.java | 39 +- .../generated/RemediationEtaTests.java | 20 +- .../security/generated/RemediationTests.java | 33 +- .../ResourceDetailsAutoGeneratedTests.java | 13 +- .../generated/ResourceDetailsTests.java | 4 +- .../generated/ResourceIdentifierTests.java | 4 +- ...sitivitySettingsWithResponseMockTests.java | 77 + ...sitivitySettingsWithResponseMockTests.java | 85 + .../generated/RuleResultsInnerTests.java | 19 +- .../generated/RuleResultsInputTests.java | 22 +- .../generated/RuleResultsPropertiesTests.java | 17 +- .../security/generated/RuleTests.java | 30 +- .../generated/RulesResultsInnerTests.java | 29 +- .../generated/RulesResultsInputTests.java | 39 +- .../security/generated/ScanInnerTests.java | 94 +- .../generated/ScanPropertiesTests.java | 88 +- .../generated/ScanResultInnerTests.java | 153 +- .../generated/ScanResultPropertiesTests.java | 182 +- .../generated/ScanResultsInnerTests.java | 194 +- .../security/generated/ScansInnerTests.java | 121 +- .../security/generated/ScopeElementTests.java | 15 +- .../security/generated/ScoreDetailsTests.java | 7 +- ...eScoreControlDefinitionItemInnerTests.java | 8 +- ...eControlDefinitionItemPropertiesTests.java | 8 +- ...SecureScoreControlDefinitionListTests.java | 8 +- ...cureScoreControlDefinitionSourceTests.java | 12 +- ...efinitionsListBySubscriptionMockTests.java | 38 +- ...eScoreControlDefinitionsListMockTests.java | 38 +- .../SecureScoreControlDetailsInnerTests.java | 12 +- .../SecureScoreControlListTests.java | 8 +- ...ureScoreControlScoreDetailsInnerTests.java | 12 +- ...oreControlsListBySecureScoreMockTests.java | 40 +- .../SecureScoreControlsListMockTests.java | 38 +- .../generated/SecureScoreItemInnerTests.java | 8 +- .../SecureScoreItemPropertiesTests.java | 8 +- .../SecureScoresGetWithResponseMockTests.java | 38 +- .../generated/SecureScoresListMockTests.java | 34 +- .../generated/SecureScoresListTests.java | 8 +- .../SecurityAssessmentListTests.java | 25 - ...taPropertiesResponsePublishDatesTests.java | 18 +- ...tyAssessmentMetadataResponseListTests.java | 25 - ...nsCreateOrUpdateWithResponseMockTests.java | 58 +- ...OperationsDeleteWithResponseMockTests.java | 39 +- ...ionOperationsGetWithResponseMockTests.java | 44 +- ...ityConnectorApplicationsListMockTests.java | 51 +- .../SecurityConnectorInnerTests.java | 35 +- .../SecurityConnectorPropertiesTests.java | 25 +- ...rsCreateOrUpdateWithResponseMockTests.java | 60 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...tByResourceGroupWithResponseMockTests.java | 54 +- ...onnectorsListByResourceGroupMockTests.java | 51 +- .../SecurityConnectorsListMockTests.java | 41 +- .../SecurityConnectorsListTests.java | 69 +- .../generated/SecurityContactInnerTests.java | 47 +- .../generated/SecurityContactListTests.java | 43 +- ...tactPropertiesAlertNotificationsTests.java | 34 - ...actPropertiesNotificationsByRoleTests.java | 21 +- .../SecurityContactPropertiesTests.java | 53 +- ...tyContactsCreateWithResponseMockTests.java | 69 +- ...tyContactsDeleteWithResponseMockTests.java | 37 +- ...urityContactsGetWithResponseMockTests.java | 56 +- .../SecurityContactsListMockTests.java | 47 +- .../generated/SecurityOperatorInnerTests.java | 12 +- .../SecurityOperatorListInnerTests.java | 19 +- ...rsCreateOrUpdateWithResponseMockTests.java | 40 +- ...eByResourceGroupWithResponseMockTests.java | 39 +- ...rityOperatorsGetWithResponseMockTests.java | 37 +- ...ityOperatorsListWithResponseMockTests.java | 44 +- .../generated/SecuritySolutionInnerTests.java | 25 +- .../generated/SecuritySolutionListTests.java | 54 +- .../SecuritySolutionPropertiesTests.java | 32 +- ...ritySolutionsGetWithResponseMockTests.java | 46 +- .../SecuritySolutionsListMockTests.java | 37 +- ...ySolutionsReferenceDataListInnerTests.java | 53 +- ...SolutionsReferenceDataPropertiesTests.java | 49 +- .../SecuritySolutionsReferenceDataTests.java | 49 +- ...ListByHomeRegionWithResponseMockTests.java | 50 +- ...ferenceDatasListWithResponseMockTests.java | 47 +- .../SecuritySubAssessmentListTests.java | 25 - .../generated/SecurityTaskInnerTests.java | 15 +- .../generated/SecurityTaskListTests.java | 8 +- .../SecurityTaskParametersTests.java | 12 +- .../SecurityTaskPropertiesTests.java | 15 +- .../generated/SensitivityLabelTests.java | 33 +- ...vitySettingsListWithResponseMockTests.java | 64 + ...rverVulnerabilityAssessmentInnerTests.java | 8 +- ...ulnerabilityAssessmentPropertiesTests.java | 5 +- ...ssessmentsAzureSettingPropertiesTests.java | 31 + ...tsCreateOrUpdateWithResponseMockTests.java | 43 +- ...lnerabilityAssessmentsDeleteMockTests.java | 39 +- ...tyAssessmentsGetWithResponseMockTests.java | 42 +- ...ExtendedResourceWithResponseMockTests.java | 43 +- ...ulnerabilityAssessmentsListInnerTests.java | 14 +- ...erabilityAssessmentsSettingInnerTests.java | 23 + ...gsCreateOrUpdateWithResponseMockTests.java | 58 + ...sSettingsDeleteWithResponseMockTests.java} | 42 +- ...entsSettingsGetWithResponseMockTests.java} | 45 +- ...lityAssessmentsSettingsListMockTests.java} | 41 +- ...erabilityAssessmentsSettingsListTests.java | 23 + .../ServerVulnerabilityPropertiesTests.java | 8 +- .../security/generated/SettingInnerTests.java | 8 +- .../SettingsGetWithResponseMockTests.java | 42 +- .../generated/SettingsListMockTests.java | 34 +- .../security/generated/SettingsListTests.java | 11 +- .../SettingsUpdateWithResponseMockTests.java | 44 +- .../generated/SoftwareInnerTests.java | 59 +- ...reInventoriesGetWithResponseMockTests.java | 59 +- ...toriesListByExtendedResourceMockTests.java | 60 +- .../SoftwareInventoriesListMockTests.java | 53 +- .../generated/SoftwarePropertiesTests.java | 55 +- .../generated/SoftwaresListTests.java | 72 +- ...SqlServerVulnerabilityPropertiesTests.java | 9 +- ...BaselineRulesAddWithResponseMockTests.java | 63 +- ...esCreateOrUpdateWithResponseMockTests.java | 53 +- ...elineRulesDeleteWithResponseMockTests.java | 39 +- ...BaselineRulesGetWithResponseMockTests.java | 42 +- ...aselineRulesListWithResponseMockTests.java | 43 +- ...ntScanResultsGetWithResponseMockTests.java | 86 +- ...tScanResultsListWithResponseMockTests.java | 61 +- ...sessmentScansGetWithResponseMockTests.java | 70 +- ...essmentScansListWithResponseMockTests.java | 62 +- .../SuppressionAlertsScopeTests.java | 20 +- .../security/generated/TagsResourceTests.java | 14 +- .../security/generated/TagsTests.java | 13 +- .../TargetBranchConfigurationTests.java | 32 + ...ceGroupLevelTaskWithResponseMockTests.java | 43 +- ...riptionLevelTaskWithResponseMockTests.java | 42 +- .../TasksListByHomeRegionMockTests.java | 38 +- .../TasksListByResourceGroupMockTests.java | 38 +- .../generated/TasksListMockTests.java | 36 +- ...upLevelTaskStateWithResponseMockTests.java | 36 +- ...onLevelTaskStateWithResponseMockTests.java | 36 +- .../ThresholdCustomAlertRuleTests.java | 23 +- .../TimeWindowCustomAlertRuleTests.java | 28 +- .../TopologiesGetWithResponseMockTests.java | 41 +- .../TopologiesListByHomeRegionMockTests.java | 38 +- .../generated/TopologiesListMockTests.java | 34 +- .../security/generated/TopologyListTests.java | 8 +- .../generated/TopologyResourceInnerTests.java | 8 +- .../TopologyResourcePropertiesTests.java | 8 +- .../TopologySingleResourceChildTests.java | 4 +- .../TopologySingleResourceParentTests.java | 4 +- .../TopologySingleResourceTests.java | 8 +- .../generated/TrackedResourceTests.java | 33 +- .../TwinUpdatesNotInAllowedRangeTests.java | 29 +- ...rizedOperationsNotInAllowedRangeTests.java | 29 +- ...ateIoTSecuritySolutionPropertiesTests.java | 60 +- .../UpdateIotSecuritySolutionDataTests.java | 72 +- ...UpdateSensitivitySettingsRequestTests.java | 39 + .../UserDefinedResourcesPropertiesTests.java | 20 +- .../generated/UserRecommendationTests.java | 13 +- .../security/generated/VaRuleTests.java | 90 +- .../generated/VendorReferenceTests.java | 4 +- .../generated/VmRecommendationTests.java | 29 +- .../generated/WorkspaceSettingInnerTests.java | 20 +- .../generated/WorkspaceSettingListTests.java | 26 +- .../WorkspaceSettingPropertiesTests.java | 17 +- ...ceSettingsCreateWithResponseMockTests.java | 46 +- ...ceSettingsDeleteWithResponseMockTests.java | 36 +- ...spaceSettingsGetWithResponseMockTests.java | 41 +- .../WorkspaceSettingsListMockTests.java | 37 +- 1940 files changed, 77199 insertions(+), 50507 deletions(-) delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOffboardingsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOnboardingsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsOrgsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsProjectsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsReposClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DefenderForStoragesClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsConfigurationsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsOperationResultsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubOwnersClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubReposClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabGroupsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabProjectsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabSubgroupsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IngestionSettingsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ResourceProvidersClient.java rename sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/{HealthReportOperationsClient.java => SensitivitySettingsClient.java} (52%) create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsSettingsClient.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionResponseInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgListResponseInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsProjectInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsRepositoryInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectionStringsInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DevOpsConfigurationInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GetSensitivitySettingsListResponseInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GetSensitivitySettingsResponseInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerListResponseInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubRepositoryInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupListResponseInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabProjectInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingTokenInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MalwareScanningProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnUploadProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationStatusResultInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SensitiveDataDiscoveryProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ServerVulnerabilityAssessmentsAzureSettingProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ServerVulnerabilityAssessmentsSettingInner.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionResponseImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgListResponseImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsRepositoryImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectionStringsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStorageSettingImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsListResponseImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsResponseImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerListResponseImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubRepositoryImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupListResponseImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingTokenImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationStatusResultImpl.java rename sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/{Utils.java => ResourceManagerUtils.java} (79%) create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsClientImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsImpl.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediation.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediationState.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AnnotateDefaultBranchState.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollection.java rename sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/{ApiCollectionResponseList.java => ApiCollectionList.java} (77%) delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOffboardings.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOnboardings.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Authorization.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoDiscovery.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationUpdateModel.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrg.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgs.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProject.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjects.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepos.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepository.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureServersSetting.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BuiltInInfoType.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CategoryConfiguration.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionStrings.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiem.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemDiscovery.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemOidc.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersImageAssessment.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmGcpOfferingCiemDiscovery.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmGcpOfferingDataSensitivityDiscovery.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmGcpOfferingMdcContainersImageAssessment.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmGcpOfferingVmScanners.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmGcpOfferingVmScannersConfiguration.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorageSetting.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorages.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfiguration.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurations.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsOperationResults.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsProvisioningState.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Enforce.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponseProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponsePropertiesMipInformation.java rename sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/{ApiCollectionResponse.java => GitHubOwner.java} (52%) create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitHubOwnerListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitHubOwnerProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitHubOwners.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitHubRepos.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitHubRepository.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitHubRepositoryListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitHubRepositoryProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabGroup.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabGroupListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabGroupProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabGroups.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabProject.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabProjectListResponse.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabProjectProperties.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabProjects.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitLabSubgroups.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/InfoType.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IngestionConnectionString.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IngestionSetting.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IngestionSettingToken.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IngestionSettings.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/InheritFromParentState.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Inherited.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Label.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MinimalRiskLevel.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MipIntegrationStatus.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NotificationsSource.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NotificationsSourceAlert.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NotificationsSourceAttackPath.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnboardingState.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OperationStatusAutoGenerated.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OperationStatusResult.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResourceProviders.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResourcesCoverageStatus.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Roles.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RuleCategory.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScopeName.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityContactName.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityContactPropertiesAlertNotifications.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityContactRole.java rename sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/{HealthReportOperations.java => SensitivitySettings.java} (51%) create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityAssessmentsAzureSettingSelectedProvider.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityAssessmentsSetting.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityAssessmentsSettingKind.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityAssessmentsSettingKindName.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityAssessmentsSettings.java rename sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/{IngestionSettingList.java => ServerVulnerabilityAssessmentsSettingsList.java} (58%) create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SettingNameAutoGenerated.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SourceType.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TargetBranchConfiguration.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/UpdateSensitivitySettingsRequest.java create mode 100644 sdk/security/azure-resourcemanager-security/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-security/proxy-config.json create mode 100644 sdk/security/azure-resourcemanager-security/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-security/reflect-config.json delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionGetSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionListSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionOffboardingDeleteSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionOnboardingCreateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionsGetByAzureApiManagementServiceSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionsListByAzureApiManagementServiceSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionsListByResourceGroupSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionsOffboardAzureApiManagementApiSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ApiCollectionsOnboardAzureApiManagementApiSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AutomationsUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsCreateOrUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsListAvailableSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectsCreateOrUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectsGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectsUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsReposCreateOrUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsReposGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsReposListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/AzureDevOpsReposUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DefenderForStorageCreateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DefenderForStorageGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DevOpsConfigurationsCreateOrUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DevOpsConfigurationsDeleteSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DevOpsConfigurationsGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DevOpsConfigurationsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DevOpsConfigurationsUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/DevOpsOperationResultsGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitHubOwnersGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitHubOwnersListAvailableSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitHubOwnersListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitHubReposGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitHubReposListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitLabGroupsGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitLabGroupsListAvailableSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitLabGroupsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitLabProjectsGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitLabProjectsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/GitLabSubgroupsListSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/HealthReportOperationGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/HealthReportsGetSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/IngestionSettingsCreateSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/IngestionSettingsDeleteSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/IngestionSettingsGetSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/IngestionSettingsListConnectionStringsSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/IngestionSettingsListSamples.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/IngestionSettingsListTokensSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsDeleteSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ResourceProviderGetSensitivitySettingsSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ResourceProviderUpdateSensitivitySettingsSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SensitivitySettingsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsSettingsCreateOrUpdateSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsSettingsDeleteSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsSettingsGetSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsSettingsListSamples.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ActionableRemediationTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionListTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionOnboardingsCreateWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseInnerTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseListTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsGetByAzureApiManagementServiceWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsListByAzureApiManagementServiceMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsListByResourceGroupMockTests.java rename sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/{IngestionSettingsCreateWithResponseMockTests.java => ApiCollectionsOffboardAzureApiManagementApiWithResponseMockTests.java} (52%) create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsOnboardAzureApiManagementApiMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationUpdateModelTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgListResponseInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsCreateOrUpdateMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsListAvailableWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsOrgsListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectListResponseTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectsCreateOrUpdateMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectsGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsProjectsListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsReposCreateOrUpdateMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsReposGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsReposListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsRepositoryInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsRepositoryListResponseTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsRepositoryPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureServersSettingTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BuiltInInfoTypeTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CategoryConfigurationTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionStringsInnerTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingInnerTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingListTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsGetWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingCiemDiscoveryTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingCiemOidcTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingCiemTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8STests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingMdcContainersImageAssessmentTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingCiemDiscoveryTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingDataSensitivityDiscoveryTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8STests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingMdcContainersImageAssessmentTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingVmScannersConfigurationTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingVmScannersTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8STests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingMdcContainersImageAssessmentTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8STests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingMdcContainersImageAssessmentTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DevOpsConfigurationsDeleteMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DevOpsOperationResultsGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GetSensitivitySettingsListResponseInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GetSensitivitySettingsResponseInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GetSensitivitySettingsResponsePropertiesMipInformationTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GetSensitivitySettingsResponsePropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubOwnerInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubOwnerListResponseInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubOwnerPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubOwnersGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubOwnersListAvailableWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubOwnersListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubReposGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubReposListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubRepositoryInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubRepositoryListResponseTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitHubRepositoryPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabGroupInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabGroupListResponseInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabGroupPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabGroupsGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabGroupsListAvailableWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabGroupsListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabProjectInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabProjectListResponseTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabProjectPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabProjectsGetWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabProjectsListMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GitLabSubgroupsListWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HealthReportsListTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InfoTypeTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionPoliciesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionPoliciesGetWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionPoliciesListMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionPolicyListTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/IngestionConnectionStringTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/IngestionSettingInnerTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/IngestionSettingListTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/IngestionSettingsListConnectionStringsWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/LabelTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/NotificationsSourceAlertTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/NotificationsSourceAttackPathTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/NotificationsSourceTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/OnUploadPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/OperationStatusResultInnerTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/PricingInnerTests.java rename sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/{IngestionSettingsDeleteWithResponseMockTests.java => PricingsDeleteByResourceGroupWithResponseMockTests.java} (59%) delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/PricingsGetWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/PricingsUpdateWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ResourceProvidersGetSensitivitySettingsWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ResourceProvidersUpdateSensitivitySettingsWithResponseMockTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/SecurityAssessmentListTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/SecurityAssessmentMetadataResponseListTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/SecurityContactPropertiesAlertNotificationsTests.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/SecuritySubAssessmentListTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/SensitivitySettingsListWithResponseMockTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsAzureSettingPropertiesTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsSettingInnerTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsSettingsCreateOrUpdateWithResponseMockTests.java rename sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/{ApiCollectionOffboardingsDeleteWithResponseMockTests.java => ServerVulnerabilityAssessmentsSettingsDeleteWithResponseMockTests.java} (57%) rename sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/{IngestionSettingsGetWithResponseMockTests.java => ServerVulnerabilityAssessmentsSettingsGetWithResponseMockTests.java} (52%) rename sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/{IngestionSettingsListMockTests.java => ServerVulnerabilityAssessmentsSettingsListMockTests.java} (55%) create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ServerVulnerabilityAssessmentsSettingsListTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/TargetBranchConfigurationTests.java create mode 100644 sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/UpdateSensitivitySettingsRequestTests.java diff --git a/sdk/security/azure-resourcemanager-security/CHANGELOG.md b/sdk/security/azure-resourcemanager-security/CHANGELOG.md index bd1644944ed7..c05da164089b 100644 --- a/sdk/security/azure-resourcemanager-security/CHANGELOG.md +++ b/sdk/security/azure-resourcemanager-security/CHANGELOG.md @@ -1,14 +1,477 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.6 (2024-03-14) -### Features Added +- Azure Resource Manager Security client library for Java. This package contains Microsoft Azure SDK for Security Management SDK. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +* `models.ApiCollectionOffboardings` was removed + +* `models.IngestionSettingList` was removed + +* `models.IngestionConnectionString` was removed + +* `models.Roles` was removed + +* `models.ScopeName` was removed + +* `models.IngestionSettings` was removed + +* `models.IngestionSetting` was removed + +* `models.IngestionSetting$Definition` was removed + +* `models.ApiCollectionResponse` was removed + +* `models.SecurityContactPropertiesAlertNotifications` was removed + +* `models.IngestionSettingToken` was removed + +* `models.ApiCollectionOnboardings` was removed + +* `models.HealthReportOperations` was removed + +* `models.ApiCollectionResponseList` was removed + +* `models.IngestionSetting$DefinitionStages` was removed + +* `models.ConnectionStrings` was removed + +#### `models.Extension` was modified + +* `models.OperationStatus operationStatus()` -> `models.OperationStatusAutoGenerated operationStatus()` + +#### `models.SecurityContacts` was modified + +* `delete(java.lang.String)` was removed +* `get(java.lang.String)` was removed +* `define(java.lang.String)` was removed +* `deleteWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getWithResponse(java.lang.String,com.azure.core.util.Context)` was removed + +#### `SecurityManager` was modified + +* `apiCollectionOffboardings()` was removed +* `apiCollectionOnboardings()` was removed +* `ingestionSettings()` was removed +* `healthReportOperations()` was removed + +#### `models.ApiCollections` was modified + +* `list(java.lang.String,java.lang.String)` was removed +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.SecurityContact$Definition` was modified + +* `withAlertNotifications(models.SecurityContactPropertiesAlertNotifications)` was removed + +#### `models.Pricings` was modified + +* `getWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String)` was removed +* `updateWithResponse(java.lang.String,fluent.models.PricingInner,com.azure.core.util.Context)` was removed +* `listWithResponse(com.azure.core.util.Context)` was removed +* `update(java.lang.String,fluent.models.PricingInner)` was removed +* `list()` was removed + +#### `models.Settings` was modified + +* `getWithResponse(models.SettingName,com.azure.core.util.Context)` was removed +* `updateWithResponse(models.SettingName,fluent.models.SettingInner,com.azure.core.util.Context)` was removed +* `get(models.SettingName)` was removed +* `update(models.SettingName,fluent.models.SettingInner)` was removed + +#### `models.HealthDataClassification` was modified + +* `models.ScopeName scope()` -> `java.lang.String scope()` +* `withScope(models.ScopeName)` was removed + +#### `models.OperationStatus` was modified + +* `withCode(models.Code)` was removed +* `models.Code code()` -> `java.lang.String code()` + +#### `models.SecurityContact` was modified + +* `alertNotifications()` was removed + +### Features Added + +* `models.OnboardingState` was added + +* `models.NotificationsSourceAlert` was added + +* `models.ServerVulnerabilityAssessmentsAzureSettingSelectedProvider` was added + +* `models.DevOpsProvisioningState` was added + +* `models.AzureDevOpsRepository$UpdateStages` was added + +* `models.AzureDevOpsProject$UpdateStages` was added + +* `models.DefenderForStorageSetting$Definition` was added + +* `models.AzureDevOpsRepository$Definition` was added + +* `models.DefenderForContainersAwsOfferingMdcContainersImageAssessment` was added + +* `models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S` was added + +* `models.ActionableRemediationState` was added + +* `models.GitHubRepositoryProperties` was added + +* `models.SensitivitySettings` was added + +* `models.SecurityContactRole` was added + +* `models.AzureDevOpsProject$Update` was added + +* `models.DefenderCspmGcpOfferingMdcContainersImageAssessment` was added + +* `models.AzureDevOpsProjects` was added + +* `models.DevOpsConfigurationProperties` was added + +* `models.AzureDevOpsOrgProperties` was added + +* `models.GitLabProject` was added + +* `models.NotificationsSourceAttackPath` was added + +* `models.GitLabProjects` was added + +* `models.GitHubOwnerProperties` was added + +* `models.Label` was added + +* `models.DefenderForStorageSetting$DefinitionStages` was added + +* `models.DefenderCspmGcpOfferingVmScanners` was added + +* `models.ServerVulnerabilityAssessmentsSettingKindName` was added + +* `models.AzureDevOpsRepository$DefinitionStages` was added + +* `models.AzureDevOpsOrgListResponse` was added + +* `models.AnnotateDefaultBranchState` was added + +* `models.ActionableRemediation` was added + +* `models.OperationStatusResult` was added + +* `models.GitLabSubgroups` was added + +* `models.GetSensitivitySettingsListResponse` was added + +* `models.AzureDevOpsRepository$Update` was added + +* `models.Enforce` was added + +* `models.AzureDevOpsRepos` was added + +* `models.GitLabGroup` was added + +* `models.Inherited` was added + +* `models.AzureDevOpsRepositoryListResponse` was added + +* `models.GitHubRepository` was added + +* `models.AzureServersSetting` was added + +* `models.ServerVulnerabilityAssessmentsSettings` was added + +* `models.SecurityContactName` was added + +* `models.ApiCollectionList` was added + +* `models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S` was added + +* `models.GitHubOwners` was added + +* `models.SourceType` was added + +* `models.DevOpsOperationResults` was added + +* `models.DevOpsConfigurationListResponse` was added + +* `models.ServerVulnerabilityAssessmentsSettingsList` was added + +* `models.GetSensitivitySettingsResponseProperties` was added + +* `models.GitLabProjectListResponse` was added + +* `models.GitLabGroupProperties` was added + +* `models.ResourcesCoverageStatus` was added + +* `models.ServerVulnerabilityAssessmentsSettingKind` was added + +* `models.DefenderForStorages` was added + +* `models.GitHubOwner` was added + +* `models.MipIntegrationStatus` was added + +* `models.AzureDevOpsProject` was added + +* `models.AzureDevOpsOrg$Definition` was added + +* `models.DefenderForContainersGcpOfferingMdcContainersImageAssessment` was added + +* `models.ResourceProviders` was added + +* `models.AzureDevOpsProject$Definition` was added + +* `models.GitLabGroupListResponse` was added + +* `models.AutomationUpdateModel` was added + +* `models.DefenderCspmAwsOfferingCiemOidc` was added + +* `models.UpdateSensitivitySettingsRequest` was added + +* `models.DefenderCspmGcpOfferingVmScannersConfiguration` was added + +* `models.DevOpsConfigurations` was added + +* `models.DefenderCspmAwsOfferingCiem` was added + +* `models.AzureDevOpsOrg$UpdateStages` was added + +* `models.AzureDevOpsOrg` was added + +* `models.DefenderCspmGcpOfferingDataSensitivityDiscovery` was added + +* `models.AzureDevOpsRepositoryProperties` was added + +* `models.Authorization` was added + +* `models.AzureDevOpsProjectListResponse` was added + +* `models.GitHubRepositoryListResponse` was added + +* `models.AzureDevOpsRepository` was added + +* `models.GitHubRepos` was added + +* `models.CategoryConfiguration` was added + +* `models.DefenderCspmAwsOfferingCiemDiscovery` was added + +* `models.SettingNameAutoGenerated` was added + +* `models.RuleCategory` was added + +* `models.BuiltInInfoType` was added + +* `models.GitLabProjectProperties` was added + +* `models.ServerVulnerabilityAssessmentsSetting` was added + +* `models.DefenderForStorageSetting` was added + +* `models.GitLabGroups` was added + +* `models.OperationStatusAutoGenerated` was added + +* `models.DefenderCspmGcpOfferingCiemDiscovery` was added + +* `models.ApiCollection` was added + +* `models.InfoType` was added + +* `models.AutoDiscovery` was added + +* `models.GitHubOwnerListResponse` was added + +* `models.InheritFromParentState` was added + +* `models.GetSensitivitySettingsResponse` was added + +* `models.MinimalRiskLevel` was added + +* `models.AzureDevOpsOrg$Update` was added + +* `models.GetSensitivitySettingsResponsePropertiesMipInformation` was added + +* `models.TargetBranchConfiguration` was added + +* `models.AzureDevOpsProjectProperties` was added + +* `models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S` was added + +* `models.DefenderCspmAwsOfferingMdcContainersImageAssessment` was added + +* `models.AzureDevOpsOrg$DefinitionStages` was added + +* `models.DevOpsConfiguration` was added + +* `models.AzureDevOpsProject$DefinitionStages` was added + +* `models.AzureDevOpsOrgs` was added + +* `models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S` was added + +* `models.NotificationsSource` was added + +#### `models.GcpProjectEnvironmentData` was modified + +* `scanInterval()` was added +* `withScanInterval(java.lang.Long)` was added + +#### `models.SecurityContactList` was modified + +* `withValue(java.util.List)` was added + +#### `models.Pricing` was modified + +* `resourcesCoverageStatus()` was added +* `inherited()` was added +* `enforce()` was added +* `inheritedFrom()` was added + +#### `models.HealthReport` was modified + +* `affectedDefendersSubPlans()` was added +* `reportAdditionalData()` was added + +#### `models.HealthReports` was modified + +* `get(java.lang.String,java.lang.String)` was added +* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.SecurityContacts` was modified + +* `define(models.SecurityContactName)` was added +* `getWithResponse(models.SecurityContactName,com.azure.core.util.Context)` was added +* `get(models.SecurityContactName)` was added +* `deleteWithResponse(models.SecurityContactName,com.azure.core.util.Context)` was added +* `delete(models.SecurityContactName)` was added + +#### `models.AutomationActionEventHub` was modified + +* `isTrustedServiceEnabled()` was added +* `withIsTrustedServiceEnabled(java.lang.Boolean)` was added + +#### `models.AwsEnvironmentData` was modified + +* `scanInterval()` was added +* `withScanInterval(java.lang.Long)` was added + +#### `SecurityManager` was modified + +* `serverVulnerabilityAssessmentsSettings()` was added +* `azureDevOpsOrgs()` was added +* `devOpsOperationResults()` was added +* `azureDevOpsProjects()` was added +* `devOpsConfigurations()` was added +* `gitLabProjects()` was added +* `gitHubRepos()` was added +* `azureDevOpsRepos()` was added +* `gitLabSubgroups()` was added +* `resourceProviders()` was added +* `sensitivitySettings()` was added +* `defenderForStorages()` was added +* `gitHubOwners()` was added +* `gitLabGroups()` was added + +#### `models.ApiCollections` was modified + +* `onboardAzureApiManagementApi(java.lang.String,java.lang.String,java.lang.String)` was added +* `listByResourceGroup(java.lang.String)` was added +* `list(com.azure.core.util.Context)` was added +* `getByAzureApiManagementService(java.lang.String,java.lang.String,java.lang.String)` was added +* `offboardAzureApiManagementApi(java.lang.String,java.lang.String,java.lang.String)` was added +* `offboardAzureApiManagementApiWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `onboardAzureApiManagementApi(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByAzureApiManagementService(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByAzureApiManagementService(java.lang.String,java.lang.String)` was added +* `list()` was added +* `getByAzureApiManagementServiceWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was added + +#### `models.StatusAutoGenerated` was modified + +* `lastScannedDate()` was added +* `reason()` was added + +#### `models.SecurityContact$Definition` was modified + +* `withNotificationsSources(java.util.List)` was added +* `withIsEnabled(java.lang.Boolean)` was added + +#### `models.DefenderForContainersAwsOffering` was modified + +* `mdcContainersImageAssessment()` was added +* `withMdcContainersAgentlessDiscoveryK8S(models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S)` was added +* `withMdcContainersImageAssessment(models.DefenderForContainersAwsOfferingMdcContainersImageAssessment)` was added +* `mdcContainersAgentlessDiscoveryK8S()` was added + +#### `models.Pricings` was modified + +* `listWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `deleteByResourceGroup(java.lang.String,java.lang.String)` was added +* `deleteByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.String)` was added +* `update(java.lang.String,java.lang.String,fluent.models.PricingInner)` was added +* `get(java.lang.String,java.lang.String)` was added +* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `updateWithResponse(java.lang.String,java.lang.String,fluent.models.PricingInner,com.azure.core.util.Context)` was added + +#### `models.Settings` was modified + +* `get(models.SettingNameAutoGenerated)` was added +* `getWithResponse(models.SettingNameAutoGenerated,com.azure.core.util.Context)` was added +* `update(models.SettingNameAutoGenerated,fluent.models.SettingInner)` was added +* `updateWithResponse(models.SettingNameAutoGenerated,fluent.models.SettingInner,com.azure.core.util.Context)` was added + +#### `models.DefenderForContainersGcpOffering` was modified + +* `withMdcContainersImageAssessment(models.DefenderForContainersGcpOfferingMdcContainersImageAssessment)` was added +* `mdcContainersAgentlessDiscoveryK8S()` was added +* `withMdcContainersAgentlessDiscoveryK8S(models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S)` was added +* `mdcContainersImageAssessment()` was added + +#### `models.DefenderCspmAwsOffering` was modified + +* `mdcContainersAgentlessDiscoveryK8S()` was added +* `mdcContainersImageAssessment()` was added +* `withCiem(models.DefenderCspmAwsOfferingCiem)` was added +* `ciem()` was added +* `withMdcContainersImageAssessment(models.DefenderCspmAwsOfferingMdcContainersImageAssessment)` was added +* `withMdcContainersAgentlessDiscoveryK8S(models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S)` was added + +#### `models.HealthDataClassification` was modified + +* `withScope(java.lang.String)` was added + +#### `models.DefenderCspmGcpOffering` was modified + +* `ciemDiscovery()` was added +* `mdcContainersAgentlessDiscoveryK8S()` was added +* `withVmScanners(models.DefenderCspmGcpOfferingVmScanners)` was added +* `withCiemDiscovery(models.DefenderCspmGcpOfferingCiemDiscovery)` was added +* `withMdcContainersAgentlessDiscoveryK8S(models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S)` was added +* `withDataSensitivityDiscovery(models.DefenderCspmGcpOfferingDataSensitivityDiscovery)` was added +* `vmScanners()` was added +* `withMdcContainersImageAssessment(models.DefenderCspmGcpOfferingMdcContainersImageAssessment)` was added +* `mdcContainersImageAssessment()` was added +* `dataSensitivityDiscovery()` was added + +#### `models.OperationStatus` was modified + +* `withCode(java.lang.String)` was added + +#### `models.SecurityContact` was modified -### Other Changes +* `notificationsSources()` was added +* `isEnabled()` was added ## 1.0.0-beta.5 (2023-04-18) diff --git a/sdk/security/azure-resourcemanager-security/README.md b/sdk/security/azure-resourcemanager-security/README.md index 960b33cd33f3..53cd81088b64 100644 --- a/sdk/security/azure-resourcemanager-security/README.md +++ b/sdk/security/azure-resourcemanager-security/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-security - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fsecurity%2Fazure-resourcemanager-security%2FREADME.png) diff --git a/sdk/security/azure-resourcemanager-security/SAMPLE.md b/sdk/security/azure-resourcemanager-security/SAMPLE.md index 3972495626d9..ecf7fe4c229c 100644 --- a/sdk/security/azure-resourcemanager-security/SAMPLE.md +++ b/sdk/security/azure-resourcemanager-security/SAMPLE.md @@ -50,18 +50,14 @@ - [List](#allowedconnections_list) - [ListByHomeRegion](#allowedconnections_listbyhomeregion) -## ApiCollection +## ApiCollections -- [Get](#apicollection_get) -- [List](#apicollection_list) - -## ApiCollectionOffboarding - -- [Delete](#apicollectionoffboarding_delete) - -## ApiCollectionOnboarding - -- [Create](#apicollectiononboarding_create) +- [GetByAzureApiManagementService](#apicollections_getbyazureapimanagementservice) +- [List](#apicollections_list) +- [ListByAzureApiManagementService](#apicollections_listbyazureapimanagementservice) +- [ListByResourceGroup](#apicollections_listbyresourcegroup) +- [OffboardAzureApiManagementApi](#apicollections_offboardazureapimanagementapi) +- [OnboardAzureApiManagementApi](#apicollections_onboardazureapimanagementapi) ## ApplicationOperation @@ -102,8 +98,31 @@ - [GetByResourceGroup](#automations_getbyresourcegroup) - [List](#automations_list) - [ListByResourceGroup](#automations_listbyresourcegroup) +- [Update](#automations_update) - [Validate](#automations_validate) +## AzureDevOpsOrgs + +- [CreateOrUpdate](#azuredevopsorgs_createorupdate) +- [Get](#azuredevopsorgs_get) +- [List](#azuredevopsorgs_list) +- [ListAvailable](#azuredevopsorgs_listavailable) +- [Update](#azuredevopsorgs_update) + +## AzureDevOpsProjects + +- [CreateOrUpdate](#azuredevopsprojects_createorupdate) +- [Get](#azuredevopsprojects_get) +- [List](#azuredevopsprojects_list) +- [Update](#azuredevopsprojects_update) + +## AzureDevOpsRepos + +- [CreateOrUpdate](#azuredevopsrepos_createorupdate) +- [Get](#azuredevopsrepos_get) +- [List](#azuredevopsrepos_list) +- [Update](#azuredevopsrepos_update) + ## ComplianceResults - [Get](#complianceresults_get) @@ -137,6 +156,23 @@ - [List](#customentitystoreassignments_list) - [ListByResourceGroup](#customentitystoreassignments_listbyresourcegroup) +## DefenderForStorage + +- [Create](#defenderforstorage_create) +- [Get](#defenderforstorage_get) + +## DevOpsConfigurations + +- [CreateOrUpdate](#devopsconfigurations_createorupdate) +- [Delete](#devopsconfigurations_delete) +- [Get](#devopsconfigurations_get) +- [List](#devopsconfigurations_list) +- [Update](#devopsconfigurations_update) + +## DevOpsOperationResults + +- [Get](#devopsoperationresults_get) + ## DeviceSecurityGroups - [CreateOrUpdate](#devicesecuritygroups_createorupdate) @@ -156,6 +192,32 @@ - [List](#externalsecuritysolutions_list) - [ListByHomeRegion](#externalsecuritysolutions_listbyhomeregion) +## GitHubOwners + +- [Get](#githubowners_get) +- [List](#githubowners_list) +- [ListAvailable](#githubowners_listavailable) + +## GitHubRepos + +- [Get](#githubrepos_get) +- [List](#githubrepos_list) + +## GitLabGroups + +- [Get](#gitlabgroups_get) +- [List](#gitlabgroups_list) +- [ListAvailable](#gitlabgroups_listavailable) + +## GitLabProjects + +- [Get](#gitlabprojects_get) +- [List](#gitlabprojects_list) + +## GitLabSubgroups + +- [List](#gitlabsubgroups_list) + ## GovernanceAssignments - [CreateOrUpdate](#governanceassignments_createorupdate) @@ -172,12 +234,9 @@ - [List](#governancerules_list) - [OperationResults](#governancerules_operationresults) -## HealthReportOperation - -- [Get](#healthreportoperation_get) - ## HealthReports +- [Get](#healthreports_get) - [List](#healthreports_list) ## InformationProtectionPolicies @@ -186,15 +245,6 @@ - [Get](#informationprotectionpolicies_get) - [List](#informationprotectionpolicies_list) -## IngestionSettings - -- [Create](#ingestionsettings_create) -- [Delete](#ingestionsettings_delete) -- [Get](#ingestionsettings_get) -- [List](#ingestionsettings_list) -- [ListConnectionStrings](#ingestionsettings_listconnectionstrings) -- [ListTokens](#ingestionsettings_listtokens) - ## IotSecuritySolution - [CreateOrUpdate](#iotsecuritysolution_createorupdate) @@ -243,6 +293,7 @@ ## Pricings +- [Delete](#pricings_delete) - [Get](#pricings_get) - [List](#pricings_list) - [Update](#pricings_update) @@ -262,6 +313,11 @@ - [Get](#regulatorycompliancestandards_get) - [List](#regulatorycompliancestandards_list) +## ResourceProvider + +- [GetSensitivitySettings](#resourceprovider_getsensitivitysettings) +- [UpdateSensitivitySettings](#resourceprovider_updatesensitivitysettings) + ## SecureScoreControlDefinitions - [List](#securescorecontroldefinitions_list) @@ -320,6 +376,10 @@ - [List](#securitysolutionsreferencedata_list) - [ListByHomeRegion](#securitysolutionsreferencedata_listbyhomeregion) +## SensitivitySettings + +- [List](#sensitivitysettings_list) + ## ServerVulnerabilityAssessment - [CreateOrUpdate](#servervulnerabilityassessment_createorupdate) @@ -327,6 +387,13 @@ - [Get](#servervulnerabilityassessment_get) - [ListByExtendedResource](#servervulnerabilityassessment_listbyextendedresource) +## ServerVulnerabilityAssessmentsSettings + +- [CreateOrUpdate](#servervulnerabilityassessmentssettings_createorupdate) +- [Delete](#servervulnerabilityassessmentssettings_delete) +- [Get](#servervulnerabilityassessmentssettings_get) +- [List](#servervulnerabilityassessmentssettings_list) + ## Settings - [Get](#settings_get) @@ -389,21 +456,24 @@ ### AdaptiveApplicationControls_Delete ```java -/** Samples for AdaptiveApplicationControls Delete. */ +/** + * Samples for AdaptiveApplicationControls Delete. + */ public final class AdaptiveApplicationControlsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/DeleteAdaptiveApplicationControls_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/ + * DeleteAdaptiveApplicationControls_example.json */ /** * Sample code: Delete an application control machine group. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteAnApplicationControlMachineGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .adaptiveApplicationControls() - .deleteByResourceGroupWithResponse("centralus", "GROUP1", com.azure.core.util.Context.NONE); + public static void + deleteAnApplicationControlMachineGroup(com.azure.resourcemanager.security.SecurityManager manager) { + manager.adaptiveApplicationControls().deleteByResourceGroupWithResponse("centralus", "GROUP1", + com.azure.core.util.Context.NONE); } } ``` @@ -411,21 +481,24 @@ public final class AdaptiveApplicationControlsDeleteSamples { ### AdaptiveApplicationControls_Get ```java -/** Samples for AdaptiveApplicationControls Get. */ +/** + * Samples for AdaptiveApplicationControls Get. + */ public final class AdaptiveApplicationControlsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsGroup_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/ + * GetAdaptiveApplicationControlsGroup_example.json */ /** * Sample code: Gets a configured application control VM/server group. - * + * * @param manager Entry point to SecurityManager. */ - public static void getsAConfiguredApplicationControlVMServerGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .adaptiveApplicationControls() - .getWithResponse("centralus", "ERELGROUP1", com.azure.core.util.Context.NONE); + public static void + getsAConfiguredApplicationControlVMServerGroup(com.azure.resourcemanager.security.SecurityManager manager) { + manager.adaptiveApplicationControls().getWithResponse("centralus", "ERELGROUP1", + com.azure.core.util.Context.NONE); } } ``` @@ -433,14 +506,18 @@ public final class AdaptiveApplicationControlsGetSamples { ### AdaptiveApplicationControls_List ```java -/** Samples for AdaptiveApplicationControls List. */ +/** + * Samples for AdaptiveApplicationControls List. + */ public final class AdaptiveApplicationControlsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/ + * GetAdaptiveApplicationControlsSubscription_example.json */ /** * Sample code: Gets a list of application control groups of machines for the subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getsAListOfApplicationControlGroupsOfMachinesForTheSubscription( @@ -467,114 +544,70 @@ import com.azure.resourcemanager.security.models.UserRecommendation; import com.azure.resourcemanager.security.models.VmRecommendation; import java.util.Arrays; -/** Samples for AdaptiveApplicationControls Put. */ +/** + * Samples for AdaptiveApplicationControls Put. + */ public final class AdaptiveApplicationControlsPutSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/PutAdaptiveApplicationControls_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/ + * PutAdaptiveApplicationControls_example.json */ /** * Sample code: Update an application control machine group by adding a new application. - * + * * @param manager Entry point to SecurityManager. */ public static void updateAnApplicationControlMachineGroupByAddingANewApplication( com.azure.resourcemanager.security.SecurityManager manager) { - AdaptiveApplicationControlGroup resource = - manager - .adaptiveApplicationControls() - .getWithResponse("centralus", "ERELGROUP1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withEnforcementMode(EnforcementMode.AUDIT) - .withProtectionMode( - new ProtectionMode() - .withExe(EnforcementMode.AUDIT) - .withMsi(EnforcementMode.NONE) - .withScript(EnforcementMode.NONE)) - .withVmRecommendations( - Arrays - .asList( - new VmRecommendation() - .withConfigurationStatus(ConfigurationStatus.CONFIGURED) - .withRecommendationAction(RecommendationAction.RECOMMENDED) - .withResourceId( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/erelh-stable/providers/microsoft.compute/virtualmachines/erelh-16090") - .withEnforcementSupport(EnforcementSupport.SUPPORTED), - new VmRecommendation() - .withConfigurationStatus(ConfigurationStatus.CONFIGURED) - .withRecommendationAction(RecommendationAction.RECOMMENDED) - .withResourceId( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/matanvs/providers/microsoft.compute/virtualmachines/matanvs19") - .withEnforcementSupport(EnforcementSupport.SUPPORTED))) - .withPathRecommendations( - Arrays - .asList( - new PathRecommendation() - .withPath("[Exe] O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US\\*\\*\\0.0.0.0") - .withAction(RecommendationAction.RECOMMENDED) - .withType(RecommendationType.fromString("PublisherSignature")) - .withPublisherInfo( - new PublisherInfo() - .withPublisherName("O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US") - .withProductName("*") - .withBinaryName("*") - .withVersion("0.0.0.0")) - .withCommon(true) - .withUserSids(Arrays.asList("S-1-1-0")) - .withUsernames( - Arrays - .asList( - new UserRecommendation() - .withUsername("Everyone") - .withRecommendationAction(RecommendationAction.RECOMMENDED))) - .withFileType(FileType.EXE) - .withConfigurationStatus(ConfigurationStatus.CONFIGURED), - new PathRecommendation() - .withPath("%OSDRIVE%\\WINDOWSAZURE\\SECAGENT\\WASECAGENTPROV.EXE") - .withAction(RecommendationAction.RECOMMENDED) - .withType(RecommendationType.fromString("ProductSignature")) - .withPublisherInfo( - new PublisherInfo() - .withPublisherName("CN=MICROSOFT AZURE DEPENDENCY CODE SIGN") - .withProductName("MICROSOFT® COREXT") - .withBinaryName("*") - .withVersion("0.0.0.0")) - .withCommon(true) - .withUserSids(Arrays.asList("S-1-1-0")) - .withUsernames( - Arrays - .asList( - new UserRecommendation() - .withUsername("NT AUTHORITY\\SYSTEM") - .withRecommendationAction(RecommendationAction.RECOMMENDED))) - .withFileType(FileType.EXE) - .withConfigurationStatus(ConfigurationStatus.CONFIGURED), - new PathRecommendation() - .withPath("%OSDRIVE%\\WINDOWSAZURE\\PACKAGES_201973_7415\\COLLECTGUESTLOGS.EXE") - .withAction(RecommendationAction.RECOMMENDED) - .withType(RecommendationType.fromString("PublisherSignature")) - .withPublisherInfo( - new PublisherInfo() - .withPublisherName("CN=MICROSOFT AZURE DEPENDENCY CODE SIGN") - .withProductName("*") - .withBinaryName("*") - .withVersion("0.0.0.0")) - .withCommon(true) - .withUserSids(Arrays.asList("S-1-1-0")) - .withUsernames( - Arrays - .asList( - new UserRecommendation() - .withUsername("NT AUTHORITY\\SYSTEM") - .withRecommendationAction(RecommendationAction.RECOMMENDED))) - .withFileType(FileType.EXE) - .withConfigurationStatus(ConfigurationStatus.CONFIGURED), - new PathRecommendation() - .withPath("C:\\directory\\file.exe") - .withAction(RecommendationAction.ADD) - .withType(RecommendationType.fromString("File")) - .withCommon(true))) + AdaptiveApplicationControlGroup resource = manager.adaptiveApplicationControls() + .getWithResponse("centralus", "ERELGROUP1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withEnforcementMode(EnforcementMode.AUDIT) + .withProtectionMode(new ProtectionMode().withExe(EnforcementMode.AUDIT).withMsi(EnforcementMode.NONE) + .withScript(EnforcementMode.NONE)) + .withVmRecommendations(Arrays.asList(new VmRecommendation() + .withConfigurationStatus(ConfigurationStatus.CONFIGURED) + .withRecommendationAction(RecommendationAction.RECOMMENDED) + .withResourceId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/erelh-stable/providers/microsoft.compute/virtualmachines/erelh-16090") + .withEnforcementSupport(EnforcementSupport.SUPPORTED), + new VmRecommendation().withConfigurationStatus(ConfigurationStatus.CONFIGURED) + .withRecommendationAction(RecommendationAction.RECOMMENDED) + .withResourceId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/matanvs/providers/microsoft.compute/virtualmachines/matanvs19") + .withEnforcementSupport(EnforcementSupport.SUPPORTED))) + .withPathRecommendations(Arrays.asList( + new PathRecommendation() + .withPath("[Exe] O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US\\*\\*\\0.0.0.0") + .withAction(RecommendationAction.RECOMMENDED) + .withType(RecommendationType.fromString("PublisherSignature")) + .withPublisherInfo( + new PublisherInfo().withPublisherName("O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US") + .withProductName("*").withBinaryName("*").withVersion("0.0.0.0")) + .withCommon(true).withUserSids(Arrays.asList("S-1-1-0")) + .withUsernames(Arrays.asList(new UserRecommendation().withUsername("Everyone") + .withRecommendationAction(RecommendationAction.RECOMMENDED))) + .withFileType(FileType.EXE).withConfigurationStatus(ConfigurationStatus.CONFIGURED), + new PathRecommendation().withPath("%OSDRIVE%\\WINDOWSAZURE\\SECAGENT\\WASECAGENTPROV.EXE") + .withAction(RecommendationAction.RECOMMENDED) + .withType(RecommendationType.fromString("ProductSignature")) + .withPublisherInfo(new PublisherInfo().withPublisherName("CN=MICROSOFT AZURE DEPENDENCY CODE SIGN") + .withProductName("MICROSOFT® COREXT").withBinaryName("*").withVersion("0.0.0.0")) + .withCommon(true).withUserSids(Arrays.asList("S-1-1-0")) + .withUsernames(Arrays.asList(new UserRecommendation().withUsername("NT AUTHORITY\\SYSTEM") + .withRecommendationAction(RecommendationAction.RECOMMENDED))) + .withFileType(FileType.EXE).withConfigurationStatus(ConfigurationStatus.CONFIGURED), + new PathRecommendation().withPath("%OSDRIVE%\\WINDOWSAZURE\\PACKAGES_201973_7415\\COLLECTGUESTLOGS.EXE") + .withAction(RecommendationAction.RECOMMENDED) + .withType(RecommendationType.fromString("PublisherSignature")) + .withPublisherInfo(new PublisherInfo().withPublisherName("CN=MICROSOFT AZURE DEPENDENCY CODE SIGN") + .withProductName("*").withBinaryName("*").withVersion("0.0.0.0")) + .withCommon(true).withUserSids(Arrays.asList("S-1-1-0")) + .withUsernames(Arrays.asList(new UserRecommendation().withUsername("NT AUTHORITY\\SYSTEM") + .withRecommendationAction(RecommendationAction.RECOMMENDED))) + .withFileType(FileType.EXE).withConfigurationStatus(ConfigurationStatus.CONFIGURED), + new PathRecommendation().withPath("C:\\directory\\file.exe").withAction(RecommendationAction.ADD) + .withType(RecommendationType.fromString("File")).withCommon(true))) .apply(); } } @@ -589,48 +622,34 @@ import com.azure.resourcemanager.security.models.Rule; import com.azure.resourcemanager.security.models.TransportProtocol; import java.util.Arrays; -/** Samples for AdaptiveNetworkHardenings Enforce. */ +/** + * Samples for AdaptiveNetworkHardenings Enforce. + */ public final class AdaptiveNetworkHardeningsEnforceSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/EnforceAdaptiveNetworkHardeningRules_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/ + * EnforceAdaptiveNetworkHardeningRules_example.json */ /** * Sample code: Enforces the given rules on the NSG(s) listed in the request. - * + * * @param manager Entry point to SecurityManager. */ - public static void enforcesTheGivenRulesOnTheNSGSListedInTheRequest( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .adaptiveNetworkHardenings() - .enforce( - "rg1", - "Microsoft.Compute", - "virtualMachines", - "vm1", - "default", - new AdaptiveNetworkHardeningEnforceRequest() - .withRules( - Arrays - .asList( - new Rule() - .withName("rule1") - .withDirection(Direction.INBOUND) - .withDestinationPort(3389) - .withProtocols(Arrays.asList(TransportProtocol.TCP)) - .withIpAddresses(Arrays.asList("100.10.1.1", "200.20.2.2", "81.199.3.0/24")), - new Rule() - .withName("rule2") - .withDirection(Direction.INBOUND) - .withDestinationPort(22) - .withProtocols(Arrays.asList(TransportProtocol.TCP)) - .withIpAddresses(Arrays.asList()))) - .withNetworkSecurityGroups( - Arrays - .asList( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg2")), - com.azure.core.util.Context.NONE); + public static void + enforcesTheGivenRulesOnTheNSGSListedInTheRequest(com.azure.resourcemanager.security.SecurityManager manager) { + manager.adaptiveNetworkHardenings().enforce("rg1", "Microsoft.Compute", "virtualMachines", "vm1", "default", + new AdaptiveNetworkHardeningEnforceRequest() + .withRules(Arrays.asList( + new Rule().withName("rule1").withDirection(Direction.INBOUND).withDestinationPort(3389) + .withProtocols(Arrays.asList(TransportProtocol.TCP)) + .withIpAddresses(Arrays.asList("100.10.1.1", "200.20.2.2", "81.199.3.0/24")), + new Rule().withName("rule2").withDirection(Direction.INBOUND).withDestinationPort(22) + .withProtocols(Arrays.asList(TransportProtocol.TCP)).withIpAddresses(Arrays.asList()))) + .withNetworkSecurityGroups(Arrays.asList( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1", + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg2")), + com.azure.core.util.Context.NONE); } } ``` @@ -638,22 +657,24 @@ public final class AdaptiveNetworkHardeningsEnforceSamples { ### AdaptiveNetworkHardenings_Get ```java -/** Samples for AdaptiveNetworkHardenings Get. */ +/** + * Samples for AdaptiveNetworkHardenings Get. + */ public final class AdaptiveNetworkHardeningsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/GetAdaptiveNetworkHardening_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/ + * GetAdaptiveNetworkHardening_example.json */ /** * Sample code: Get a single Adaptive Network Hardening resource. - * + * * @param manager Entry point to SecurityManager. */ - public static void getASingleAdaptiveNetworkHardeningResource( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .adaptiveNetworkHardenings() - .getWithResponse( - "rg1", "Microsoft.Compute", "virtualMachines", "vm1", "default", com.azure.core.util.Context.NONE); + public static void + getASingleAdaptiveNetworkHardeningResource(com.azure.resourcemanager.security.SecurityManager manager) { + manager.adaptiveNetworkHardenings().getWithResponse("rg1", "Microsoft.Compute", "virtualMachines", "vm1", + "default", com.azure.core.util.Context.NONE); } } ``` @@ -661,22 +682,24 @@ public final class AdaptiveNetworkHardeningsGetSamples { ### AdaptiveNetworkHardenings_ListByExtendedResource ```java -/** Samples for AdaptiveNetworkHardenings ListByExtendedResource. */ +/** + * Samples for AdaptiveNetworkHardenings ListByExtendedResource. + */ public final class AdaptiveNetworkHardeningsListByExtendedResourceSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/ListByExtendedResourceAdaptiveNetworkHardenings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/ + * ListByExtendedResourceAdaptiveNetworkHardenings_example.json */ /** * Sample code: List Adaptive Network Hardenings resources of an extended resource. - * + * * @param manager Entry point to SecurityManager. */ public static void listAdaptiveNetworkHardeningsResourcesOfAnExtendedResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .adaptiveNetworkHardenings() - .listByExtendedResource( - "rg1", "Microsoft.Compute", "virtualMachines", "vm1", com.azure.core.util.Context.NONE); + manager.adaptiveNetworkHardenings().listByExtendedResource("rg1", "Microsoft.Compute", "virtualMachines", "vm1", + com.azure.core.util.Context.NONE); } } ``` @@ -684,25 +707,25 @@ public final class AdaptiveNetworkHardeningsListByExtendedResourceSamples { ### AdvancedThreatProtection_Create ```java -/** Samples for AdvancedThreatProtection Create. */ +/** + * Samples for AdvancedThreatProtection Create. + */ public final class AdvancedThreatProtectionCreateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/AdvancedThreatProtection/PutAdvancedThreatProtectionSettings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/AdvancedThreatProtection/ + * PutAdvancedThreatProtectionSettings_example.json */ /** * Sample code: Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param manager Entry point to SecurityManager. */ public static void createsOrUpdatesTheAdvancedThreatProtectionSettingsOnASpecifiedResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .advancedThreatProtections() - .define() - .withExistingResourceId( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount") - .withIsEnabled(true) - .create(); + manager.advancedThreatProtections().define().withExistingResourceId( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount") + .withIsEnabled(true).create(); } } ``` @@ -710,23 +733,25 @@ public final class AdvancedThreatProtectionCreateSamples { ### AdvancedThreatProtection_Get ```java -/** Samples for AdvancedThreatProtection Get. */ +/** + * Samples for AdvancedThreatProtection Get. + */ public final class AdvancedThreatProtectionGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/AdvancedThreatProtection/GetAdvancedThreatProtectionSettings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/examples/AdvancedThreatProtection/ + * GetAdvancedThreatProtectionSettings_example.json */ /** * Sample code: Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param manager Entry point to SecurityManager. */ public static void getsTheAdvancedThreatProtectionSettingsForTheSpecifiedResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .advancedThreatProtections() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", - com.azure.core.util.Context.NONE); + manager.advancedThreatProtections().getWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", + com.azure.core.util.Context.NONE); } } ``` @@ -734,25 +759,23 @@ public final class AdvancedThreatProtectionGetSamples { ### Alerts_GetResourceGroupLevel ```java -/** Samples for Alerts GetResourceGroupLevel. */ +/** + * Samples for Alerts GetResourceGroupLevel. + */ public final class AlertsGetResourceGroupLevelSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertResourceGroupLocation_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * GetAlertResourceGroupLocation_example.json */ /** * Sample code: Get security alert on a resource group from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityAlertOnAResourceGroupFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .getResourceGroupLevelWithResponse( - "myRg1", - "westeurope", - "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", - com.azure.core.util.Context.NONE); + manager.alerts().getResourceGroupLevelWithResponse("myRg1", "westeurope", + "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", com.azure.core.util.Context.NONE); } } ``` @@ -760,24 +783,23 @@ public final class AlertsGetResourceGroupLevelSamples { ### Alerts_GetSubscriptionLevel ```java -/** Samples for Alerts GetSubscriptionLevel. */ +/** + * Samples for Alerts GetSubscriptionLevel. + */ public final class AlertsGetSubscriptionLevelSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertSubscriptionLocation_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * GetAlertSubscriptionLocation_example.json */ /** * Sample code: Get security alert on a subscription from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityAlertOnASubscriptionFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .getSubscriptionLevelWithResponse( - "westeurope", - "2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA", - com.azure.core.util.Context.NONE); + manager.alerts().getSubscriptionLevelWithResponse("westeurope", + "2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA", com.azure.core.util.Context.NONE); } } ``` @@ -785,14 +807,17 @@ public final class AlertsGetSubscriptionLevelSamples { ### Alerts_List ```java -/** Samples for Alerts List. */ +/** + * Samples for Alerts List. + */ public final class AlertsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsSubscription_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * GetAlertsSubscription_example.json */ /** * Sample code: Get security alerts on a subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityAlertsOnASubscription(com.azure.resourcemanager.security.SecurityManager manager) { @@ -804,14 +829,17 @@ public final class AlertsListSamples { ### Alerts_ListByResourceGroup ```java -/** Samples for Alerts ListByResourceGroup. */ +/** + * Samples for Alerts ListByResourceGroup. + */ public final class AlertsListByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsResourceGroup_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * GetAlertsResourceGroup_example.json */ /** * Sample code: Get security alerts on a resource group. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityAlertsOnAResourceGroup(com.azure.resourcemanager.security.SecurityManager manager) { @@ -823,14 +851,17 @@ public final class AlertsListByResourceGroupSamples { ### Alerts_ListResourceGroupLevelByRegion ```java -/** Samples for Alerts ListResourceGroupLevelByRegion. */ +/** + * Samples for Alerts ListResourceGroupLevelByRegion. + */ public final class AlertsListResourceGroupLevelByRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsResourceGroupLocation_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * GetAlertsResourceGroupLocation_example.json */ /** * Sample code: Get security alerts on a resource group from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityAlertsOnAResourceGroupFromASecurityDataLocation( @@ -843,14 +874,17 @@ public final class AlertsListResourceGroupLevelByRegionSamples { ### Alerts_ListSubscriptionLevelByRegion ```java -/** Samples for Alerts ListSubscriptionLevelByRegion. */ +/** + * Samples for Alerts ListSubscriptionLevelByRegion. + */ public final class AlertsListSubscriptionLevelByRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/GetAlertsSubscriptionsLocation_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * GetAlertsSubscriptionsLocation_example.json */ /** * Sample code: Get security alerts on a subscription from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityAlertsOnASubscriptionFromASecurityDataLocation( @@ -868,38 +902,27 @@ import com.azure.resourcemanager.security.models.AlertSimulatorRequestBody; import com.azure.resourcemanager.security.models.BundleType; import java.util.Arrays; -/** Samples for Alerts Simulate. */ +/** + * Samples for Alerts Simulate. + */ public final class AlertsSimulateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/SimulateAlerts_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * SimulateAlerts_example.json */ /** * Sample code: Simulate security alerts on a subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void simulateSecurityAlertsOnASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .simulate( - "centralus", - new AlertSimulatorRequestBody() - .withProperties( - new AlertSimulatorBundlesRequestProperties() - .withBundles( - Arrays - .asList( - BundleType.APP_SERVICES, - BundleType.DNS, - BundleType.KEY_VAULTS, - BundleType.KUBERNETES_SERVICE, - BundleType.RESOURCE_MANAGER, - BundleType.SQL_SERVERS, - BundleType.STORAGE_ACCOUNTS, - BundleType.VIRTUAL_MACHINES, - BundleType.COSMOS_DBS))), - com.azure.core.util.Context.NONE); + public static void + simulateSecurityAlertsOnASubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.alerts().simulate("centralus", + new AlertSimulatorRequestBody().withProperties(new AlertSimulatorBundlesRequestProperties() + .withBundles(Arrays.asList(BundleType.APP_SERVICES, BundleType.DNS, BundleType.KEY_VAULTS, + BundleType.KUBERNETES_SERVICE, BundleType.RESOURCE_MANAGER, BundleType.SQL_SERVERS, + BundleType.STORAGE_ACCOUNTS, BundleType.VIRTUAL_MACHINES, BundleType.COSMOS_DBS))), + com.azure.core.util.Context.NONE); } } ``` @@ -907,25 +930,23 @@ public final class AlertsSimulateSamples { ### Alerts_UpdateResourceGroupLevelStateToActivate ```java -/** Samples for Alerts UpdateResourceGroupLevelStateToActivate. */ +/** + * Samples for Alerts UpdateResourceGroupLevelStateToActivate. + */ public final class AlertsUpdateResourceGroupLevelStateToActivateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_activate_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertResourceGroupLocation_activate_example.json */ /** * Sample code: Update security alert state on a resource group from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnAResourceGroupFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateResourceGroupLevelStateToActivateWithResponse( - "myRg2", - "westeurope", - "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", - com.azure.core.util.Context.NONE); + manager.alerts().updateResourceGroupLevelStateToActivateWithResponse("myRg2", "westeurope", + "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", com.azure.core.util.Context.NONE); } } ``` @@ -933,25 +954,23 @@ public final class AlertsUpdateResourceGroupLevelStateToActivateSamples { ### Alerts_UpdateResourceGroupLevelStateToDismiss ```java -/** Samples for Alerts UpdateResourceGroupLevelStateToDismiss. */ +/** + * Samples for Alerts UpdateResourceGroupLevelStateToDismiss. + */ public final class AlertsUpdateResourceGroupLevelStateToDismissSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_dismiss_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertResourceGroupLocation_dismiss_example.json */ /** * Sample code: Update security alert state on a resource group from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnAResourceGroupFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateResourceGroupLevelStateToDismissWithResponse( - "myRg2", - "westeurope", - "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", - com.azure.core.util.Context.NONE); + manager.alerts().updateResourceGroupLevelStateToDismissWithResponse("myRg2", "westeurope", + "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", com.azure.core.util.Context.NONE); } } ``` @@ -959,25 +978,23 @@ public final class AlertsUpdateResourceGroupLevelStateToDismissSamples { ### Alerts_UpdateResourceGroupLevelStateToInProgress ```java -/** Samples for Alerts UpdateResourceGroupLevelStateToInProgress. */ +/** + * Samples for Alerts UpdateResourceGroupLevelStateToInProgress. + */ public final class AlertsUpdateResourceGroupLevelStateToInProgressSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_inProgress_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertResourceGroupLocation_inProgress_example.json */ /** * Sample code: Update security alert state on a resource group from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnAResourceGroupFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateResourceGroupLevelStateToInProgressWithResponse( - "myRg2", - "westeurope", - "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", - com.azure.core.util.Context.NONE); + manager.alerts().updateResourceGroupLevelStateToInProgressWithResponse("myRg2", "westeurope", + "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", com.azure.core.util.Context.NONE); } } ``` @@ -985,25 +1002,23 @@ public final class AlertsUpdateResourceGroupLevelStateToInProgressSamples { ### Alerts_UpdateResourceGroupLevelStateToResolve ```java -/** Samples for Alerts UpdateResourceGroupLevelStateToResolve. */ +/** + * Samples for Alerts UpdateResourceGroupLevelStateToResolve. + */ public final class AlertsUpdateResourceGroupLevelStateToResolveSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertResourceGroupLocation_resolve_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertResourceGroupLocation_resolve_example.json */ /** * Sample code: Update security alert state on a resource group from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnAResourceGroupFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateResourceGroupLevelStateToResolveWithResponse( - "myRg2", - "westeurope", - "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", - com.azure.core.util.Context.NONE); + manager.alerts().updateResourceGroupLevelStateToResolveWithResponse("myRg2", "westeurope", + "2518765996949954086_2325cf9e-42a2-4f72-ae7f-9b863cba2d22", com.azure.core.util.Context.NONE); } } ``` @@ -1011,24 +1026,23 @@ public final class AlertsUpdateResourceGroupLevelStateToResolveSamples { ### Alerts_UpdateSubscriptionLevelStateToActivate ```java -/** Samples for Alerts UpdateSubscriptionLevelStateToActivate. */ +/** + * Samples for Alerts UpdateSubscriptionLevelStateToActivate. + */ public final class AlertsUpdateSubscriptionLevelStateToActivateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_activate_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertSubscriptionLocation_activate_example.json */ /** * Sample code: Update security alert state on a subscription from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnASubscriptionFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateSubscriptionLevelStateToActivateWithResponse( - "westeurope", - "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", - com.azure.core.util.Context.NONE); + manager.alerts().updateSubscriptionLevelStateToActivateWithResponse("westeurope", + "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", com.azure.core.util.Context.NONE); } } ``` @@ -1036,24 +1050,23 @@ public final class AlertsUpdateSubscriptionLevelStateToActivateSamples { ### Alerts_UpdateSubscriptionLevelStateToDismiss ```java -/** Samples for Alerts UpdateSubscriptionLevelStateToDismiss. */ +/** + * Samples for Alerts UpdateSubscriptionLevelStateToDismiss. + */ public final class AlertsUpdateSubscriptionLevelStateToDismissSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_dismiss_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertSubscriptionLocation_dismiss_example.json */ /** * Sample code: Update security alert state on a subscription from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnASubscriptionFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateSubscriptionLevelStateToDismissWithResponse( - "westeurope", - "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", - com.azure.core.util.Context.NONE); + manager.alerts().updateSubscriptionLevelStateToDismissWithResponse("westeurope", + "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", com.azure.core.util.Context.NONE); } } ``` @@ -1061,24 +1074,23 @@ public final class AlertsUpdateSubscriptionLevelStateToDismissSamples { ### Alerts_UpdateSubscriptionLevelStateToInProgress ```java -/** Samples for Alerts UpdateSubscriptionLevelStateToInProgress. */ +/** + * Samples for Alerts UpdateSubscriptionLevelStateToInProgress. + */ public final class AlertsUpdateSubscriptionLevelStateToInProgressSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_inProgress_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertSubscriptionLocation_inProgress_example.json */ /** * Sample code: Update security alert state on a subscription from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnASubscriptionFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateSubscriptionLevelStateToInProgressWithResponse( - "westeurope", - "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", - com.azure.core.util.Context.NONE); + manager.alerts().updateSubscriptionLevelStateToInProgressWithResponse("westeurope", + "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", com.azure.core.util.Context.NONE); } } ``` @@ -1086,24 +1098,23 @@ public final class AlertsUpdateSubscriptionLevelStateToInProgressSamples { ### Alerts_UpdateSubscriptionLevelStateToResolve ```java -/** Samples for Alerts UpdateSubscriptionLevelStateToResolve. */ +/** + * Samples for Alerts UpdateSubscriptionLevelStateToResolve. + */ public final class AlertsUpdateSubscriptionLevelStateToResolveSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_resolve_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/ + * UpdateAlertSubscriptionLocation_resolve_example.json */ /** * Sample code: Update security alert state on a subscription from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void updateSecurityAlertStateOnASubscriptionFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .alerts() - .updateSubscriptionLevelStateToResolveWithResponse( - "westeurope", - "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", - com.azure.core.util.Context.NONE); + manager.alerts().updateSubscriptionLevelStateToResolveWithResponse("westeurope", + "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", com.azure.core.util.Context.NONE); } } ``` @@ -1111,18 +1122,22 @@ public final class AlertsUpdateSubscriptionLevelStateToResolveSamples { ### AlertsSuppressionRules_Delete ```java -/** Samples for AlertsSuppressionRules Delete. */ +/** + * Samples for AlertsSuppressionRules Delete. + */ public final class AlertsSuppressionRulesDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/DeleteAlertsSuppressionRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * AlertsSuppressionRules/DeleteAlertsSuppressionRule_example.json */ /** * Sample code: Delete suppression rule data for a subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteSuppressionRuleDataForASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + deleteSuppressionRuleDataForASubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.alertsSuppressionRules().deleteWithResponse("dismissIpAnomalyAlerts", com.azure.core.util.Context.NONE); } } @@ -1131,18 +1146,22 @@ public final class AlertsSuppressionRulesDeleteSamples { ### AlertsSuppressionRules_Get ```java -/** Samples for AlertsSuppressionRules Get. */ +/** + * Samples for AlertsSuppressionRules Get. + */ public final class AlertsSuppressionRulesGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/GetAlertsSuppressionRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * AlertsSuppressionRules/GetAlertsSuppressionRule_example.json */ /** * Sample code: Get suppression alert rule for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void getSuppressionAlertRuleForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getSuppressionAlertRuleForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.alertsSuppressionRules().getWithResponse("dismissIpAnomalyAlerts", com.azure.core.util.Context.NONE); } } @@ -1151,14 +1170,18 @@ public final class AlertsSuppressionRulesGetSamples { ### AlertsSuppressionRules_List ```java -/** Samples for AlertsSuppressionRules List. */ +/** + * Samples for AlertsSuppressionRules List. + */ public final class AlertsSuppressionRulesListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/GetAlertsSuppressionRules_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * AlertsSuppressionRules/GetAlertsSuppressionRules_example.json */ /** * Sample code: Get suppression rules for subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getSuppressionRulesForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { @@ -1166,11 +1189,13 @@ public final class AlertsSuppressionRulesListSamples { } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/GetAlertsSuppressionRulesWithAlertType_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * AlertsSuppressionRules/GetAlertsSuppressionRulesWithAlertType_example.json */ /** * Sample code: Get suppression alert rule for subscription, filtered by AlertType. - * + * * @param manager Entry point to SecurityManager. */ public static void getSuppressionAlertRuleForSubscriptionFilteredByAlertType( @@ -1195,50 +1220,37 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for AlertsSuppressionRules Update. */ +/** + * Samples for AlertsSuppressionRules Update. + */ public final class AlertsSuppressionRulesUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/AlertsSuppressionRules/PutAlertsSuppressionRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * AlertsSuppressionRules/PutAlertsSuppressionRule_example.json */ /** * Sample code: Update or create suppression rule for subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void updateOrCreateSuppressionRuleForSubscription( com.azure.resourcemanager.security.SecurityManager manager) throws IOException { - manager - .alertsSuppressionRules() - .updateWithResponse( - "dismissIpAnomalyAlerts", - new AlertsSuppressionRuleInner() - .withAlertType("IpAnomaly") - .withExpirationDateUtc(OffsetDateTime.parse("2019-12-01T19:50:47.083633Z")) - .withReason("FalsePositive") - .withState(RuleState.ENABLED) - .withComment("Test VM") - .withSuppressionAlertsScope( - new SuppressionAlertsScope() - .withAllOf( - Arrays - .asList( - new ScopeElement() - .withField("entities.ip.address") - .withAdditionalProperties( - mapOf( - "in", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "[\"104.215.95.187\",\"52.164.206.56\"]", - Object.class, - SerializerEncoding.JSON))), - new ScopeElement() - .withField("entities.process.commandline") - .withAdditionalProperties(mapOf("contains", "POWERSHELL.EXE"))))), - com.azure.core.util.Context.NONE); - } - + manager.alertsSuppressionRules().updateWithResponse("dismissIpAnomalyAlerts", + new AlertsSuppressionRuleInner().withAlertType("IpAnomaly") + .withExpirationDateUtc(OffsetDateTime.parse("2019-12-01T19:50:47.083633Z")).withReason("FalsePositive") + .withState(RuleState.ENABLED).withComment("Test VM") + .withSuppressionAlertsScope(new SuppressionAlertsScope().withAllOf(Arrays.asList( + new ScopeElement().withField("entities.ip.address") + .withAdditionalProperties(mapOf("in", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "[\"104.215.95.187\",\"52.164.206.56\"]", Object.class, SerializerEncoding.JSON))), + new ScopeElement().withField("entities.process.commandline") + .withAdditionalProperties(mapOf("contains", "POWERSHELL.EXE"))))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1257,20 +1269,23 @@ public final class AlertsSuppressionRulesUpdateSamples { ```java import com.azure.resourcemanager.security.models.ConnectionType; -/** Samples for AllowedConnections Get. */ +/** + * Samples for AllowedConnections Get. + */ public final class AllowedConnectionsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnections_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/ + * GetAllowedConnections_example.json */ /** * Sample code: Get allowed connections. - * + * * @param manager Entry point to SecurityManager. */ public static void getAllowedConnections(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .allowedConnections() - .getWithResponse("myResourceGroup", "centralus", ConnectionType.INTERNAL, com.azure.core.util.Context.NONE); + manager.allowedConnections().getWithResponse("myResourceGroup", "centralus", ConnectionType.INTERNAL, + com.azure.core.util.Context.NONE); } } ``` @@ -1278,18 +1293,22 @@ public final class AllowedConnectionsGetSamples { ### AllowedConnections_List ```java -/** Samples for AllowedConnections List. */ +/** + * Samples for AllowedConnections List. + */ public final class AllowedConnectionsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnectionsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/ + * GetAllowedConnectionsSubscription_example.json */ /** * Sample code: Get allowed connections on a subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void getAllowedConnectionsOnASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getAllowedConnectionsOnASubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.allowedConnections().list(com.azure.core.util.Context.NONE); } } @@ -1298,14 +1317,18 @@ public final class AllowedConnectionsListSamples { ### AllowedConnections_ListByHomeRegion ```java -/** Samples for AllowedConnections ListByHomeRegion. */ +/** + * Samples for AllowedConnections ListByHomeRegion. + */ public final class AllowedConnectionsListByHomeRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnectionsSubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/ + * GetAllowedConnectionsSubscriptionLocation_example.json */ /** * Sample code: Get allowed connections on a subscription from security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getAllowedConnectionsOnASubscriptionFromSecurityDataLocation( @@ -1315,86 +1338,152 @@ public final class AllowedConnectionsListByHomeRegionSamples { } ``` -### ApiCollection_Get +### ApiCollections_GetByAzureApiManagementService ```java -/** Samples for ApiCollection Get. */ -public final class ApiCollectionGetSamples { +/** + * Samples for ApiCollections GetByAzureApiManagementService. + */ +public final class ApiCollectionsGetByAzureApiManagementServiceSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollection_Get_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/ + * APICollections_GetByAzureApiManagementService_example.json */ /** - * Sample code: Gets an Azure API Management API if it has been onboarded to Defender for APIs. - * + * Sample code: Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. + * * @param manager Entry point to SecurityManager. */ - public static void getsAnAzureAPIManagementAPIIfItHasBeenOnboardedToDefenderForAPIs( + public static void getsAnAzureAPIManagementAPIIfItHasBeenOnboardedToMicrosoftDefenderForAPIs( com.azure.resourcemanager.security.SecurityManager manager) { - manager.apiCollections().getWithResponse("rg1", "apimService1", "echo-api", com.azure.core.util.Context.NONE); + manager.apiCollections().getByAzureApiManagementServiceWithResponse("rg1", "apimService1", "echo-api", + com.azure.core.util.Context.NONE); } } ``` -### ApiCollection_List +### ApiCollections_List ```java -/** Samples for ApiCollection List. */ -public final class ApiCollectionListSamples { +/** + * Samples for ApiCollections List. + */ +public final class ApiCollectionsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollection_List_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/ + * APICollections_ListBySubscription_example.json */ /** - * Sample code: Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. - * + * Sample code: Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender + * for APIs. + * * @param manager Entry point to SecurityManager. */ - public static void getsAListOfAzureAPIManagementAPIsThatHaveBeenOnboardedToDefenderForAPIs( + public static void getsAListOfAPICollectionsWithinASubscriptionThatHaveBeenOnboardedToMicrosoftDefenderForAPIs( com.azure.resourcemanager.security.SecurityManager manager) { - manager.apiCollections().list("rg1", "apimService1", com.azure.core.util.Context.NONE); + manager.apiCollections().list(com.azure.core.util.Context.NONE); } } ``` -### ApiCollectionOffboarding_Delete +### ApiCollections_ListByAzureApiManagementService ```java -/** Samples for ApiCollectionOffboarding Delete. */ -public final class ApiCollectionOffboardingDeleteSamples { +/** + * Samples for ApiCollections ListByAzureApiManagementService. + */ +public final class ApiCollectionsListByAzureApiManagementServiceSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollectionOffboarding_Delete_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/ + * APICollections_ListByAzureApiManagementService_example.json */ /** - * Sample code: Delete a security recommendation task on a resource. - * + * Sample code: Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. + * + * @param manager Entry point to SecurityManager. + */ + public static void getsAListOfAzureAPIManagementAPIsThatHaveBeenOnboardedToMicrosoftDefenderForAPIs( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.apiCollections().listByAzureApiManagementService("rg1", "apimService1", + com.azure.core.util.Context.NONE); + } +} +``` + +### ApiCollections_ListByResourceGroup + +```java +/** + * Samples for ApiCollections ListByResourceGroup. + */ +public final class ApiCollectionsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/ + * APICollections_ListByResourceGroup_example.json + */ + /** + * Sample code: Gets a list of API collections within a resource group that have been onboarded to Microsoft + * Defender for APIs. + * + * @param manager Entry point to SecurityManager. + */ + public static void getsAListOfAPICollectionsWithinAResourceGroupThatHaveBeenOnboardedToMicrosoftDefenderForAPIs( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.apiCollections().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### ApiCollections_OffboardAzureApiManagementApi + +```java +/** + * Samples for ApiCollections OffboardAzureApiManagementApi. + */ +public final class ApiCollectionsOffboardAzureApiManagementApiSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/ + * APICollections_OffboardAzureApiManagementApi_example.json + */ + /** + * Sample code: Offboard an Azure API Management API from Microsoft Defender for APIs. + * * @param manager Entry point to SecurityManager. */ - public static void deleteASecurityRecommendationTaskOnAResource( + public static void offboardAnAzureAPIManagementAPIFromMicrosoftDefenderForAPIs( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .apiCollectionOffboardings() - .deleteWithResponse("rg1", "apimService1", "echo-api", com.azure.core.util.Context.NONE); + manager.apiCollections().offboardAzureApiManagementApiWithResponse("rg1", "apimService1", "echo-api", + com.azure.core.util.Context.NONE); } } ``` -### ApiCollectionOnboarding_Create +### ApiCollections_OnboardAzureApiManagementApi ```java -/** Samples for ApiCollectionOnboarding Create. */ -public final class ApiCollectionOnboardingCreateSamples { +/** + * Samples for ApiCollections OnboardAzureApiManagementApi. + */ +public final class ApiCollectionsOnboardAzureApiManagementApiSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollectionOnboarding_Create_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/ + * APICollections_OnboardAzureApiManagementApi_example.json */ /** - * Sample code: Onboard an Azure API Management API to Defender for APIs. - * + * Sample code: Onboard an Azure API Management API to Microsoft Defender for APIs. + * * @param manager Entry point to SecurityManager. */ - public static void onboardAnAzureAPIManagementAPIToDefenderForAPIs( + public static void onboardAnAzureAPIManagementAPIToMicrosoftDefenderForAPIs( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .apiCollectionOnboardings() - .createWithResponse("rg1", "apimService1", "echo-api", com.azure.core.util.Context.NONE); + manager.apiCollections().onboardAzureApiManagementApi("rg1", "apimService1", "echo-api", + com.azure.core.util.Context.NONE); } } ``` @@ -1408,33 +1497,28 @@ import com.azure.resourcemanager.security.models.ApplicationSourceResourceType; import java.io.IOException; import java.util.Arrays; -/** Samples for ApplicationOperation CreateOrUpdate. */ +/** + * Samples for ApplicationOperation CreateOrUpdate. + */ public final class ApplicationOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/PutApplication_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * PutApplication_example.json */ /** * Sample code: Create application. - * + * * @param manager Entry point to SecurityManager. */ public static void createApplication(com.azure.resourcemanager.security.SecurityManager manager) throws IOException { - manager - .applicationOperations() - .define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8") - .withDisplayName("Admin's application") - .withDescription("An application on critical recommendations") + manager.applicationOperations().define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8") + .withDisplayName("Admin's application").withDescription("An application on critical recommendations") .withSourceResourceType(ApplicationSourceResourceType.ASSESSMENTS) - .withConditionSets( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"conditions\":[{\"operator\":\"contains\",\"property\":\"$.Id\",\"value\":\"-bil-\"}]}", - Object.class, - SerializerEncoding.JSON))) + .withConditionSets(Arrays.asList(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"conditions\":[{\"operator\":\"contains\",\"property\":\"$.Id\",\"value\":\"-bil-\"}]}", + Object.class, SerializerEncoding.JSON))) .create(); } } @@ -1443,20 +1527,23 @@ public final class ApplicationOperationCreateOrUpdateSamples { ### ApplicationOperation_Delete ```java -/** Samples for ApplicationOperation Delete. */ +/** + * Samples for ApplicationOperation Delete. + */ public final class ApplicationOperationDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/DeleteApplication_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * DeleteApplication_example.json */ /** * Sample code: Delete security Application. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteSecurityApplication(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .applicationOperations() - .deleteWithResponse("ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); + manager.applicationOperations().deleteWithResponse("ad9a8e26-29d9-4829-bb30-e597a58cdbb8", + com.azure.core.util.Context.NONE); } } ``` @@ -1464,21 +1551,24 @@ public final class ApplicationOperationDeleteSamples { ### ApplicationOperation_Get ```java -/** Samples for ApplicationOperation Get. */ +/** + * Samples for ApplicationOperation Get. + */ public final class ApplicationOperationGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/GetApplication_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * GetApplication_example.json */ /** * Sample code: Get security application by specific applicationId. - * + * * @param manager Entry point to SecurityManager. */ - public static void getSecurityApplicationBySpecificApplicationId( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .applicationOperations() - .getWithResponse("ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); + public static void + getSecurityApplicationBySpecificApplicationId(com.azure.resourcemanager.security.SecurityManager manager) { + manager.applicationOperations().getWithResponse("ad9a8e26-29d9-4829-bb30-e597a58cdbb8", + com.azure.core.util.Context.NONE); } } ``` @@ -1486,18 +1576,22 @@ public final class ApplicationOperationGetSamples { ### Applications_List ```java -/** Samples for Applications List. */ +/** + * Samples for Applications List. + */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ListBySubscriptionApplications_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * ListBySubscriptionApplications_example.json */ /** * Sample code: List applications security by subscription level scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void listApplicationsSecurityBySubscriptionLevelScope( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listApplicationsSecurityBySubscriptionLevelScope(com.azure.resourcemanager.security.SecurityManager manager) { manager.applications().list(com.azure.core.util.Context.NONE); } } @@ -1510,26 +1604,26 @@ import com.azure.resourcemanager.security.models.AssessmentStatus; import com.azure.resourcemanager.security.models.AssessmentStatusCode; import com.azure.resourcemanager.security.models.AzureResourceDetails; -/** Samples for Assessments CreateOrUpdate. */ +/** + * Samples for Assessments CreateOrUpdate. + */ public final class AssessmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/PutAssessment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/ + * PutAssessment_example.json */ /** * Sample code: Create security recommendation task on a resource. - * + * * @param manager Entry point to SecurityManager. */ - public static void createSecurityRecommendationTaskOnAResource( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessments() - .define("8bb8be0a-6010-4789-812f-e4d661c4ed0e") - .withExistingResourceId( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2") + public static void + createSecurityRecommendationTaskOnAResource(com.azure.resourcemanager.security.SecurityManager manager) { + manager.assessments().define("8bb8be0a-6010-4789-812f-e4d661c4ed0e").withExistingResourceId( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2") .withStatus(new AssessmentStatus().withCode(AssessmentStatusCode.HEALTHY)) - .withResourceDetails(new AzureResourceDetails()) - .create(); + .withResourceDetails(new AzureResourceDetails()).create(); } } ``` @@ -1537,24 +1631,25 @@ public final class AssessmentsCreateOrUpdateSamples { ### Assessments_Delete ```java -/** Samples for Assessments Delete. */ +/** + * Samples for Assessments Delete. + */ public final class AssessmentsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/DeleteAssessment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/ + * DeleteAssessment_example.json */ /** * Sample code: Delete a security recommendation task on a resource. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteASecurityRecommendationTaskOnAResource( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessments() - .deleteByResourceGroupWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", - "8bb8be0a-6010-4789-812f-e4d661c4ed0e", - com.azure.core.util.Context.NONE); + public static void + deleteASecurityRecommendationTaskOnAResource(com.azure.resourcemanager.security.SecurityManager manager) { + manager.assessments().deleteByResourceGroupWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", + "8bb8be0a-6010-4789-812f-e4d661c4ed0e", com.azure.core.util.Context.NONE); } } ``` @@ -1564,44 +1659,42 @@ public final class AssessmentsDeleteSamples { ```java import com.azure.resourcemanager.security.models.ExpandEnum; -/** Samples for Assessments Get. */ +/** + * Samples for Assessments Get. + */ public final class AssessmentsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/GetAssessmentWithExpand_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/ + * GetAssessmentWithExpand_example.json */ /** * Sample code: Get security recommendation task from security data location with expand parameter. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityRecommendationTaskFromSecurityDataLocationWithExpandParameter( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessments() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", - "21300918-b2e3-0346-785f-c77ff57d243b", - ExpandEnum.LINKS, - com.azure.core.util.Context.NONE); + manager.assessments().getWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", + "21300918-b2e3-0346-785f-c77ff57d243b", ExpandEnum.LINKS, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/GetAssessment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/ + * GetAssessment_example.json */ /** * Sample code: Get security recommendation task from security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityRecommendationTaskFromSecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessments() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", - "21300918-b2e3-0346-785f-c77ff57d243b", - null, - com.azure.core.util.Context.NONE); + manager.assessments().getWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2", + "21300918-b2e3-0346-785f-c77ff57d243b", null, com.azure.core.util.Context.NONE); } } ``` @@ -1609,20 +1702,23 @@ public final class AssessmentsGetSamples { ### Assessments_List ```java -/** Samples for Assessments List. */ +/** + * Samples for Assessments List. + */ public final class AssessmentsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/ListAssessments_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/Assessments/ + * ListAssessments_example.json */ /** * Sample code: List security assessments. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecurityAssessments(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessments() - .list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", com.azure.core.util.Context.NONE); + manager.assessments().list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + com.azure.core.util.Context.NONE); } } ``` @@ -1638,36 +1734,32 @@ import com.azure.resourcemanager.security.models.Threats; import com.azure.resourcemanager.security.models.UserImpact; import java.util.Arrays; -/** Samples for AssessmentsMetadata CreateInSubscription. */ +/** + * Samples for AssessmentsMetadata CreateInSubscription. + */ public final class AssessmentsMetadataCreateInSubscriptionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/CreateAssessmentsMetadata_subscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ + * CreateAssessmentsMetadata_subscription_example.json */ /** * Sample code: Create security assessment metadata for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void createSecurityAssessmentMetadataForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessmentsMetadatas() - .define("ca039e75-a276-4175-aebc-bcd41e4b14b7") + public static void + createSecurityAssessmentMetadataForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.assessmentsMetadatas().define("ca039e75-a276-4175-aebc-bcd41e4b14b7") .withDisplayName("Install endpoint protection solution on virtual machine scale sets") .withDescription( - "Install an endpoint protection solution on your virtual machines scale sets, to protect them from" - + " threats and vulnerabilities.") + "Install an endpoint protection solution on your virtual machines scale sets, to protect them from threats and vulnerabilities.") .withRemediationDescription( - "To install an endpoint protection solution: 1. Follow" - + " the instructions in How do I turn on antimalware in my virtual machine scale set") - .withCategories(Arrays.asList(Categories.COMPUTE)) - .withSeverity(Severity.MEDIUM) - .withUserImpact(UserImpact.LOW) - .withImplementationEffort(ImplementationEffort.LOW) + "To install an endpoint protection solution: 1. Follow the instructions in How do I turn on antimalware in my virtual machine scale set") + .withCategories(Arrays.asList(Categories.COMPUTE)).withSeverity(Severity.MEDIUM) + .withUserImpact(UserImpact.LOW).withImplementationEffort(ImplementationEffort.LOW) .withThreats(Arrays.asList(Threats.DATA_EXFILTRATION, Threats.DATA_SPILLAGE, Threats.MALICIOUS_INSIDER)) - .withAssessmentType(AssessmentType.CUSTOMER_MANAGED) - .create(); + .withAssessmentType(AssessmentType.CUSTOMER_MANAGED).create(); } } ``` @@ -1675,21 +1767,24 @@ public final class AssessmentsMetadataCreateInSubscriptionSamples { ### AssessmentsMetadata_DeleteInSubscription ```java -/** Samples for AssessmentsMetadata DeleteInSubscription. */ +/** + * Samples for AssessmentsMetadata DeleteInSubscription. + */ public final class AssessmentsMetadataDeleteInSubscriptionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/DeleteAssessmentsMetadata_subscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ + * DeleteAssessmentsMetadata_subscription_example.json */ /** * Sample code: Delete a security assessment metadata for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteASecurityAssessmentMetadataForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessmentsMetadatas() - .deleteInSubscriptionWithResponse("ca039e75-a276-4175-aebc-bcd41e4b14b7", com.azure.core.util.Context.NONE); + public static void + deleteASecurityAssessmentMetadataForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.assessmentsMetadatas().deleteInSubscriptionWithResponse("ca039e75-a276-4175-aebc-bcd41e4b14b7", + com.azure.core.util.Context.NONE); } } ``` @@ -1697,20 +1792,23 @@ public final class AssessmentsMetadataDeleteInSubscriptionSamples { ### AssessmentsMetadata_Get ```java -/** Samples for AssessmentsMetadata Get. */ +/** + * Samples for AssessmentsMetadata Get. + */ public final class AssessmentsMetadataGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/GetAssessmentsMetadata_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ + * GetAssessmentsMetadata_example.json */ /** * Sample code: Get security assessment metadata. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityAssessmentMetadata(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessmentsMetadatas() - .getWithResponse("21300918-b2e3-0346-785f-c77ff57d243b", com.azure.core.util.Context.NONE); + manager.assessmentsMetadatas().getWithResponse("21300918-b2e3-0346-785f-c77ff57d243b", + com.azure.core.util.Context.NONE); } } ``` @@ -1718,21 +1816,24 @@ public final class AssessmentsMetadataGetSamples { ### AssessmentsMetadata_GetInSubscription ```java -/** Samples for AssessmentsMetadata GetInSubscription. */ +/** + * Samples for AssessmentsMetadata GetInSubscription. + */ public final class AssessmentsMetadataGetInSubscriptionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/GetAssessmentsMetadata_subscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ + * GetAssessmentsMetadata_subscription_example.json */ /** * Sample code: Get security assessment metadata for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void getSecurityAssessmentMetadataForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .assessmentsMetadatas() - .getInSubscriptionWithResponse("21300918-b2e3-0346-785f-c77ff57d243b", com.azure.core.util.Context.NONE); + public static void + getSecurityAssessmentMetadataForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.assessmentsMetadatas().getInSubscriptionWithResponse("21300918-b2e3-0346-785f-c77ff57d243b", + com.azure.core.util.Context.NONE); } } ``` @@ -1740,14 +1841,18 @@ public final class AssessmentsMetadataGetInSubscriptionSamples { ### AssessmentsMetadata_List ```java -/** Samples for AssessmentsMetadata List. */ +/** + * Samples for AssessmentsMetadata List. + */ public final class AssessmentsMetadataListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ListAssessmentsMetadata_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ + * ListAssessmentsMetadata_example.json */ /** * Sample code: List security assessment metadata. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecurityAssessmentMetadata(com.azure.resourcemanager.security.SecurityManager manager) { @@ -1759,18 +1864,22 @@ public final class AssessmentsMetadataListSamples { ### AssessmentsMetadata_ListBySubscription ```java -/** Samples for AssessmentsMetadata ListBySubscription. */ +/** + * Samples for AssessmentsMetadata ListBySubscription. + */ public final class AssessmentsMetadataListBySubscriptionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ListAssessmentsMetadata_subscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/ + * ListAssessmentsMetadata_subscription_example.json */ /** * Sample code: List security assessment metadata for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void listSecurityAssessmentMetadataForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listSecurityAssessmentMetadataForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.assessmentsMetadatas().listBySubscription(com.azure.core.util.Context.NONE); } } @@ -1781,18 +1890,22 @@ public final class AssessmentsMetadataListBySubscriptionSamples { ```java import com.azure.resourcemanager.security.models.AutoProvision; -/** Samples for AutoProvisioningSettings Create. */ +/** + * Samples for AutoProvisioningSettings Create. + */ public final class AutoProvisioningSettingsCreateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/AutoProvisioningSettings/CreateAutoProvisioningSettingsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/ + * AutoProvisioningSettings/CreateAutoProvisioningSettingsSubscription_example.json */ /** * Sample code: Create auto provisioning settings for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void createAutoProvisioningSettingsForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + createAutoProvisioningSettingsForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.autoProvisioningSettings().define("default").withAutoProvision(AutoProvision.ON).create(); } } @@ -1801,18 +1914,22 @@ public final class AutoProvisioningSettingsCreateSamples { ### AutoProvisioningSettings_Get ```java -/** Samples for AutoProvisioningSettings Get. */ +/** + * Samples for AutoProvisioningSettings Get. + */ public final class AutoProvisioningSettingsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/AutoProvisioningSettings/GetAutoProvisioningSettingSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/ + * AutoProvisioningSettings/GetAutoProvisioningSettingSubscription_example.json */ /** * Sample code: Get an auto provisioning setting for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void getAnAutoProvisioningSettingForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getAnAutoProvisioningSettingForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.autoProvisioningSettings().getWithResponse("default", com.azure.core.util.Context.NONE); } } @@ -1821,18 +1938,22 @@ public final class AutoProvisioningSettingsGetSamples { ### AutoProvisioningSettings_List ```java -/** Samples for AutoProvisioningSettings List. */ +/** + * Samples for AutoProvisioningSettings List. + */ public final class AutoProvisioningSettingsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/AutoProvisioningSettings/GetAutoProvisioningSettingsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/ + * AutoProvisioningSettings/GetAutoProvisioningSettingsSubscription_example.json */ /** * Sample code: Get auto provisioning settings for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void getAutoProvisioningSettingsForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getAutoProvisioningSettingsForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.autoProvisioningSettings().list(com.azure.core.util.Context.NONE); } } @@ -1853,162 +1974,97 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for Automations CreateOrUpdate. */ +/** + * Samples for Automations CreateOrUpdate. + */ public final class AutomationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/PutAutomationAllAssessments_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * PutAutomationAllAssessments_example.json */ /** * Sample code: Create or update a security automation for all assessments (including all severities). - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateASecurityAutomationForAllAssessmentsIncludingAllSeverities( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .automations() - .define("exampleAutomation") - .withRegion("Central US") - .withExistingResourceGroup("exampleResourceGroup") - .withTags(mapOf()) + manager.automations().define("exampleAutomation").withRegion("Central US") + .withExistingResourceGroup("exampleResourceGroup").withTags(mapOf()) .withDescription( - "An example of a security automation that triggers one LogicApp resource (myTest1) on any security" - + " assessment") + "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment") .withIsEnabled(true) - .withScopes( - Arrays - .asList( - new AutomationScope() - .withDescription( - "A description that helps to identify this scope - for example: security assessments" - + " that relate to the resource group myResourceGroup within the subscription" - + " a5caac9c-5c04-49af-b3d0-e204f40345d5") - .withScopePath( - "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) + .withScopes(Arrays.asList(new AutomationScope().withDescription( + "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5") + .withScopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) .withSources(Arrays.asList(new AutomationSource().withEventSource(EventSource.ASSESSMENTS))) - .withActions( - Arrays - .asList( - new AutomationActionLogicApp() - .withLogicAppResourceId( - "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") - .withUri("https://exampleTriggerUri1.com"))) + .withActions(Arrays.asList(new AutomationActionLogicApp().withLogicAppResourceId( + "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") + .withUri("https://exampleTriggerUri1.com"))) .create(); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/PutDisableAutomation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * PutDisableAutomation_example.json */ /** * Sample code: Disable or enable a security automation. - * + * * @param manager Entry point to SecurityManager. */ public static void disableOrEnableASecurityAutomation(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .automations() - .define("exampleAutomation") - .withRegion("Central US") - .withExistingResourceGroup("exampleResourceGroup") - .withTags(mapOf()) + manager.automations().define("exampleAutomation").withRegion("Central US") + .withExistingResourceGroup("exampleResourceGroup").withTags(mapOf()) .withDescription( - "An example of a security automation that triggers one LogicApp resource (myTest1) on any security" - + " assessment of type customAssessment") + "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment") .withIsEnabled(false) - .withScopes( - Arrays - .asList( - new AutomationScope() - .withDescription( - "A description that helps to identify this scope - for example: security assessments" - + " that relate to the resource group myResourceGroup within the subscription" - + " a5caac9c-5c04-49af-b3d0-e204f40345d5") - .withScopePath( - "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) - .withSources( - Arrays - .asList( - new AutomationSource() - .withEventSource(EventSource.ASSESSMENTS) - .withRuleSets( - Arrays - .asList( - new AutomationRuleSet() - .withRules( - Arrays - .asList( - new AutomationTriggeringRule() - .withPropertyJPath("$.Entity.AssessmentType") - .withPropertyType(PropertyType.STRING) - .withExpectedValue("customAssessment") - .withOperator(Operator.EQUALS))))))) - .withActions( - Arrays - .asList( - new AutomationActionLogicApp() - .withLogicAppResourceId( - "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") - .withUri("https://exampleTriggerUri1.com"))) + .withScopes(Arrays.asList(new AutomationScope().withDescription( + "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5") + .withScopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) + .withSources(Arrays.asList(new AutomationSource().withEventSource(EventSource.ASSESSMENTS).withRuleSets( + Arrays.asList(new AutomationRuleSet().withRules(Arrays.asList(new AutomationTriggeringRule() + .withPropertyJPath("$.Entity.AssessmentType").withPropertyType(PropertyType.STRING) + .withExpectedValue("customAssessment").withOperator(Operator.EQUALS))))))) + .withActions(Arrays.asList(new AutomationActionLogicApp().withLogicAppResourceId( + "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") + .withUri("https://exampleTriggerUri1.com"))) .create(); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/PutAutomationHighSeverityAssessments_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * PutAutomationHighSeverityAssessments_example.json */ /** * Sample code: Create or update a security automation for all high severity assessments. - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateASecurityAutomationForAllHighSeverityAssessments( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .automations() - .define("exampleAutomation") - .withRegion("Central US") - .withExistingResourceGroup("exampleResourceGroup") - .withTags(mapOf()) + manager.automations().define("exampleAutomation").withRegion("Central US") + .withExistingResourceGroup("exampleResourceGroup").withTags(mapOf()) .withDescription( - "An example of a security automation that triggers one LogicApp resource (myTest1) on any high severity" - + " security assessment") + "An example of a security automation that triggers one LogicApp resource (myTest1) on any high severity security assessment") .withIsEnabled(true) - .withScopes( - Arrays - .asList( - new AutomationScope() - .withDescription( - "A description that helps to identify this scope - for example: security assessments" - + " that relate to the resource group myResourceGroup within the subscription" - + " a5caac9c-5c04-49af-b3d0-e204f40345d5") - .withScopePath( - "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) - .withSources( - Arrays - .asList( - new AutomationSource() - .withEventSource(EventSource.ASSESSMENTS) - .withRuleSets( - Arrays - .asList( - new AutomationRuleSet() - .withRules( - Arrays - .asList( - new AutomationTriggeringRule() - .withPropertyJPath("properties.metadata.severity") - .withPropertyType(PropertyType.STRING) - .withExpectedValue("High") - .withOperator(Operator.EQUALS))))))) - .withActions( - Arrays - .asList( - new AutomationActionLogicApp() - .withLogicAppResourceId( - "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") - .withUri("https://exampleTriggerUri1.com"))) + .withScopes(Arrays.asList(new AutomationScope().withDescription( + "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5") + .withScopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) + .withSources(Arrays.asList(new AutomationSource().withEventSource(EventSource.ASSESSMENTS).withRuleSets( + Arrays.asList(new AutomationRuleSet().withRules(Arrays.asList(new AutomationTriggeringRule() + .withPropertyJPath("properties.metadata.severity").withPropertyType(PropertyType.STRING) + .withExpectedValue("High").withOperator(Operator.EQUALS))))))) + .withActions(Arrays.asList(new AutomationActionLogicApp().withLogicAppResourceId( + "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") + .withUri("https://exampleTriggerUri1.com"))) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2025,20 +2081,23 @@ public final class AutomationsCreateOrUpdateSamples { ### Automations_Delete ```java -/** Samples for Automations Delete. */ +/** + * Samples for Automations Delete. + */ public final class AutomationsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/DeleteAutomation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * DeleteAutomation_example.json */ /** * Sample code: Delete a security automation. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteASecurityAutomation(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .automations() - .deleteByResourceGroupWithResponse("myRg", "myAutomationName", com.azure.core.util.Context.NONE); + manager.automations().deleteByResourceGroupWithResponse("myRg", "myAutomationName", + com.azure.core.util.Context.NONE); } } ``` @@ -2046,21 +2105,23 @@ public final class AutomationsDeleteSamples { ### Automations_GetByResourceGroup ```java -/** Samples for Automations GetByResourceGroup. */ +/** + * Samples for Automations GetByResourceGroup. + */ public final class AutomationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/GetAutomationResourceGroup_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * GetAutomationResourceGroup_example.json */ /** * Sample code: Retrieve a security automation. - * + * * @param manager Entry point to SecurityManager. */ public static void retrieveASecurityAutomation(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .automations() - .getByResourceGroupWithResponse( - "exampleResourceGroup", "exampleAutomation", com.azure.core.util.Context.NONE); + manager.automations().getByResourceGroupWithResponse("exampleResourceGroup", "exampleAutomation", + com.azure.core.util.Context.NONE); } } ``` @@ -2068,18 +2129,22 @@ public final class AutomationsGetByResourceGroupSamples { ### Automations_List ```java -/** Samples for Automations List. */ +/** + * Samples for Automations List. + */ public final class AutomationsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/GetAutomationsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * GetAutomationsSubscription_example.json */ /** * Sample code: List all security automations of a specified subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void listAllSecurityAutomationsOfASpecifiedSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listAllSecurityAutomationsOfASpecifiedSubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.automations().list(com.azure.core.util.Context.NONE); } } @@ -2088,14 +2153,18 @@ public final class AutomationsListSamples { ### Automations_ListByResourceGroup ```java -/** Samples for Automations ListByResourceGroup. */ +/** + * Samples for Automations ListByResourceGroup. + */ public final class AutomationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/GetAutomationsResourceGroup_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * GetAutomationsResourceGroup_example.json */ /** * Sample code: List all security automations of a specified resource group. - * + * * @param manager Entry point to SecurityManager. */ public static void listAllSecurityAutomationsOfASpecifiedResourceGroup( @@ -2105,6 +2174,61 @@ public final class AutomationsListByResourceGroupSamples { } ``` +### Automations_Update + +```java +import com.azure.resourcemanager.security.models.Automation; +import com.azure.resourcemanager.security.models.AutomationActionLogicApp; +import com.azure.resourcemanager.security.models.AutomationScope; +import com.azure.resourcemanager.security.models.AutomationSource; +import com.azure.resourcemanager.security.models.EventSource; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Automations Update. + */ +public final class AutomationsUpdateSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * PatchAutomation_example.json + */ + /** + * Sample code: Update a security automation. + * + * @param manager Entry point to SecurityManager. + */ + public static void updateASecurityAutomation(com.azure.resourcemanager.security.SecurityManager manager) { + Automation resource = manager.automations().getByResourceGroupWithResponse("exampleResourceGroup", + "exampleAutomation", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("Example", "exampleTag")).withDescription( + "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment") + .withScopes(Arrays.asList(new AutomationScope().withDescription( + "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5") + .withScopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) + .withSources(Arrays.asList(new AutomationSource().withEventSource(EventSource.ASSESSMENTS))) + .withActions(Arrays.asList(new AutomationActionLogicApp().withLogicAppResourceId( + "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") + .withUri("https://exampleTriggerUri1.com"))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + ### Automations_Validate ```java @@ -2121,67 +2245,41 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for Automations Validate. */ +/** + * Samples for Automations Validate. + */ public final class AutomationsValidateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/Automations/ValidateAutomation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/Automations/ + * ValidateAutomation_example.json */ /** * Sample code: Validate the security automation model before create or update. - * + * * @param manager Entry point to SecurityManager. */ public static void validateTheSecurityAutomationModelBeforeCreateOrUpdate( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .automations() - .validateWithResponse( - "exampleResourceGroup", - "exampleAutomation", - new AutomationInner() - .withLocation("Central US") - .withTags(mapOf()) - .withDescription( - "An example of a security automation that triggers one LogicApp resource (myTest1) on any" - + " security assessment of type customAssessment") - .withIsEnabled(true) - .withScopes( - Arrays - .asList( - new AutomationScope() - .withDescription( - "A description that helps to identify this scope - for example: security" - + " assessments that relate to the resource group myResourceGroup within" - + " the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5") - .withScopePath( - "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) - .withSources( - Arrays - .asList( - new AutomationSource() - .withEventSource(EventSource.ASSESSMENTS) - .withRuleSets( - Arrays - .asList( - new AutomationRuleSet() - .withRules( - Arrays - .asList( - new AutomationTriggeringRule() - .withPropertyJPath("$.Entity.AssessmentType") - .withPropertyType(PropertyType.STRING) - .withExpectedValue("customAssessment") - .withOperator(Operator.EQUALS))))))) - .withActions( - Arrays - .asList( - new AutomationActionLogicApp() - .withLogicAppResourceId( - "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") - .withUri("https://exampleTriggerUri1.com"))), - com.azure.core.util.Context.NONE); - } - + manager.automations().validateWithResponse("exampleResourceGroup", "exampleAutomation", new AutomationInner() + .withLocation("Central US").withTags(mapOf()) + .withDescription( + "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment") + .withIsEnabled(true) + .withScopes(Arrays.asList(new AutomationScope().withDescription( + "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5") + .withScopePath("/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"))) + .withSources(Arrays.asList(new AutomationSource().withEventSource(EventSource.ASSESSMENTS).withRuleSets( + Arrays.asList(new AutomationRuleSet().withRules(Arrays.asList(new AutomationTriggeringRule() + .withPropertyJPath("$.Entity.AssessmentType").withPropertyType(PropertyType.STRING) + .withExpectedValue("customAssessment").withOperator(Operator.EQUALS))))))) + .withActions(Arrays.asList(new AutomationActionLogicApp().withLogicAppResourceId( + "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1") + .withUri("https://exampleTriggerUri1.com"))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2195,399 +2293,780 @@ public final class AutomationsValidateSamples { } ``` -### ComplianceResults_Get +### AzureDevOpsOrgs_CreateOrUpdate ```java -/** Samples for ComplianceResults Get. */ -public final class ComplianceResultsGetSamples { +import com.azure.resourcemanager.security.models.ActionableRemediation; +import com.azure.resourcemanager.security.models.ActionableRemediationState; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgProperties; +import com.azure.resourcemanager.security.models.OnboardingState; + +/** + * Samples for AzureDevOpsOrgs CreateOrUpdate. + */ +public final class AzureDevOpsOrgsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2017-08-01/examples/ComplianceResults/GetComplianceResults_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json */ /** - * Sample code: Get compliance results on subscription. - * + * Sample code: CreateOrUpdate_AzureDevOpsOrgs. + * * @param manager Entry point to SecurityManager. */ - public static void getComplianceResultsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .complianceResults() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "DesignateMoreThanOneOwner", - com.azure.core.util.Context.NONE); + public static void createOrUpdateAzureDevOpsOrgs(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsOrgs().define("myAzDevOpsOrg") + .withExistingSecurityConnector("myRg", "mySecurityConnectorName") + .withProperties(new AzureDevOpsOrgProperties().withOnboardingState(OnboardingState.NOT_APPLICABLE) + .withActionableRemediation(new ActionableRemediation().withState(ActionableRemediationState.ENABLED))) + .create(); } } ``` -### ComplianceResults_List +### AzureDevOpsOrgs_Get ```java -/** Samples for ComplianceResults List. */ -public final class ComplianceResultsListSamples { +/** + * Samples for AzureDevOpsOrgs Get. + */ +public final class AzureDevOpsOrgsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2017-08-01/examples/ComplianceResults/ListComplianceResults_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json */ /** - * Sample code: Get compliance results on subscription. - * + * Sample code: Get_AzureDevOpsOrgs. + * * @param manager Entry point to SecurityManager. */ - public static void getComplianceResultsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .complianceResults() - .list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", com.azure.core.util.Context.NONE); + public static void getAzureDevOpsOrgs(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsOrgs().getWithResponse("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", + com.azure.core.util.Context.NONE); } } ``` -### Compliances_Get +### AzureDevOpsOrgs_List ```java -/** Samples for Compliances Get. */ -public final class CompliancesGetSamples { +/** + * Samples for AzureDevOpsOrgs List. + */ +public final class AzureDevOpsOrgsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Compliances/GetCompliance_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json */ /** - * Sample code: Get security compliance data for a day. - * + * Sample code: List_AzureDevOpsOrgs. + * * @param manager Entry point to SecurityManager. */ - public static void getSecurityComplianceDataForADay(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .compliances() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "2018-01-01Z", com.azure.core.util.Context.NONE); + public static void listAzureDevOpsOrgs(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsOrgs().list("myRg", "mySecurityConnectorName", com.azure.core.util.Context.NONE); } } ``` -### Compliances_List +### AzureDevOpsOrgs_ListAvailable ```java -/** Samples for Compliances List. */ -public final class CompliancesListSamples { +/** + * Samples for AzureDevOpsOrgs ListAvailable. + */ +public final class AzureDevOpsOrgsListAvailableSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Compliances/GetCompliances_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json */ /** - * Sample code: Get security compliance data over time. - * + * Sample code: ListAvailable_AzureDevOpsOrgs. + * * @param manager Entry point to SecurityManager. */ - public static void getSecurityComplianceDataOverTime(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .compliances() - .list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", com.azure.core.util.Context.NONE); + public static void listAvailableAzureDevOpsOrgs(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsOrgs().listAvailableWithResponse("myRg", "mySecurityConnectorName", + com.azure.core.util.Context.NONE); } } ``` -### Connectors_CreateOrUpdate +### AzureDevOpsOrgs_Update ```java -import com.azure.resourcemanager.security.models.AutoProvision; -import com.azure.resourcemanager.security.models.AwAssumeRoleAuthenticationDetailsProperties; -import com.azure.resourcemanager.security.models.AwsCredsAuthenticationDetailsProperties; -import com.azure.resourcemanager.security.models.GcpCredentialsDetailsProperties; -import com.azure.resourcemanager.security.models.HybridComputeSettingsProperties; -import com.azure.resourcemanager.security.models.ProxyServerProperties; -import com.azure.resourcemanager.security.models.ServicePrincipalProperties; +import com.azure.resourcemanager.security.models.ActionableRemediation; +import com.azure.resourcemanager.security.models.ActionableRemediationState; +import com.azure.resourcemanager.security.models.AzureDevOpsOrg; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgProperties; +import com.azure.resourcemanager.security.models.OnboardingState; -/** Samples for Connectors CreateOrUpdate. */ -public final class ConnectorsCreateOrUpdateSamples { +/** + * Samples for AzureDevOpsOrgs Update. + */ +public final class AzureDevOpsOrgsUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/CreateUpdateGcpCredentialsConnectorSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json */ /** - * Sample code: gcpCredentials - Create a cloud account connector for a subscription. - * + * Sample code: Update_AzureDevOpsOrgs. + * * @param manager Entry point to SecurityManager. */ - public static void gcpCredentialsCreateACloudAccountConnectorForASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .connectors() - .define("gcp_dev") - .withHybridComputeSettings(new HybridComputeSettingsProperties().withAutoProvision(AutoProvision.OFF)) - .withAuthenticationDetails( - new GcpCredentialsDetailsProperties() - .withOrganizationId("AscDemoOrg") - .withType("service_account") - .withProjectId("asc-project-1234") - .withPrivateKeyId("fakeTokenPlaceholder") - .withPrivateKey("fakeTokenPlaceholder") - .withClientEmail("asc-135@asc-project-1234.iam.gserviceaccount.com") - .withClientId("105889053725632919854") - .withAuthUri("https://accounts.google.com/o/oauth2/auth") - .withTokenUri("fakeTokenPlaceholder") - .withAuthProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs") - .withClientX509CertUrl( - "https://www.googleapis.com/robot/v1/metadata/x509/asc-135%40asc-project-1234.iam.gserviceaccount.com")) - .create(); + public static void updateAzureDevOpsOrgs(com.azure.resourcemanager.security.SecurityManager manager) { + AzureDevOpsOrg resource = manager.azureDevOpsOrgs() + .getWithResponse("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new AzureDevOpsOrgProperties().withOnboardingState(OnboardingState.NOT_APPLICABLE) + .withActionableRemediation(new ActionableRemediation().withState(ActionableRemediationState.ENABLED))) + .apply(); } +} +``` - /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/CreateUpdateAwsCredConnectorSubscription_example.json - */ - /** - * Sample code: AwsCred - Create a cloud account connector for a subscription. - * - * @param manager Entry point to SecurityManager. - */ - public static void awsCredCreateACloudAccountConnectorForASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .connectors() - .define("aws_dev1") - .withHybridComputeSettings( - new HybridComputeSettingsProperties() - .withAutoProvision(AutoProvision.ON) - .withResourceGroupName("AwsConnectorRG") - .withRegion("West US 2") - .withProxyServer(new ProxyServerProperties().withIp("167.220.197.140").withPort("34")) - .withServicePrincipal( - new ServicePrincipalProperties() - .withApplicationId("ad9bcd79-be9c-45ab-abd8-80ca1654a7d1") - .withSecret("fakeTokenPlaceholder"))) - .withAuthenticationDetails( - new AwsCredsAuthenticationDetailsProperties() - .withAwsAccessKeyId("fakeTokenPlaceholder") - .withAwsSecretAccessKey("fakeTokenPlaceholder")) - .create(); - } +### AzureDevOpsProjects_CreateOrUpdate + +```java +import com.azure.resourcemanager.security.models.ActionableRemediation; +import com.azure.resourcemanager.security.models.ActionableRemediationState; +import com.azure.resourcemanager.security.models.AzureDevOpsProjectProperties; +import com.azure.resourcemanager.security.models.OnboardingState; +/** + * Samples for AzureDevOpsProjects CreateOrUpdate. + */ +public final class AzureDevOpsProjectsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/CreateUpdateAwsAssumeRoleConnectorSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json */ /** - * Sample code: AwsAssumeRole - Create a cloud account connector for a subscription. - * + * Sample code: CreateOrUpdate_AzureDevOpsProjects. + * * @param manager Entry point to SecurityManager. */ - public static void awsAssumeRoleCreateACloudAccountConnectorForASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .connectors() - .define("aws_dev2") - .withHybridComputeSettings( - new HybridComputeSettingsProperties() - .withAutoProvision(AutoProvision.ON) - .withResourceGroupName("AwsConnectorRG") - .withRegion("West US 2") - .withProxyServer(new ProxyServerProperties().withIp("167.220.197.140").withPort("34")) - .withServicePrincipal( - new ServicePrincipalProperties() - .withApplicationId("ad9bcd79-be9c-45ab-abd8-80ca1654a7d1") - .withSecret("fakeTokenPlaceholder"))) - .withAuthenticationDetails( - new AwAssumeRoleAuthenticationDetailsProperties() - .withAwsAssumeRoleArn("arn:aws:iam::81231569658:role/AscConnector") - .withAwsExternalId("20ff7fc3-e762-44dd-bd96-b71116dcdc23")) + public static void createOrUpdateAzureDevOpsProjects(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsProjects().define("myAzDevOpsProject") + .withExistingAzureDevOpsOrg("myRg", "mySecurityConnectorName", "myAzDevOpsOrg") + .withProperties(new AzureDevOpsProjectProperties().withOnboardingState(OnboardingState.NOT_APPLICABLE) + .withActionableRemediation(new ActionableRemediation().withState(ActionableRemediationState.ENABLED))) .create(); } } ``` -### Connectors_Delete +### AzureDevOpsProjects_Get ```java -/** Samples for Connectors Delete. */ -public final class ConnectorsDeleteSamples { +/** + * Samples for AzureDevOpsProjects Get. + */ +public final class AzureDevOpsProjectsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/DeleteConnectorSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json */ /** - * Sample code: Delete a cloud account connector from a subscription. - * + * Sample code: Get_AzureDevOpsProjects. + * * @param manager Entry point to SecurityManager. */ - public static void deleteACloudAccountConnectorFromASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.connectors().deleteWithResponse("aws_dev1", com.azure.core.util.Context.NONE); + public static void getAzureDevOpsProjects(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsProjects().getWithResponse("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", + "myAzDevOpsProject", com.azure.core.util.Context.NONE); } } ``` -### Connectors_Get +### AzureDevOpsProjects_List ```java -/** Samples for Connectors Get. */ -public final class ConnectorsGetSamples { +/** + * Samples for AzureDevOpsProjects List. + */ +public final class AzureDevOpsProjectsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/GetConnectorSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json */ /** - * Sample code: Details of a specific cloud account connector. - * + * Sample code: List_AzureDevOpsProjects. + * * @param manager Entry point to SecurityManager. */ - public static void detailsOfASpecificCloudAccountConnector( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.connectors().getWithResponse("aws_dev1", com.azure.core.util.Context.NONE); + public static void listAzureDevOpsProjects(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsProjects().list("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", + com.azure.core.util.Context.NONE); } } ``` -### Connectors_List +### AzureDevOpsProjects_Update ```java -/** Samples for Connectors List. */ -public final class ConnectorsListSamples { +import com.azure.resourcemanager.security.models.ActionableRemediation; +import com.azure.resourcemanager.security.models.ActionableRemediationState; +import com.azure.resourcemanager.security.models.AzureDevOpsProject; +import com.azure.resourcemanager.security.models.AzureDevOpsProjectProperties; +import com.azure.resourcemanager.security.models.OnboardingState; + +/** + * Samples for AzureDevOpsProjects Update. + */ +public final class AzureDevOpsProjectsUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/GetListConnectorSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json */ /** - * Sample code: Get all cloud accounts connectors of a subscription. - * + * Sample code: Update_AzureDevOpsProjects. + * * @param manager Entry point to SecurityManager. */ - public static void getAllCloudAccountsConnectorsOfASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.connectors().list(com.azure.core.util.Context.NONE); + public static void updateAzureDevOpsProjects(com.azure.resourcemanager.security.SecurityManager manager) { + AzureDevOpsProject resource = manager.azureDevOpsProjects().getWithResponse("myRg", "mySecurityConnectorName", + "myAzDevOpsOrg", "myAzDevOpsProject", com.azure.core.util.Context.NONE).getValue(); + resource.update() + .withProperties(new AzureDevOpsProjectProperties().withOnboardingState(OnboardingState.NOT_APPLICABLE) + .withActionableRemediation(new ActionableRemediation().withState(ActionableRemediationState.ENABLED))) + .apply(); } } ``` -### CustomAssessmentAutomations_Create +### AzureDevOpsRepos_CreateOrUpdate ```java -import com.azure.resourcemanager.security.models.SeverityEnum; -import com.azure.resourcemanager.security.models.SupportedCloudEnum; +import com.azure.resourcemanager.security.models.ActionableRemediation; +import com.azure.resourcemanager.security.models.ActionableRemediationState; +import com.azure.resourcemanager.security.models.AzureDevOpsRepositoryProperties; +import com.azure.resourcemanager.security.models.OnboardingState; -/** Samples for CustomAssessmentAutomations Create. */ -public final class CustomAssessmentAutomationsCreateSamples { +/** + * Samples for AzureDevOpsRepos CreateOrUpdate. + */ +public final class AzureDevOpsReposCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationCreate_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json */ /** - * Sample code: Create a Custom Assessment Automation. - * + * Sample code: CreateOrUpdate_AzureDevOpsRepos. + * * @param manager Entry point to SecurityManager. */ - public static void createACustomAssessmentAutomation(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customAssessmentAutomations() - .define("MyCustomAssessmentAutomation") - .withExistingResourceGroup("TestResourceGroup") - .withCompressedQuery( - "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=") - .withSupportedCloud(SupportedCloudEnum.AWS) - .withSeverity(SeverityEnum.MEDIUM) - .withDisplayName("Password Policy") - .withDescription("Data should be encrypted") - .withRemediationDescription("Encrypt store by...") + public static void createOrUpdateAzureDevOpsRepos(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsRepos().define("myAzDevOpsRepo") + .withExistingProject("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject") + .withProperties(new AzureDevOpsRepositoryProperties().withOnboardingState(OnboardingState.NOT_APPLICABLE) + .withActionableRemediation(new ActionableRemediation().withState(ActionableRemediationState.ENABLED))) .create(); } } ``` -### CustomAssessmentAutomations_Delete +### AzureDevOpsRepos_Get ```java -/** Samples for CustomAssessmentAutomations Delete. */ -public final class CustomAssessmentAutomationsDeleteSamples { +/** + * Samples for AzureDevOpsRepos Get. + */ +public final class AzureDevOpsReposGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationDelete_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json */ /** - * Sample code: Delete a Custom Assessment Automation. - * + * Sample code: Get_AzureDevOpsRepos. + * * @param manager Entry point to SecurityManager. */ - public static void deleteACustomAssessmentAutomation(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customAssessmentAutomations() - .deleteByResourceGroupWithResponse( - "TestResourceGroup", "MyCustomAssessmentAutomation", com.azure.core.util.Context.NONE); + public static void getAzureDevOpsRepos(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsRepos().getWithResponse("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", + "myAzDevOpsProject", "myAzDevOpsRepo", com.azure.core.util.Context.NONE); } } ``` -### CustomAssessmentAutomations_GetByResourceGroup +### AzureDevOpsRepos_List ```java -/** Samples for CustomAssessmentAutomations GetByResourceGroup. */ -public final class CustomAssessmentAutomationsGetByResourceGroupSamples { +/** + * Samples for AzureDevOpsRepos List. + */ +public final class AzureDevOpsReposListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationGet_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json */ /** - * Sample code: Get a Custom Assessment Automation. - * + * Sample code: List_AzureDevOpsRepos. + * * @param manager Entry point to SecurityManager. */ - public static void getACustomAssessmentAutomation(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customAssessmentAutomations() - .getByResourceGroupWithResponse( - "TestResourceGroup", "MyCustomAssessmentAutomation", com.azure.core.util.Context.NONE); + public static void listAzureDevOpsRepos(com.azure.resourcemanager.security.SecurityManager manager) { + manager.azureDevOpsRepos().list("myRg", "mySecurityConnectorName", "myAzDevOpsOrg", "myAzDevOpsProject", + com.azure.core.util.Context.NONE); } } ``` -### CustomAssessmentAutomations_List +### AzureDevOpsRepos_Update ```java -/** Samples for CustomAssessmentAutomations List. */ -public final class CustomAssessmentAutomationsListSamples { +import com.azure.resourcemanager.security.models.ActionableRemediation; +import com.azure.resourcemanager.security.models.ActionableRemediationState; +import com.azure.resourcemanager.security.models.AzureDevOpsRepository; +import com.azure.resourcemanager.security.models.AzureDevOpsRepositoryProperties; +import com.azure.resourcemanager.security.models.OnboardingState; + +/** + * Samples for AzureDevOpsRepos Update. + */ +public final class AzureDevOpsReposUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationListBySubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json */ /** - * Sample code: List Custom Assessment Automations in a subscription. - * + * Sample code: Update_AzureDevOpsRepos. + * * @param manager Entry point to SecurityManager. */ - public static void listCustomAssessmentAutomationsInASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.customAssessmentAutomations().list(com.azure.core.util.Context.NONE); + public static void updateAzureDevOpsRepos(com.azure.resourcemanager.security.SecurityManager manager) { + AzureDevOpsRepository resource = manager.azureDevOpsRepos().getWithResponse("myRg", "mySecurityConnectorName", + "myAzDevOpsOrg", "myAzDevOpsProject", "myAzDevOpsRepo", com.azure.core.util.Context.NONE).getValue(); + resource.update() + .withProperties(new AzureDevOpsRepositoryProperties().withOnboardingState(OnboardingState.NOT_APPLICABLE) + .withActionableRemediation(new ActionableRemediation().withState(ActionableRemediationState.ENABLED))) + .apply(); } } ``` -### CustomAssessmentAutomations_ListByResourceGroup +### ComplianceResults_Get ```java -/** Samples for CustomAssessmentAutomations ListByResourceGroup. */ -public final class CustomAssessmentAutomationsListByResourceGroupSamples { +/** + * Samples for ComplianceResults Get. + */ +public final class ComplianceResultsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationListByResourceGroup_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2017-08-01/examples/ComplianceResults/ + * GetComplianceResults_example.json */ /** - * Sample code: List Custom Assessment Automations in a subscription and a resource group. - * + * Sample code: Get compliance results on subscription. + * * @param manager Entry point to SecurityManager. */ - public static void listCustomAssessmentAutomationsInASubscriptionAndAResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customAssessmentAutomations() - .listByResourceGroup("TestResourceGroup", com.azure.core.util.Context.NONE); + public static void getComplianceResultsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.complianceResults().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "DesignateMoreThanOneOwner", com.azure.core.util.Context.NONE); } } ``` -### CustomEntityStoreAssignments_Create +### ComplianceResults_List ```java -/** Samples for CustomEntityStoreAssignments Create. */ -public final class CustomEntityStoreAssignmentsCreateSamples { +/** + * Samples for ComplianceResults List. + */ +public final class ComplianceResultsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2017-08-01/examples/ComplianceResults/ + * ListComplianceResults_example.json */ /** - * Sample code: Create a custom entity store assignment. - * + * Sample code: Get compliance results on subscription. + * * @param manager Entry point to SecurityManager. */ - public static void createACustomEntityStoreAssignment(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customEntityStoreAssignments() - .define("33e7cc6e-a139-4723-a0e5-76993aee0771") - .withExistingResourceGroup("TestResourceGroup") - .withPrincipal("aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47") - .create(); + public static void getComplianceResultsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.complianceResults().list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + com.azure.core.util.Context.NONE); + } +} +``` + +### Compliances_Get + +```java +/** + * Samples for Compliances Get. + */ +public final class CompliancesGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Compliances/ + * GetCompliance_example.json + */ + /** + * Sample code: Get security compliance data for a day. + * + * @param manager Entry point to SecurityManager. + */ + public static void getSecurityComplianceDataForADay(com.azure.resourcemanager.security.SecurityManager manager) { + manager.compliances().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "2018-01-01Z", + com.azure.core.util.Context.NONE); + } +} +``` + +### Compliances_List + +```java +/** + * Samples for Compliances List. + */ +public final class CompliancesListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/Compliances/ + * GetCompliances_example.json + */ + /** + * Sample code: Get security compliance data over time. + * + * @param manager Entry point to SecurityManager. + */ + public static void getSecurityComplianceDataOverTime(com.azure.resourcemanager.security.SecurityManager manager) { + manager.compliances().list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + com.azure.core.util.Context.NONE); + } +} +``` + +### Connectors_CreateOrUpdate + +```java +import com.azure.resourcemanager.security.models.AutoProvision; +import com.azure.resourcemanager.security.models.AwAssumeRoleAuthenticationDetailsProperties; +import com.azure.resourcemanager.security.models.AwsCredsAuthenticationDetailsProperties; +import com.azure.resourcemanager.security.models.GcpCredentialsDetailsProperties; +import com.azure.resourcemanager.security.models.HybridComputeSettingsProperties; +import com.azure.resourcemanager.security.models.ProxyServerProperties; +import com.azure.resourcemanager.security.models.ServicePrincipalProperties; + +/** + * Samples for Connectors CreateOrUpdate. + */ +public final class ConnectorsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/ + * CreateUpdateGcpCredentialsConnectorSubscription_example.json + */ + /** + * Sample code: gcpCredentials - Create a cloud account connector for a subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void gcpCredentialsCreateACloudAccountConnectorForASubscription( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.connectors().define("gcp_dev") + .withHybridComputeSettings(new HybridComputeSettingsProperties().withAutoProvision(AutoProvision.OFF)) + .withAuthenticationDetails(new GcpCredentialsDetailsProperties().withOrganizationId("AscDemoOrg") + .withType("service_account").withProjectId("asc-project-1234").withPrivateKeyId("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder") + .withClientEmail("asc-135@asc-project-1234.iam.gserviceaccount.com") + .withClientId("105889053725632919854").withAuthUri("https://accounts.google.com/o/oauth2/auth") + .withTokenUri("fakeTokenPlaceholder") + .withAuthProviderX509CertUrl("https://www.googleapis.com/oauth2/v1/certs").withClientX509CertUrl( + "https://www.googleapis.com/robot/v1/metadata/x509/asc-135%40asc-project-1234.iam.gserviceaccount.com")) + .create(); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/ + * CreateUpdateAwsCredConnectorSubscription_example.json + */ + /** + * Sample code: AwsCred - Create a cloud account connector for a subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void awsCredCreateACloudAccountConnectorForASubscription( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.connectors().define("aws_dev1") + .withHybridComputeSettings(new HybridComputeSettingsProperties().withAutoProvision(AutoProvision.ON) + .withResourceGroupName("AwsConnectorRG").withRegion("West US 2") + .withProxyServer(new ProxyServerProperties().withIp("167.220.197.140").withPort("34")) + .withServicePrincipal(new ServicePrincipalProperties() + .withApplicationId("ad9bcd79-be9c-45ab-abd8-80ca1654a7d1").withSecret("fakeTokenPlaceholder"))) + .withAuthenticationDetails(new AwsCredsAuthenticationDetailsProperties() + .withAwsAccessKeyId("fakeTokenPlaceholder").withAwsSecretAccessKey("fakeTokenPlaceholder")) + .create(); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/ + * CreateUpdateAwsAssumeRoleConnectorSubscription_example.json + */ + /** + * Sample code: AwsAssumeRole - Create a cloud account connector for a subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void awsAssumeRoleCreateACloudAccountConnectorForASubscription( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.connectors().define("aws_dev2") + .withHybridComputeSettings(new HybridComputeSettingsProperties().withAutoProvision(AutoProvision.ON) + .withResourceGroupName("AwsConnectorRG").withRegion("West US 2") + .withProxyServer(new ProxyServerProperties().withIp("167.220.197.140").withPort("34")) + .withServicePrincipal(new ServicePrincipalProperties() + .withApplicationId("ad9bcd79-be9c-45ab-abd8-80ca1654a7d1").withSecret("fakeTokenPlaceholder"))) + .withAuthenticationDetails(new AwAssumeRoleAuthenticationDetailsProperties() + .withAwsAssumeRoleArn("arn:aws:iam::81231569658:role/AscConnector") + .withAwsExternalId("20ff7fc3-e762-44dd-bd96-b71116dcdc23")) + .create(); + } +} +``` + +### Connectors_Delete + +```java +/** + * Samples for Connectors Delete. + */ +public final class ConnectorsDeleteSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/ + * DeleteConnectorSubscription_example.json + */ + /** + * Sample code: Delete a cloud account connector from a subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void + deleteACloudAccountConnectorFromASubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.connectors().deleteWithResponse("aws_dev1", com.azure.core.util.Context.NONE); + } +} +``` + +### Connectors_Get + +```java +/** + * Samples for Connectors Get. + */ +public final class ConnectorsGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/ + * GetConnectorSubscription_example.json + */ + /** + * Sample code: Details of a specific cloud account connector. + * + * @param manager Entry point to SecurityManager. + */ + public static void + detailsOfASpecificCloudAccountConnector(com.azure.resourcemanager.security.SecurityManager manager) { + manager.connectors().getWithResponse("aws_dev1", com.azure.core.util.Context.NONE); + } +} +``` + +### Connectors_List + +```java +/** + * Samples for Connectors List. + */ +public final class ConnectorsListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/Connectors/ + * GetListConnectorSubscription_example.json + */ + /** + * Sample code: Get all cloud accounts connectors of a subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void + getAllCloudAccountsConnectorsOfASubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.connectors().list(com.azure.core.util.Context.NONE); + } +} +``` + +### CustomAssessmentAutomations_Create + +```java +import com.azure.resourcemanager.security.models.SeverityEnum; +import com.azure.resourcemanager.security.models.SupportedCloudEnum; + +/** + * Samples for CustomAssessmentAutomations Create. + */ +public final class CustomAssessmentAutomationsCreateSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomAssessmentAutomations/customAssessmentAutomationCreate_example.json + */ + /** + * Sample code: Create a Custom Assessment Automation. + * + * @param manager Entry point to SecurityManager. + */ + public static void createACustomAssessmentAutomation(com.azure.resourcemanager.security.SecurityManager manager) { + manager.customAssessmentAutomations().define("MyCustomAssessmentAutomation") + .withExistingResourceGroup("TestResourceGroup") + .withCompressedQuery( + "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=") + .withSupportedCloud(SupportedCloudEnum.AWS).withSeverity(SeverityEnum.MEDIUM) + .withDisplayName("Password Policy").withDescription("Data should be encrypted") + .withRemediationDescription("Encrypt store by...").create(); + } +} +``` + +### CustomAssessmentAutomations_Delete + +```java +/** + * Samples for CustomAssessmentAutomations Delete. + */ +public final class CustomAssessmentAutomationsDeleteSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomAssessmentAutomations/customAssessmentAutomationDelete_example.json + */ + /** + * Sample code: Delete a Custom Assessment Automation. + * + * @param manager Entry point to SecurityManager. + */ + public static void deleteACustomAssessmentAutomation(com.azure.resourcemanager.security.SecurityManager manager) { + manager.customAssessmentAutomations().deleteByResourceGroupWithResponse("TestResourceGroup", + "MyCustomAssessmentAutomation", com.azure.core.util.Context.NONE); + } +} +``` + +### CustomAssessmentAutomations_GetByResourceGroup + +```java +/** + * Samples for CustomAssessmentAutomations GetByResourceGroup. + */ +public final class CustomAssessmentAutomationsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomAssessmentAutomations/customAssessmentAutomationGet_example.json + */ + /** + * Sample code: Get a Custom Assessment Automation. + * + * @param manager Entry point to SecurityManager. + */ + public static void getACustomAssessmentAutomation(com.azure.resourcemanager.security.SecurityManager manager) { + manager.customAssessmentAutomations().getByResourceGroupWithResponse("TestResourceGroup", + "MyCustomAssessmentAutomation", com.azure.core.util.Context.NONE); + } +} +``` + +### CustomAssessmentAutomations_List + +```java +/** + * Samples for CustomAssessmentAutomations List. + */ +public final class CustomAssessmentAutomationsListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomAssessmentAutomations/customAssessmentAutomationListBySubscription_example.json + */ + /** + * Sample code: List Custom Assessment Automations in a subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void + listCustomAssessmentAutomationsInASubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.customAssessmentAutomations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### CustomAssessmentAutomations_ListByResourceGroup + +```java +/** + * Samples for CustomAssessmentAutomations ListByResourceGroup. + */ +public final class CustomAssessmentAutomationsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomAssessmentAutomations/customAssessmentAutomationListByResourceGroup_example.json + */ + /** + * Sample code: List Custom Assessment Automations in a subscription and a resource group. + * + * @param manager Entry point to SecurityManager. + */ + public static void listCustomAssessmentAutomationsInASubscriptionAndAResourceGroup( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.customAssessmentAutomations().listByResourceGroup("TestResourceGroup", + com.azure.core.util.Context.NONE); + } +} +``` + +### CustomEntityStoreAssignments_Create + +```java +/** + * Samples for CustomEntityStoreAssignments Create. + */ +public final class CustomEntityStoreAssignmentsCreateSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json + */ + /** + * Sample code: Create a custom entity store assignment. + * + * @param manager Entry point to SecurityManager. + */ + public static void createACustomEntityStoreAssignment(com.azure.resourcemanager.security.SecurityManager manager) { + manager.customEntityStoreAssignments().define("33e7cc6e-a139-4723-a0e5-76993aee0771") + .withExistingResourceGroup("TestResourceGroup") + .withPrincipal("aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47") + .create(); } } ``` @@ -2595,21 +3074,23 @@ public final class CustomEntityStoreAssignmentsCreateSamples { ### CustomEntityStoreAssignments_Delete ```java -/** Samples for CustomEntityStoreAssignments Delete. */ +/** + * Samples for CustomEntityStoreAssignments Delete. + */ public final class CustomEntityStoreAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json */ /** * Sample code: Delete a custom entity store assignment. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteACustomEntityStoreAssignment(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customEntityStoreAssignments() - .deleteByResourceGroupWithResponse( - "TestResourceGroup", "33e7cc6e-a139-4723-a0e5-76993aee0771", com.azure.core.util.Context.NONE); + manager.customEntityStoreAssignments().deleteByResourceGroupWithResponse("TestResourceGroup", + "33e7cc6e-a139-4723-a0e5-76993aee0771", com.azure.core.util.Context.NONE); } } ``` @@ -2617,21 +3098,23 @@ public final class CustomEntityStoreAssignmentsDeleteSamples { ### CustomEntityStoreAssignments_GetByResourceGroup ```java -/** Samples for CustomEntityStoreAssignments GetByResourceGroup. */ +/** + * Samples for CustomEntityStoreAssignments GetByResourceGroup. + */ public final class CustomEntityStoreAssignmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json */ /** * Sample code: Get a custom entity store assignment. - * + * * @param manager Entry point to SecurityManager. */ public static void getACustomEntityStoreAssignment(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customEntityStoreAssignments() - .getByResourceGroupWithResponse( - "TestResourceGroup", "33e7cc6e-a139-4723-a0e5-76993aee0771", com.azure.core.util.Context.NONE); + manager.customEntityStoreAssignments().getByResourceGroupWithResponse("TestResourceGroup", + "33e7cc6e-a139-4723-a0e5-76993aee0771", com.azure.core.util.Context.NONE); } } ``` @@ -2639,18 +3122,22 @@ public final class CustomEntityStoreAssignmentsGetByResourceGroupSamples { ### CustomEntityStoreAssignments_List ```java -/** Samples for CustomEntityStoreAssignments List. */ +/** + * Samples for CustomEntityStoreAssignments List. + */ public final class CustomEntityStoreAssignmentsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json */ /** * Sample code: List custom entity store assignments in a subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void listCustomEntityStoreAssignmentsInASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listCustomEntityStoreAssignmentsInASubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.customEntityStoreAssignments().list(com.azure.core.util.Context.NONE); } } @@ -2658,22 +3145,296 @@ public final class CustomEntityStoreAssignmentsListSamples { ### CustomEntityStoreAssignments_ListByResourceGroup -```java -/** Samples for CustomEntityStoreAssignments ListByResourceGroup. */ -public final class CustomEntityStoreAssignmentsListByResourceGroupSamples { +```java +/** + * Samples for CustomEntityStoreAssignments ListByResourceGroup. + */ +public final class CustomEntityStoreAssignmentsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/ + * CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json + */ + /** + * Sample code: List custom entity store assignments in a subscription and a resource group. + * + * @param manager Entry point to SecurityManager. + */ + public static void listCustomEntityStoreAssignmentsInASubscriptionAndAResourceGroup( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.customEntityStoreAssignments().listByResourceGroup("TestResourceGroup", + com.azure.core.util.Context.NONE); + } +} +``` + +### DefenderForStorage_Create + +```java +import com.azure.resourcemanager.security.models.SettingName; + +/** + * Samples for DefenderForStorage Create. + */ +public final class DefenderForStorageCreateSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-12-01-preview/examples/DefenderForStorage + * /PutDefenderForStorageSettings_example.json + */ + /** + * Sample code: Creates or updates the Defender for Storage settings on a specified resource. + * + * @param manager Entry point to SecurityManager. + */ + public static void createsOrUpdatesTheDefenderForStorageSettingsOnASpecifiedResource( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.defenderForStorages().define(SettingName.CURRENT).withExistingResourceId( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount") + .withIsEnabled(true).withOverrideSubscriptionLevelSettings(true) + .withScanResultsEventGridTopicResourceId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic") + .withIsEnabledMalwareScanningIsEnabled(true).withCapGBPerMonth(-1) + .withIsEnabledSensitiveDataDiscoveryIsEnabled(true).create(); + } +} +``` + +### DefenderForStorage_Get + +```java +import com.azure.resourcemanager.security.models.SettingName; + +/** + * Samples for DefenderForStorage Get. + */ +public final class DefenderForStorageGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-12-01-preview/examples/DefenderForStorage + * /GetDefenderForStorageSettings_example.json + */ + /** + * Sample code: Gets the Defender for Storage settings for the specified resource. + * + * @param manager Entry point to SecurityManager. + */ + public static void getsTheDefenderForStorageSettingsForTheSpecifiedResource( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.defenderForStorages().getWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", + SettingName.CURRENT, com.azure.core.util.Context.NONE); + } +} +``` + +### DevOpsConfigurations_CreateOrUpdate + +```java +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; +import com.azure.resourcemanager.security.models.Authorization; +import com.azure.resourcemanager.security.models.AutoDiscovery; +import com.azure.resourcemanager.security.models.DevOpsConfigurationProperties; +import java.util.Arrays; + +/** + * Samples for DevOpsConfigurations CreateOrUpdate. + */ +public final class DevOpsConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json + */ + /** + * Sample code: CreateOrUpdate_DevOpsConfigurations_OnboardCurrentAndFuture. + * + * @param manager Entry point to SecurityManager. + */ + public static void createOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsConfigurations().createOrUpdate("myRg", "mySecurityConnectorName", + new DevOpsConfigurationInner().withProperties(new DevOpsConfigurationProperties() + .withAuthorization(new Authorization().withCode("fakeTokenPlaceholder")) + .withAutoDiscovery(AutoDiscovery.ENABLED)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json + */ + /** + * Sample code: CreateOrUpdate_DevOpsConfigurations_OnboardCurrentOnly. + * + * @param manager Entry point to SecurityManager. + */ + public static void createOrUpdateDevOpsConfigurationsOnboardCurrentOnly( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsConfigurations().createOrUpdate("myRg", "mySecurityConnectorName", + new DevOpsConfigurationInner().withProperties(new DevOpsConfigurationProperties() + .withAuthorization(new Authorization().withCode("fakeTokenPlaceholder")) + .withAutoDiscovery(AutoDiscovery.DISABLED)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json + */ + /** + * Sample code: CreateOrUpdate_DevOpsConfigurations_OnboardSelected. + * + * @param manager Entry point to SecurityManager. + */ + public static void + createOrUpdateDevOpsConfigurationsOnboardSelected(com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsConfigurations().createOrUpdate("myRg", "mySecurityConnectorName", + new DevOpsConfigurationInner().withProperties(new DevOpsConfigurationProperties() + .withAuthorization(new Authorization().withCode("fakeTokenPlaceholder")) + .withAutoDiscovery(AutoDiscovery.DISABLED).withTopLevelInventoryList(Arrays.asList("org1", "org2"))), + com.azure.core.util.Context.NONE); + } +} +``` + +### DevOpsConfigurations_Delete + +```java +/** + * Samples for DevOpsConfigurations Delete. + */ +public final class DevOpsConfigurationsDeleteSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json + */ + /** + * Sample code: Delete_DevOpsConfigurations. + * + * @param manager Entry point to SecurityManager. + */ + public static void deleteDevOpsConfigurations(com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsConfigurations().delete("myRg", "mySecurityConnectorName", com.azure.core.util.Context.NONE); + } +} +``` + +### DevOpsConfigurations_Get + +```java +/** + * Samples for DevOpsConfigurations Get. + */ +public final class DevOpsConfigurationsGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json + */ + /** + * Sample code: Get_DevOpsConfigurations. + * + * @param manager Entry point to SecurityManager. + */ + public static void getDevOpsConfigurations(com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsConfigurations().getWithResponse("myRg", "mySecurityConnectorName", + com.azure.core.util.Context.NONE); + } +} +``` + +### DevOpsConfigurations_List + +```java +/** + * Samples for DevOpsConfigurations List. + */ +public final class DevOpsConfigurationsListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListDevOpsConfigurations_example.json + */ + /** + * Sample code: List_DevOpsConfigurations. + * + * @param manager Entry point to SecurityManager. + */ + public static void listDevOpsConfigurations(com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsConfigurations().list("myRg", "mySecurityConnectorName", com.azure.core.util.Context.NONE); + } +} +``` + +### DevOpsConfigurations_Update + +```java +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; +import com.azure.resourcemanager.security.models.AutoDiscovery; +import com.azure.resourcemanager.security.models.DevOpsConfigurationProperties; + +/** + * Samples for DevOpsConfigurations Update. + */ +public final class DevOpsConfigurationsUpdateSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json + */ + /** + * Sample code: Update_DevOpsConfigurations. + * + * @param manager Entry point to SecurityManager. + */ + public static void updateDevOpsConfigurations(com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsConfigurations().update("myRg", "mySecurityConnectorName", + new DevOpsConfigurationInner() + .withProperties(new DevOpsConfigurationProperties().withAutoDiscovery(AutoDiscovery.ENABLED)), + com.azure.core.util.Context.NONE); + } +} +``` + +### DevOpsOperationResults_Get + +```java +/** + * Samples for DevOpsOperationResults Get. + */ +public final class DevOpsOperationResultsGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json + */ + /** + * Sample code: Get_DevOpsOperationResults_Failed. + * + * @param manager Entry point to SecurityManager. + */ + public static void getDevOpsOperationResultsFailed(com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsOperationResults().getWithResponse("myRg", "mySecurityConnectorName", + "8d4caace-e7b3-4b3e-af99-73f76829ebcf", com.azure.core.util.Context.NONE); + } + /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json */ /** - * Sample code: List custom entity store assignments in a subscription and a resource group. - * + * Sample code: Get_DevOpsOperationResults_Succeeded. + * * @param manager Entry point to SecurityManager. */ - public static void listCustomEntityStoreAssignmentsInASubscriptionAndAResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .customEntityStoreAssignments() - .listByResourceGroup("TestResourceGroup", com.azure.core.util.Context.NONE); + public static void getDevOpsOperationResultsSucceeded(com.azure.resourcemanager.security.SecurityManager manager) { + manager.devOpsOperationResults().getWithResponse("myRg", "mySecurityConnectorName", + "4e826cf1-5c36-4808-a7d2-fb4f5170978b", com.azure.core.util.Context.NONE); } } ``` @@ -2685,31 +3446,26 @@ import com.azure.resourcemanager.security.models.ActiveConnectionsNotInAllowedRa import java.time.Duration; import java.util.Arrays; -/** Samples for DeviceSecurityGroups CreateOrUpdate. */ +/** + * Samples for DeviceSecurityGroups CreateOrUpdate. + */ public final class DeviceSecurityGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/PutDeviceSecurityGroups_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/ + * PutDeviceSecurityGroups_example.json */ /** * Sample code: Create or update a device security group for the specified IoT hub resource. - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateADeviceSecurityGroupForTheSpecifiedIoTHubResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .deviceSecurityGroups() - .define("samplesecuritygroup") - .withExistingResourceId( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub") - .withTimeWindowRules( - Arrays - .asList( - new ActiveConnectionsNotInAllowedRange() - .withIsEnabled(true) - .withMinThreshold(0) - .withMaxThreshold(30) - .withTimeWindowSize(Duration.parse("PT05M")))) + manager.deviceSecurityGroups().define("samplesecuritygroup").withExistingResourceId( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub") + .withTimeWindowRules(Arrays.asList(new ActiveConnectionsNotInAllowedRange().withIsEnabled(true) + .withMinThreshold(0).withMaxThreshold(30).withTimeWindowSize(Duration.parse("PT05M")))) .create(); } } @@ -2718,24 +3474,25 @@ public final class DeviceSecurityGroupsCreateOrUpdateSamples { ### DeviceSecurityGroups_Delete ```java -/** Samples for DeviceSecurityGroups Delete. */ +/** + * Samples for DeviceSecurityGroups Delete. + */ public final class DeviceSecurityGroupsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/DeleteDeviceSecurityGroups_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/ + * DeleteDeviceSecurityGroups_example.json */ /** * Sample code: Delete a device security group for the specified IoT Hub resource. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteADeviceSecurityGroupForTheSpecifiedIoTHubResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .deviceSecurityGroups() - .deleteByResourceGroupWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", - "samplesecuritygroup", - com.azure.core.util.Context.NONE); + manager.deviceSecurityGroups().deleteByResourceGroupWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", + "samplesecuritygroup", com.azure.core.util.Context.NONE); } } ``` @@ -2743,24 +3500,25 @@ public final class DeviceSecurityGroupsDeleteSamples { ### DeviceSecurityGroups_Get ```java -/** Samples for DeviceSecurityGroups Get. */ +/** + * Samples for DeviceSecurityGroups Get. + */ public final class DeviceSecurityGroupsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/GetDeviceSecurityGroups_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/ + * GetDeviceSecurityGroups_example.json */ /** * Sample code: Get a device security group for the specified IoT Hub resource. - * + * * @param manager Entry point to SecurityManager. */ public static void getADeviceSecurityGroupForTheSpecifiedIoTHubResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .deviceSecurityGroups() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", - "samplesecuritygroup", - com.azure.core.util.Context.NONE); + manager.deviceSecurityGroups().getWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", + "samplesecuritygroup", com.azure.core.util.Context.NONE); } } ``` @@ -2768,23 +3526,25 @@ public final class DeviceSecurityGroupsGetSamples { ### DeviceSecurityGroups_List ```java -/** Samples for DeviceSecurityGroups List. */ +/** + * Samples for DeviceSecurityGroups List. + */ public final class DeviceSecurityGroupsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/ListDeviceSecurityGroups_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/DeviceSecurityGroups/ + * ListDeviceSecurityGroups_example.json */ /** * Sample code: List all device security groups for the specified IoT Hub resource. - * + * * @param manager Entry point to SecurityManager. */ public static void listAllDeviceSecurityGroupsForTheSpecifiedIoTHubResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .deviceSecurityGroups() - .list( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", - com.azure.core.util.Context.NONE); + manager.deviceSecurityGroups().list( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub", + com.azure.core.util.Context.NONE); } } ``` @@ -2792,21 +3552,24 @@ public final class DeviceSecurityGroupsListSamples { ### DiscoveredSecuritySolutions_Get ```java -/** Samples for DiscoveredSecuritySolutions Get. */ +/** + * Samples for DiscoveredSecuritySolutions Get. + */ public final class DiscoveredSecuritySolutionsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions/GetDiscoveredSecuritySolutionResourceGroupLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions + * /GetDiscoveredSecuritySolutionResourceGroupLocation_example.json */ /** * Sample code: Get discovered security solution from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getDiscoveredSecuritySolutionFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .discoveredSecuritySolutions() - .getWithResponse("myRg2", "centralus", "paloalto7", com.azure.core.util.Context.NONE); + manager.discoveredSecuritySolutions().getWithResponse("myRg2", "centralus", "paloalto7", + com.azure.core.util.Context.NONE); } } ``` @@ -2814,14 +3577,18 @@ public final class DiscoveredSecuritySolutionsGetSamples { ### DiscoveredSecuritySolutions_List ```java -/** Samples for DiscoveredSecuritySolutions List. */ +/** + * Samples for DiscoveredSecuritySolutions List. + */ public final class DiscoveredSecuritySolutionsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions/GetDiscoveredSecuritySolutionsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions + * /GetDiscoveredSecuritySolutionsSubscription_example.json */ /** * Sample code: Get discovered security solutions. - * + * * @param manager Entry point to SecurityManager. */ public static void getDiscoveredSecuritySolutions(com.azure.resourcemanager.security.SecurityManager manager) { @@ -2833,14 +3600,18 @@ public final class DiscoveredSecuritySolutionsListSamples { ### DiscoveredSecuritySolutions_ListByHomeRegion ```java -/** Samples for DiscoveredSecuritySolutions ListByHomeRegion. */ +/** + * Samples for DiscoveredSecuritySolutions ListByHomeRegion. + */ public final class DiscoveredSecuritySolutionsListByHomeRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions/GetDiscoveredSecuritySolutionsSubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/DiscoveredSecuritySolutions + * /GetDiscoveredSecuritySolutionsSubscriptionLocation_example.json */ /** * Sample code: Get discovered security solutions from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getDiscoveredSecuritySolutionsFromASecurityDataLocation( @@ -2853,24 +3624,23 @@ public final class DiscoveredSecuritySolutionsListByHomeRegionSamples { ### ExternalSecuritySolutions_Get ```java -/** Samples for ExternalSecuritySolutions Get. */ +/** + * Samples for ExternalSecuritySolutions Get. + */ public final class ExternalSecuritySolutionsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/GetExternalSecuritySolution_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/ + * GetExternalSecuritySolution_example.json */ /** * Sample code: Get external security solution. - * + * * @param manager Entry point to SecurityManager. */ public static void getExternalSecuritySolution(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .externalSecuritySolutions() - .getWithResponse( - "defaultresourcegroup-eus", - "centralus", - "aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus", - com.azure.core.util.Context.NONE); + manager.externalSecuritySolutions().getWithResponse("defaultresourcegroup-eus", "centralus", + "aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus", com.azure.core.util.Context.NONE); } } ``` @@ -2878,18 +3648,22 @@ public final class ExternalSecuritySolutionsGetSamples { ### ExternalSecuritySolutions_List ```java -/** Samples for ExternalSecuritySolutions List. */ +/** + * Samples for ExternalSecuritySolutions List. + */ public final class ExternalSecuritySolutionsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/GetExternalSecuritySolutionsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/ + * GetExternalSecuritySolutionsSubscription_example.json */ /** * Sample code: Get external security solutions on a subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void getExternalSecuritySolutionsOnASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getExternalSecuritySolutionsOnASubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.externalSecuritySolutions().list(com.azure.core.util.Context.NONE); } } @@ -2898,14 +3672,18 @@ public final class ExternalSecuritySolutionsListSamples { ### ExternalSecuritySolutions_ListByHomeRegion ```java -/** Samples for ExternalSecuritySolutions ListByHomeRegion. */ +/** + * Samples for ExternalSecuritySolutions ListByHomeRegion. + */ public final class ExternalSecuritySolutionsListByHomeRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/GetExternalSecuritySolutionsSubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ExternalSecuritySolutions/ + * GetExternalSecuritySolutionsSubscriptionLocation_example.json */ /** * Sample code: Get external security solutions on a subscription from security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getExternalSecuritySolutionsOnASubscriptionFromSecurityDataLocation( @@ -2915,6 +3693,268 @@ public final class ExternalSecuritySolutionsListByHomeRegionSamples { } ``` +### GitHubOwners_Get + +```java +/** + * Samples for GitHubOwners Get. + */ +public final class GitHubOwnersGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetGitHubOwners_example.json + */ + /** + * Sample code: Get_GitHubOwners. + * + * @param manager Entry point to SecurityManager. + */ + public static void getGitHubOwners(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitHubOwners().getWithResponse("myRg", "mySecurityConnectorName", "myGitHubOwner", + com.azure.core.util.Context.NONE); + } +} +``` + +### GitHubOwners_List + +```java +/** + * Samples for GitHubOwners List. + */ +public final class GitHubOwnersListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListGitHubOwners_example.json + */ + /** + * Sample code: List_GitHubOwners. + * + * @param manager Entry point to SecurityManager. + */ + public static void listGitHubOwners(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitHubOwners().list("myRg", "mySecurityConnectorName", com.azure.core.util.Context.NONE); + } +} +``` + +### GitHubOwners_ListAvailable + +```java +/** + * Samples for GitHubOwners ListAvailable. + */ +public final class GitHubOwnersListAvailableSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json + */ + /** + * Sample code: ListAvailable_GitHubOwners. + * + * @param manager Entry point to SecurityManager. + */ + public static void listAvailableGitHubOwners(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitHubOwners().listAvailableWithResponse("myRg", "mySecurityConnectorName", + com.azure.core.util.Context.NONE); + } +} +``` + +### GitHubRepos_Get + +```java +/** + * Samples for GitHubRepos Get. + */ +public final class GitHubReposGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetGitHubRepos_example.json + */ + /** + * Sample code: Get_GitHubRepos. + * + * @param manager Entry point to SecurityManager. + */ + public static void getGitHubRepos(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitHubRepos().getWithResponse("myRg", "mySecurityConnectorName", "myGitHubOwner", "myGitHubRepo", + com.azure.core.util.Context.NONE); + } +} +``` + +### GitHubRepos_List + +```java +/** + * Samples for GitHubRepos List. + */ +public final class GitHubReposListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListGitHubRepos_example.json + */ + /** + * Sample code: List_GitHubRepos. + * + * @param manager Entry point to SecurityManager. + */ + public static void listGitHubRepos(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitHubRepos().list("myRg", "mySecurityConnectorName", "myGitHubOwner", + com.azure.core.util.Context.NONE); + } +} +``` + +### GitLabGroups_Get + +```java +/** + * Samples for GitLabGroups Get. + */ +public final class GitLabGroupsGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetGitLabGroups_example.json + */ + /** + * Sample code: Get_GitLabGroups. + * + * @param manager Entry point to SecurityManager. + */ + public static void getGitLabGroups(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitLabGroups().getWithResponse("myRg", "mySecurityConnectorName", "myGitLabGroup$mySubGroup", + com.azure.core.util.Context.NONE); + } +} +``` + +### GitLabGroups_List + +```java +/** + * Samples for GitLabGroups List. + */ +public final class GitLabGroupsListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListGitLabGroups_example.json + */ + /** + * Sample code: List_GitLabGroups. + * + * @param manager Entry point to SecurityManager. + */ + public static void listGitLabGroups(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitLabGroups().list("myRg", "mySecurityConnectorName", com.azure.core.util.Context.NONE); + } +} +``` + +### GitLabGroups_ListAvailable + +```java +/** + * Samples for GitLabGroups ListAvailable. + */ +public final class GitLabGroupsListAvailableSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json + */ + /** + * Sample code: ListAvailable_GitLabGroups. + * + * @param manager Entry point to SecurityManager. + */ + public static void listAvailableGitLabGroups(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitLabGroups().listAvailableWithResponse("myRg", "mySecurityConnectorName", + com.azure.core.util.Context.NONE); + } +} +``` + +### GitLabProjects_Get + +```java +/** + * Samples for GitLabProjects Get. + */ +public final class GitLabProjectsGetSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/GetGitLabProjects_example.json + */ + /** + * Sample code: Get_GitLabProjects. + * + * @param manager Entry point to SecurityManager. + */ + public static void getGitLabProjects(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitLabProjects().getWithResponse("myRg", "mySecurityConnectorName", "myGitLabGroup$mySubGroup", + "myGitLabProject", com.azure.core.util.Context.NONE); + } +} +``` + +### GitLabProjects_List + +```java +/** + * Samples for GitLabProjects List. + */ +public final class GitLabProjectsListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListGitLabProjects_example.json + */ + /** + * Sample code: List_GitLabProjects. + * + * @param manager Entry point to SecurityManager. + */ + public static void listGitLabProjects(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitLabProjects().list("myRg", "mySecurityConnectorName", "myGitLabGroup$mySubGroup", + com.azure.core.util.Context.NONE); + } +} +``` + +### GitLabSubgroups_List + +```java +/** + * Samples for GitLabSubgroups List. + */ +public final class GitLabSubgroupsListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/ + * SecurityConnectorsDevOps/ListGitLabSubgroups_example.json + */ + /** + * Sample code: List_GitLabSubgroups. + * + * @param manager Entry point to SecurityManager. + */ + public static void listGitLabSubgroups(com.azure.resourcemanager.security.SecurityManager manager) { + manager.gitLabSubgroups().listWithResponse("myRg", "mySecurityConnectorName", "myGitLabGroup", + com.azure.core.util.Context.NONE); + } +} +``` + ### GovernanceAssignments_CreateOrUpdate ```java @@ -2923,39 +3963,32 @@ import com.azure.resourcemanager.security.models.GovernanceEmailNotification; import com.azure.resourcemanager.security.models.RemediationEta; import java.time.OffsetDateTime; -/** Samples for GovernanceAssignments CreateOrUpdate. */ +/** + * Samples for GovernanceAssignments CreateOrUpdate. + */ public final class GovernanceAssignmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/PutGovernanceAssignment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/ + * GovernanceAssignments/PutGovernanceAssignment_example.json */ /** * Sample code: Create Governance assignment. - * + * * @param manager Entry point to SecurityManager. */ public static void createGovernanceAssignment(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceAssignments() - .define("6634ff9f-127b-4bf2-8e6e-b1737f5e789c") - .withExistingAssessment( - "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", - "6b9421dd-5555-2251-9b3d-2be58e2f82cd") - .withOwner("user@contoso.com") + manager.governanceAssignments().define("6634ff9f-127b-4bf2-8e6e-b1737f5e789c").withExistingAssessment( + "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", + "6b9421dd-5555-2251-9b3d-2be58e2f82cd").withOwner("user@contoso.com") .withRemediationDueDate(OffsetDateTime.parse("2022-01-07T13:00:00.0000000Z")) - .withRemediationEta( - new RemediationEta() - .withEta(OffsetDateTime.parse("2022-01-08T13:00:00.0000000Z")) - .withJustification("Justification of ETA")) + .withRemediationEta(new RemediationEta().withEta(OffsetDateTime.parse("2022-01-08T13:00:00.0000000Z")) + .withJustification("Justification of ETA")) .withIsGracePeriod(true) - .withGovernanceEmailNotification( - new GovernanceEmailNotification() - .withDisableManagerEmailNotification(false) - .withDisableOwnerEmailNotification(false)) - .withAdditionalData( - new GovernanceAssignmentAdditionalData() - .withTicketNumber(123123) - .withTicketLink("https://snow.com") - .withTicketStatus("Active")) + .withGovernanceEmailNotification(new GovernanceEmailNotification() + .withDisableManagerEmailNotification(false).withDisableOwnerEmailNotification(false)) + .withAdditionalData(new GovernanceAssignmentAdditionalData().withTicketNumber(123123) + .withTicketLink("https://snow.com").withTicketStatus("Active")) .create(); } } @@ -2964,24 +3997,25 @@ public final class GovernanceAssignmentsCreateOrUpdateSamples { ### GovernanceAssignments_Delete ```java -/** Samples for GovernanceAssignments Delete. */ +/** + * Samples for GovernanceAssignments Delete. + */ public final class GovernanceAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/DeleteGovernanceAssignment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/ + * GovernanceAssignments/DeleteGovernanceAssignment_example.json */ /** * Sample code: Delete security assignment. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteSecurityAssignment(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceAssignments() - .deleteWithResponse( - "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", - "6b9421dd-5555-2251-9b3d-2be58e2f82cd", - "6634ff9f-127b-4bf2-8e6e-b1737f5e789c", - com.azure.core.util.Context.NONE); + manager.governanceAssignments().deleteWithResponse( + "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", + "6b9421dd-5555-2251-9b3d-2be58e2f82cd", "6634ff9f-127b-4bf2-8e6e-b1737f5e789c", + com.azure.core.util.Context.NONE); } } ``` @@ -2989,25 +4023,26 @@ public final class GovernanceAssignmentsDeleteSamples { ### GovernanceAssignments_Get ```java -/** Samples for GovernanceAssignments Get. */ +/** + * Samples for GovernanceAssignments Get. + */ public final class GovernanceAssignmentsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/GetGovernanceAssignment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/ + * GovernanceAssignments/GetGovernanceAssignment_example.json */ /** * Sample code: Get governanceAssignment by specific governanceAssignmentKey. - * + * * @param manager Entry point to SecurityManager. */ public static void getGovernanceAssignmentBySpecificGovernanceAssignmentKey( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceAssignments() - .getWithResponse( - "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", - "6b9421dd-5555-2251-9b3d-2be58e2f82cd", - "6634ff9f-127b-4bf2-8e6e-b1737f5e789c", - com.azure.core.util.Context.NONE); + manager.governanceAssignments().getWithResponse( + "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012", + "6b9421dd-5555-2251-9b3d-2be58e2f82cd", "6634ff9f-127b-4bf2-8e6e-b1737f5e789c", + com.azure.core.util.Context.NONE); } } ``` @@ -3015,23 +4050,23 @@ public final class GovernanceAssignmentsGetSamples { ### GovernanceAssignments_List ```java -/** Samples for GovernanceAssignments List. */ +/** + * Samples for GovernanceAssignments List. + */ public final class GovernanceAssignmentsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceAssignments/ListGovernanceAssignments_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/ + * GovernanceAssignments/ListGovernanceAssignments_example.json */ /** * Sample code: List governance assignments. - * + * * @param manager Entry point to SecurityManager. */ public static void listGovernanceAssignments(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceAssignments() - .list( - "subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd", - "6b9421dd-5555-2251-9b3d-2be58e2f82cd", - com.azure.core.util.Context.NONE); + manager.governanceAssignments().list("subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd", + "6b9421dd-5555-2251-9b3d-2be58e2f82cd", com.azure.core.util.Context.NONE); } } ``` @@ -3049,136 +4084,92 @@ import com.azure.resourcemanager.security.models.GovernanceRuleType; import java.io.IOException; import java.util.Arrays; -/** Samples for GovernanceRules CreateOrUpdate. */ +/** + * Samples for GovernanceRules CreateOrUpdate. + */ public final class GovernanceRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PutManagementGroupGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * PutManagementGroupGovernanceRule_example.json */ /** * Sample code: Create or update governance rule over management group scope. - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateGovernanceRuleOverManagementGroupScope( com.azure.resourcemanager.security.SecurityManager manager) throws IOException { - manager - .governanceRules() - .define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8") + manager.governanceRules().define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8") .withExistingScope("providers/Microsoft.Management/managementGroups/contoso") - .withDisplayName("Management group rule") - .withDescription("A rule for a management group") - .withRemediationTimeframe("7.00:00:00") - .withIsGracePeriod(true) - .withRulePriority(200) - .withIsDisabled(false) + .withDisplayName("Management group rule").withDescription("A rule for a management group") + .withRemediationTimeframe("7.00:00:00").withIsGracePeriod(true).withRulePriority(200).withIsDisabled(false) .withRuleType(GovernanceRuleType.INTEGRATED) .withSourceResourceType(GovernanceRuleSourceResourceType.ASSESSMENTS) .withExcludedScopes(Arrays.asList("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")) - .withConditionSets( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"conditions\":[{\"operator\":\"In\",\"property\":\"$.AssessmentKey\",\"value\":\"[\\\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\\\"," - + " \\\"fe83f80b-073d-4ccf-93d9-6797eb870201\\\"]\"}]}", - Object.class, - SerializerEncoding.JSON))) - .withOwnerSource( - new GovernanceRuleOwnerSource() - .withType(GovernanceRuleOwnerSourceType.MANUALLY) - .withValue("user@contoso.com")) - .withGovernanceEmailNotification( - new GovernanceRuleEmailNotification() - .withDisableManagerEmailNotification(true) - .withDisableOwnerEmailNotification(false)) + .withConditionSets(Arrays.asList(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"conditions\":[{\"operator\":\"In\",\"property\":\"$.AssessmentKey\",\"value\":\"[\\\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\\\", \\\"fe83f80b-073d-4ccf-93d9-6797eb870201\\\"]\"}]}", + Object.class, SerializerEncoding.JSON))) + .withOwnerSource(new GovernanceRuleOwnerSource().withType(GovernanceRuleOwnerSourceType.MANUALLY) + .withValue("user@contoso.com")) + .withGovernanceEmailNotification(new GovernanceRuleEmailNotification() + .withDisableManagerEmailNotification(true).withDisableOwnerEmailNotification(false)) .create(); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PutSecurityConnectorGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * PutSecurityConnectorGovernanceRule_example.json */ /** * Sample code: Create or update governance rule over security connector scope. - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateGovernanceRuleOverSecurityConnectorScope( com.azure.resourcemanager.security.SecurityManager manager) throws IOException { - manager - .governanceRules() - .define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8") - .withExistingScope( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector") - .withDisplayName("GCP Admin's rule") - .withDescription("A rule on critical GCP recommendations") - .withRemediationTimeframe("7.00:00:00") - .withIsGracePeriod(true) - .withRulePriority(200) - .withIsDisabled(false) + manager.governanceRules().define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8").withExistingScope( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector") + .withDisplayName("GCP Admin's rule").withDescription("A rule on critical GCP recommendations") + .withRemediationTimeframe("7.00:00:00").withIsGracePeriod(true).withRulePriority(200).withIsDisabled(false) .withRuleType(GovernanceRuleType.INTEGRATED) .withSourceResourceType(GovernanceRuleSourceResourceType.ASSESSMENTS) - .withConditionSets( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"conditions\":[{\"operator\":\"In\",\"property\":\"$.AssessmentKey\",\"value\":\"[\\\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\\\"," - + " \\\"fe83f80b-073d-4ccf-93d9-6797eb870201\\\"]\"}]}", - Object.class, - SerializerEncoding.JSON))) - .withOwnerSource( - new GovernanceRuleOwnerSource() - .withType(GovernanceRuleOwnerSourceType.MANUALLY) - .withValue("user@contoso.com")) - .withGovernanceEmailNotification( - new GovernanceRuleEmailNotification() - .withDisableManagerEmailNotification(true) - .withDisableOwnerEmailNotification(false)) + .withConditionSets(Arrays.asList(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"conditions\":[{\"operator\":\"In\",\"property\":\"$.AssessmentKey\",\"value\":\"[\\\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\\\", \\\"fe83f80b-073d-4ccf-93d9-6797eb870201\\\"]\"}]}", + Object.class, SerializerEncoding.JSON))) + .withOwnerSource(new GovernanceRuleOwnerSource().withType(GovernanceRuleOwnerSourceType.MANUALLY) + .withValue("user@contoso.com")) + .withGovernanceEmailNotification(new GovernanceRuleEmailNotification() + .withDisableManagerEmailNotification(true).withDisableOwnerEmailNotification(false)) .create(); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PutGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * PutGovernanceRule_example.json */ /** * Sample code: Create or update governance rule over subscription scope. - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateGovernanceRuleOverSubscriptionScope( com.azure.resourcemanager.security.SecurityManager manager) throws IOException { - manager - .governanceRules() - .define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8") - .withExistingScope("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23") - .withDisplayName("Admin's rule") - .withDescription("A rule for critical recommendations") - .withRemediationTimeframe("7.00:00:00") - .withIsGracePeriod(true) - .withRulePriority(200) - .withIsDisabled(false) + manager.governanceRules().define("ad9a8e26-29d9-4829-bb30-e597a58cdbb8") + .withExistingScope("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23").withDisplayName("Admin's rule") + .withDescription("A rule for critical recommendations").withRemediationTimeframe("7.00:00:00") + .withIsGracePeriod(true).withRulePriority(200).withIsDisabled(false) .withRuleType(GovernanceRuleType.INTEGRATED) .withSourceResourceType(GovernanceRuleSourceResourceType.ASSESSMENTS) - .withConditionSets( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"conditions\":[{\"operator\":\"In\",\"property\":\"$.AssessmentKey\",\"value\":\"[\\\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\\\"," - + " \\\"fe83f80b-073d-4ccf-93d9-6797eb870201\\\"]\"}]}", - Object.class, - SerializerEncoding.JSON))) - .withOwnerSource( - new GovernanceRuleOwnerSource() - .withType(GovernanceRuleOwnerSourceType.MANUALLY) - .withValue("user@contoso.com")) - .withGovernanceEmailNotification( - new GovernanceRuleEmailNotification() - .withDisableManagerEmailNotification(false) - .withDisableOwnerEmailNotification(false)) + .withConditionSets(Arrays.asList(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"conditions\":[{\"operator\":\"In\",\"property\":\"$.AssessmentKey\",\"value\":\"[\\\"b1cd27e0-4ecc-4246-939f-49c426d9d72f\\\", \\\"fe83f80b-073d-4ccf-93d9-6797eb870201\\\"]\"}]}", + Object.class, SerializerEncoding.JSON))) + .withOwnerSource(new GovernanceRuleOwnerSource().withType(GovernanceRuleOwnerSourceType.MANUALLY) + .withValue("user@contoso.com")) + .withGovernanceEmailNotification(new GovernanceRuleEmailNotification() + .withDisableManagerEmailNotification(false).withDisableOwnerEmailNotification(false)) .create(); } } @@ -3187,60 +4178,57 @@ public final class GovernanceRulesCreateOrUpdateSamples { ### GovernanceRules_Delete ```java -/** Samples for GovernanceRules Delete. */ +/** + * Samples for GovernanceRules Delete. + */ public final class GovernanceRulesDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/DeleteManagementGroupGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * DeleteManagementGroupGovernanceRule_example.json */ /** * Sample code: Delete a Governance rule over management group scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteAGovernanceRuleOverManagementGroupScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .delete( - "providers/Microsoft.Management/managementGroups/contoso", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + public static void + deleteAGovernanceRuleOverManagementGroupScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().delete("providers/Microsoft.Management/managementGroups/contoso", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/DeleteGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * DeleteGovernanceRule_example.json */ /** * Sample code: Delete a Governance rule over subscription scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteAGovernanceRuleOverSubscriptionScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .delete( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + public static void + deleteAGovernanceRuleOverSubscriptionScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().delete("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/DeleteSecurityConnectorGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * DeleteSecurityConnectorGovernanceRule_example.json */ /** * Sample code: Delete a Governance rule over security connector scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteAGovernanceRuleOverSecurityConnectorScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .delete( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + public static void + deleteAGovernanceRuleOverSecurityConnectorScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().delete( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } } ``` @@ -3248,63 +4236,58 @@ public final class GovernanceRulesDeleteSamples { ### GovernanceRules_Execute ```java -/** Samples for GovernanceRules Execute. */ + +/** + * Samples for GovernanceRules Execute. + */ public final class GovernanceRulesExecuteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PostSecurityConnectorGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * PostSecurityConnectorGovernanceRule_example.json */ /** * Sample code: Execute governance rule over security connector scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void executeGovernanceRuleOverSecurityConnectorScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .execute( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - null, - com.azure.core.util.Context.NONE); + public static void + executeGovernanceRuleOverSecurityConnectorScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().execute( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PostGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * PostGovernanceRule_example.json */ /** * Sample code: Execute Governance rule over subscription scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void executeGovernanceRuleOverSubscriptionScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .execute( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - null, - com.azure.core.util.Context.NONE); + public static void + executeGovernanceRuleOverSubscriptionScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().execute("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/PostManagementGroupGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * PostManagementGroupGovernanceRule_example.json */ /** * Sample code: Execute governance rule over management group scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void executeGovernanceRuleOverManagementGroupScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .execute( - "providers/Microsoft.Management/managementGroups/contoso", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - null, - com.azure.core.util.Context.NONE); + public static void + executeGovernanceRuleOverManagementGroupScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().execute("providers/Microsoft.Management/managementGroups/contoso", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", null, com.azure.core.util.Context.NONE); } } ``` @@ -3312,60 +4295,57 @@ public final class GovernanceRulesExecuteSamples { ### GovernanceRules_Get ```java -/** Samples for GovernanceRules Get. */ +/** + * Samples for GovernanceRules Get. + */ public final class GovernanceRulesGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * GetManagementGroupGovernanceRule_example.json */ /** * Sample code: Get a governance rule over management group scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void getAGovernanceRuleOverManagementGroupScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .getWithResponse( - "providers/Microsoft.Management/managementGroups/contoso", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + public static void + getAGovernanceRuleOverManagementGroupScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().getWithResponse("providers/Microsoft.Management/managementGroups/contoso", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * GetGovernanceRule_example.json */ /** * Sample code: Get a governance rule over subscription scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void getAGovernanceRuleOverSubscriptionScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + public static void + getAGovernanceRuleOverSubscriptionScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRule_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * GetSecurityConnectorGovernanceRule_example.json */ /** * Sample code: Get a governance rule over security connector scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void getAGovernanceRuleOverSecurityConnectorScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .getWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + public static void + getAGovernanceRuleOverSecurityConnectorScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().getWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } } ``` @@ -3373,53 +4353,57 @@ public final class GovernanceRulesGetSamples { ### GovernanceRules_List ```java -/** Samples for GovernanceRules List. */ +/** + * Samples for GovernanceRules List. + */ public final class GovernanceRulesListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListBySubscriptionGovernanceRules_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * ListBySubscriptionGovernanceRules_example.json */ /** * Sample code: List governance rules by subscription scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void listGovernanceRulesBySubscriptionScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", com.azure.core.util.Context.NONE); + public static void + listGovernanceRulesBySubscriptionScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListBySecurityConnectorGovernanceRules_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * ListBySecurityConnectorGovernanceRules_example.json */ /** * Sample code: List governance rules by security connector scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void listGovernanceRulesBySecurityConnectorScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .list( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", - com.azure.core.util.Context.NONE); + public static void + listGovernanceRulesBySecurityConnectorScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().list( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ListByManagementGroupGovernanceRules_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * ListByManagementGroupGovernanceRules_example.json */ /** * Sample code: List governance rules by management group scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void listGovernanceRulesByManagementGroupScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .list("providers/Microsoft.Management/managementGroups/contoso", com.azure.core.util.Context.NONE); + public static void + listGovernanceRulesByManagementGroupScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.governanceRules().list("providers/Microsoft.Management/managementGroups/contoso", + com.azure.core.util.Context.NONE); } } ``` @@ -3427,87 +4411,85 @@ public final class GovernanceRulesListSamples { ### GovernanceRules_OperationResults ```java -/** Samples for GovernanceRules OperationResults. */ +/** + * Samples for GovernanceRules OperationResults. + */ public final class GovernanceRulesOperationResultsSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleExecuteStatus_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * GetManagementGroupGovernanceRuleExecuteStatus_example.json */ /** * Sample code: Get governance rules long run operation result over management group. - * + * * @param manager Entry point to SecurityManager. */ public static void getGovernanceRulesLongRunOperationResultOverManagementGroup( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .operationResultsWithResponse( - "providers/Microsoft.Management/managementGroups/contoso", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", - com.azure.core.util.Context.NONE); + manager.governanceRules().operationResultsWithResponse( + "providers/Microsoft.Management/managementGroups/contoso", "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", + "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRuleExecuteStatus_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * GetSecurityConnectorGovernanceRuleExecuteStatus_example.json */ /** * Sample code: Get governance rules long run operation result over security connector. - * + * * @param manager Entry point to SecurityManager. */ public static void getGovernanceRulesLongRunOperationResultOverSecurityConnector( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .operationResultsWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", - com.azure.core.util.Context.NONE); + manager.governanceRules().operationResultsWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRuleExecuteStatus_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/ + * GetGovernanceRuleExecuteStatus_example.json */ /** * Sample code: Get governance rules long run operation result over subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getGovernanceRulesLongRunOperationResultOverSubscription( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .governanceRules() - .operationResultsWithResponse( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", - com.azure.core.util.Context.NONE); + manager.governanceRules().operationResultsWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", "58b33f4f-c8c7-4b01-99cc-d437db4d40dd", + com.azure.core.util.Context.NONE); } } ``` -### HealthReportOperation_Get +### HealthReports_Get ```java -/** Samples for HealthReportOperation Get. */ -public final class HealthReportOperationGetSamples { +/** + * Samples for HealthReports Get. + */ +public final class HealthReportsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/HealthReports/GetHealthReport_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-05-01-preview/examples/HealthReports/ + * GetHealthReports_example.json */ /** * Sample code: Get health report of resource. - * + * * @param manager Entry point to SecurityManager. */ public static void getHealthReportOfResource(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .healthReportOperations() - .getWithResponse( - "subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/E2E-IBB0WX/providers/Microsoft.Security/securityconnectors/AwsConnectorAllOfferings", - "909c629a-bf39-4521-8e4f-10b443a0bc02", - com.azure.core.util.Context.NONE); + manager.healthReports().getWithResponse( + "subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2/resourcegroups/E2E-IBB0WX/providers/Microsoft.Security/securityconnectors/AwsConnectorAllOfferings", + "909c629a-bf39-4521-8e4f-10b443a0bc02", com.azure.core.util.Context.NONE); } } ``` @@ -3515,20 +4497,23 @@ public final class HealthReportOperationGetSamples { ### HealthReports_List ```java -/** Samples for HealthReports List. */ +/** + * Samples for HealthReports List. + */ public final class HealthReportsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/HealthReports/ListHealthReports_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-05-01-preview/examples/HealthReports/ + * ListHealthReports_example.json */ /** * Sample code: List health reports. - * + * * @param manager Entry point to SecurityManager. */ public static void listHealthReports(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .healthReports() - .list("subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2", com.azure.core.util.Context.NONE); + manager.healthReports().list("subscriptions/a1efb6ca-fbc5-4782-9aaa-5c7daded1ce2", + com.azure.core.util.Context.NONE); } } ``` @@ -3542,260 +4527,128 @@ import com.azure.resourcemanager.security.models.InformationType; import com.azure.resourcemanager.security.models.SensitivityLabel; import java.util.Arrays; import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -/** Samples for InformationProtectionPolicies CreateOrUpdate. */ -public final class InformationProtectionPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/CreateOrUpdateInformationProtectionPolicy_example.json - */ - /** - * Sample code: Create or update an information protection policy for a management group. - * - * @param manager Entry point to SecurityManager. - */ - public static void createOrUpdateAnInformationProtectionPolicyForAManagementGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .informationProtectionPolicies() - .define(InformationProtectionPolicyName.CUSTOM) - .withExistingScope("providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e") - .withLabels( - mapOf( - "1345da73-bc5a-4a8f-b7dd-3820eb713da8", - new SensitivityLabel().withDisplayName("Public").withOrder(100).withEnabled(true), - "575739d2-3d53-4df0-9042-4c7772d5c7b1", - new SensitivityLabel().withDisplayName("Confidential").withOrder(300).withEnabled(true), - "7aa516c7-5a53-4857-bc6e-6808c6acd542", - new SensitivityLabel().withDisplayName("General").withOrder(200).withEnabled(true))) - .withInformationTypes( - mapOf( - "3bf35491-99b8-41f2-86d5-c1200a7df658", - new InformationType() - .withDisplayName("Custom") - .withOrder(1400) - .withRecommendedLabelId(UUID.fromString("7aa516c7-5a53-4857-bc6e-6808c6acd542")) - .withEnabled(true) - .withCustom(true) - .withKeywords( - Arrays - .asList( - new InformationProtectionKeyword() - .withPattern("%custom%") - .withCustom(true) - .withCanBeNumeric(true))), - "7fb9419d-2473-4ad8-8e11-b25cc8cf6a07", - new InformationType() - .withDisplayName("Networking") - .withOrder(100) - .withRecommendedLabelId(UUID.fromString("575739d2-3d53-4df0-9042-4c7772d5c7b1")) - .withEnabled(true) - .withCustom(false) - .withKeywords( - Arrays - .asList( - new InformationProtectionKeyword() - .withPattern("%networking%") - .withCustom(true) - .withCanBeNumeric(false))))) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### InformationProtectionPolicies_Get - -```java -import com.azure.resourcemanager.security.models.InformationProtectionPolicyName; - -/** Samples for InformationProtectionPolicies Get. */ -public final class InformationProtectionPoliciesGetSamples { - /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/GetCustomInformationProtectionPolicy_example.json - */ - /** - * Sample code: Get the customized information protection policy for a management group. - * - * @param manager Entry point to SecurityManager. - */ - public static void getTheCustomizedInformationProtectionPolicyForAManagementGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .informationProtectionPolicies() - .getWithResponse( - "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", - InformationProtectionPolicyName.CUSTOM, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/GetEffectiveInformationProtectionPolicy_example.json - */ - /** - * Sample code: Get the effective information protection policy for a management group. - * - * @param manager Entry point to SecurityManager. - */ - public static void getTheEffectiveInformationProtectionPolicyForAManagementGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .informationProtectionPolicies() - .getWithResponse( - "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", - InformationProtectionPolicyName.EFFECTIVE, - com.azure.core.util.Context.NONE); - } -} -``` - -### InformationProtectionPolicies_List - -```java -/** Samples for InformationProtectionPolicies List. */ -public final class InformationProtectionPoliciesListSamples { - /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/InformationProtectionPolicies/ListInformationProtectionPolicies_example.json - */ - /** - * Sample code: Get information protection policies. - * - * @param manager Entry point to SecurityManager. - */ - public static void getInformationProtectionPolicies(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .informationProtectionPolicies() - .list( - "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", - com.azure.core.util.Context.NONE); - } -} -``` - -### IngestionSettings_Create - -```java -/** Samples for IngestionSettings Create. */ -public final class IngestionSettingsCreateSamples { - /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/CreateIngestionSetting_example.json - */ - /** - * Sample code: Create an ingestion setting for subscription. - * - * @param manager Entry point to SecurityManager. - */ - public static void createAnIngestionSettingForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.ingestionSettings().define("default").create(); - } -} -``` - -### IngestionSettings_Delete - -```java -/** Samples for IngestionSettings Delete. */ -public final class IngestionSettingsDeleteSamples { - /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/DeleteIngestionSetting_example.json - */ - /** - * Sample code: Delete an ingestion setting for the subscription. - * - * @param manager Entry point to SecurityManager. - */ - public static void deleteAnIngestionSettingForTheSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.ingestionSettings().deleteWithResponse("default", com.azure.core.util.Context.NONE); - } -} -``` - -### IngestionSettings_Get +import java.util.Map; +import java.util.UUID; -```java -/** Samples for IngestionSettings Get. */ -public final class IngestionSettingsGetSamples { +/** + * Samples for InformationProtectionPolicies CreateOrUpdate. + */ +public final class InformationProtectionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/GetIngestionSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/ + * InformationProtectionPolicies/CreateOrUpdateInformationProtectionPolicy_example.json */ /** - * Sample code: Get a ingestion setting on subscription. - * + * Sample code: Create or update an information protection policy for a management group. + * * @param manager Entry point to SecurityManager. */ - public static void getAIngestionSettingOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager.ingestionSettings().getWithResponse("default", com.azure.core.util.Context.NONE); + public static void createOrUpdateAnInformationProtectionPolicyForAManagementGroup( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.informationProtectionPolicies().define(InformationProtectionPolicyName.CUSTOM) + .withExistingScope("providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e") + .withLabels( + mapOf("1345da73-bc5a-4a8f-b7dd-3820eb713da8", + new SensitivityLabel().withDisplayName("Public").withOrder(100).withEnabled(true), + "575739d2-3d53-4df0-9042-4c7772d5c7b1", + new SensitivityLabel().withDisplayName("Confidential").withOrder(300).withEnabled(true), + "7aa516c7-5a53-4857-bc6e-6808c6acd542", new SensitivityLabel().withDisplayName("General") + .withOrder(200).withEnabled(true))) + .withInformationTypes(mapOf("3bf35491-99b8-41f2-86d5-c1200a7df658", + new InformationType().withDisplayName("Custom").withOrder(1400) + .withRecommendedLabelId(UUID.fromString("7aa516c7-5a53-4857-bc6e-6808c6acd542")).withEnabled(true) + .withCustom(true) + .withKeywords(Arrays.asList(new InformationProtectionKeyword() + .withPattern("%custom%").withCustom(true).withCanBeNumeric(true))), + "7fb9419d-2473-4ad8-8e11-b25cc8cf6a07", + new InformationType().withDisplayName("Networking").withOrder(100) + .withRecommendedLabelId(UUID.fromString("575739d2-3d53-4df0-9042-4c7772d5c7b1")).withEnabled(true) + .withCustom(false).withKeywords(Arrays.asList(new InformationProtectionKeyword() + .withPattern("%networking%").withCustom(true).withCanBeNumeric(false))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### IngestionSettings_List +### InformationProtectionPolicies_Get ```java -/** Samples for IngestionSettings List. */ -public final class IngestionSettingsListSamples { +import com.azure.resourcemanager.security.models.InformationProtectionPolicyName; + +/** + * Samples for InformationProtectionPolicies Get. + */ +public final class InformationProtectionPoliciesGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/GetIngestionSettings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/ + * InformationProtectionPolicies/GetCustomInformationProtectionPolicy_example.json */ /** - * Sample code: Get ingestion settings on subscription. - * + * Sample code: Get the customized information protection policy for a management group. + * * @param manager Entry point to SecurityManager. */ - public static void getIngestionSettingsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager.ingestionSettings().list(com.azure.core.util.Context.NONE); + public static void getTheCustomizedInformationProtectionPolicyForAManagementGroup( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.informationProtectionPolicies().getWithResponse( + "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", + InformationProtectionPolicyName.CUSTOM, com.azure.core.util.Context.NONE); } -} -``` - -### IngestionSettings_ListConnectionStrings -```java -/** Samples for IngestionSettings ListConnectionStrings. */ -public final class IngestionSettingsListConnectionStringsSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/ListConnectionStrings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/ + * InformationProtectionPolicies/GetEffectiveInformationProtectionPolicy_example.json */ /** - * Sample code: List connection strings for ingesting security data and logs. - * + * Sample code: Get the effective information protection policy for a management group. + * * @param manager Entry point to SecurityManager. */ - public static void listConnectionStringsForIngestingSecurityDataAndLogs( + public static void getTheEffectiveInformationProtectionPolicyForAManagementGroup( com.azure.resourcemanager.security.SecurityManager manager) { - manager.ingestionSettings().listConnectionStringsWithResponse("default", com.azure.core.util.Context.NONE); + manager.informationProtectionPolicies().getWithResponse( + "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", + InformationProtectionPolicyName.EFFECTIVE, com.azure.core.util.Context.NONE); } } ``` -### IngestionSettings_ListTokens +### InformationProtectionPolicies_List ```java -/** Samples for IngestionSettings ListTokens. */ -public final class IngestionSettingsListTokensSamples { +/** + * Samples for InformationProtectionPolicies List. + */ +public final class InformationProtectionPoliciesListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/ListTokensIngestionSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/ + * InformationProtectionPolicies/ListInformationProtectionPolicies_example.json */ /** - * Sample code: List ingestion setting tokens. - * + * Sample code: Get information protection policies. + * * @param manager Entry point to SecurityManager. */ - public static void listIngestionSettingTokens(com.azure.resourcemanager.security.SecurityManager manager) { - manager.ingestionSettings().listTokensWithResponse("default", com.azure.core.util.Context.NONE); + public static void getInformationProtectionPolicies(com.azure.resourcemanager.security.SecurityManager manager) { + manager.informationProtectionPolicies().list( + "providers/Microsoft.Management/managementGroups/148059f7-faf3-49a6-ba35-85122112291e", + com.azure.core.util.Context.NONE); } } ``` @@ -3813,50 +4666,42 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for IotSecuritySolution CreateOrUpdate. */ +/** + * Samples for IotSecuritySolution CreateOrUpdate. + */ public final class IotSecuritySolutionCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/CreateIoTSecuritySolution.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * CreateIoTSecuritySolution.json */ /** * Sample code: Create or update a IoT security solution. - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateAIoTSecuritySolution(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutions() - .define("default") - .withExistingResourceGroup("MyGroup") - .withRegion("East Us") + manager.iotSecuritySolutions().define("default").withExistingResourceGroup("MyGroup").withRegion("East Us") .withTags(mapOf()) .withWorkspace( "/subscriptions/c4930e90-cd72-4aa5-93e9-2d081d129569/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace1") - .withDisplayName("Solution Default") - .withStatus(SecuritySolutionStatus.ENABLED) - .withExport(Arrays.asList()) + .withDisplayName("Solution Default").withStatus(SecuritySolutionStatus.ENABLED).withExport(Arrays.asList()) .withDisabledDataSources(Arrays.asList()) - .withIotHubs( - Arrays - .asList( - "/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")) - .withUserDefinedResources( - new UserDefinedResourcesProperties() - .withQuery("where type != \"microsoft.devices/iothubs\" | where name contains \"iot\"") - .withQuerySubscriptions(Arrays.asList("075423e9-7d33-4166-8bdf-3920b04e3735"))) - .withRecommendationsConfiguration( - Arrays - .asList( - new RecommendationConfigurationProperties() - .withRecommendationType(RecommendationType.IO_T_OPEN_PORTS) - .withStatus(RecommendationConfigStatus.DISABLED), - new RecommendationConfigurationProperties() - .withRecommendationType(RecommendationType.IO_T_SHARED_CREDENTIALS) - .withStatus(RecommendationConfigStatus.DISABLED))) - .withUnmaskedIpLoggingStatus(UnmaskedIpLoggingStatus.ENABLED) - .create(); - } - + .withIotHubs(Arrays.asList( + "/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub")) + .withUserDefinedResources(new UserDefinedResourcesProperties() + .withQuery("where type != \"microsoft.devices/iothubs\" | where name contains \"iot\"") + .withQuerySubscriptions(Arrays.asList("075423e9-7d33-4166-8bdf-3920b04e3735"))) + .withRecommendationsConfiguration(Arrays.asList( + new RecommendationConfigurationProperties().withRecommendationType(RecommendationType.IO_T_OPEN_PORTS) + .withStatus(RecommendationConfigStatus.DISABLED), + new RecommendationConfigurationProperties() + .withRecommendationType(RecommendationType.IO_T_SHARED_CREDENTIALS) + .withStatus(RecommendationConfigStatus.DISABLED))) + .withUnmaskedIpLoggingStatus(UnmaskedIpLoggingStatus.ENABLED).create(); + } + + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3873,20 +4718,23 @@ public final class IotSecuritySolutionCreateOrUpdateSamples { ### IotSecuritySolution_Delete ```java -/** Samples for IotSecuritySolution Delete. */ +/** + * Samples for IotSecuritySolution Delete. + */ public final class IotSecuritySolutionDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/DeleteIoTSecuritySolution.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * DeleteIoTSecuritySolution.json */ /** * Sample code: Delete an IoT security solution. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteAnIoTSecuritySolution(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutions() - .deleteByResourceGroupWithResponse("MyGroup", "default", com.azure.core.util.Context.NONE); + manager.iotSecuritySolutions().deleteByResourceGroupWithResponse("MyGroup", "default", + com.azure.core.util.Context.NONE); } } ``` @@ -3894,20 +4742,23 @@ public final class IotSecuritySolutionDeleteSamples { ### IotSecuritySolution_GetByResourceGroup ```java -/** Samples for IotSecuritySolution GetByResourceGroup. */ +/** + * Samples for IotSecuritySolution GetByResourceGroup. + */ public final class IotSecuritySolutionGetByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolution.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * GetIoTSecuritySolution.json */ /** * Sample code: Get a IoT security solution. - * + * * @param manager Entry point to SecurityManager. */ public static void getAIoTSecuritySolution(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutions() - .getByResourceGroupWithResponse("MyGroup", "default", com.azure.core.util.Context.NONE); + manager.iotSecuritySolutions().getByResourceGroupWithResponse("MyGroup", "default", + com.azure.core.util.Context.NONE); } } ``` @@ -3915,36 +4766,39 @@ public final class IotSecuritySolutionGetByResourceGroupSamples { ### IotSecuritySolution_List ```java -/** Samples for IotSecuritySolution List. */ +/** + * Samples for IotSecuritySolution List. + */ public final class IotSecuritySolutionListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsList.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * GetIoTSecuritySolutionsList.json */ /** * Sample code: List IoT Security solutions by subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void listIoTSecuritySolutionsBySubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listIoTSecuritySolutionsBySubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.iotSecuritySolutions().list(null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsListByIotHub.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * GetIoTSecuritySolutionsListByIotHub.json */ /** * Sample code: List IoT Security solutions by IoT Hub. - * + * * @param manager Entry point to SecurityManager. */ public static void listIoTSecuritySolutionsByIoTHub(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutions() - .list( - "properties.iotHubs/any(i eq" - + " \"/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub\")", - com.azure.core.util.Context.NONE); + manager.iotSecuritySolutions().list( + "properties.iotHubs/any(i eq \"/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub\")", + com.azure.core.util.Context.NONE); } } ``` @@ -3952,37 +4806,39 @@ public final class IotSecuritySolutionListSamples { ### IotSecuritySolution_ListByResourceGroup ```java -/** Samples for IotSecuritySolution ListByResourceGroup. */ +/** + * Samples for IotSecuritySolution ListByResourceGroup. + */ public final class IotSecuritySolutionListByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsListByIotHubAndRg.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * GetIoTSecuritySolutionsListByIotHubAndRg.json */ /** * Sample code: List IoT Security solutions by resource group and IoT Hub. - * + * * @param manager Entry point to SecurityManager. */ - public static void listIoTSecuritySolutionsByResourceGroupAndIoTHub( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutions() - .listByResourceGroup( - "MyRg", - "properties.iotHubs/any(i eq" - + " \"/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub\")", - com.azure.core.util.Context.NONE); + public static void + listIoTSecuritySolutionsByResourceGroupAndIoTHub(com.azure.resourcemanager.security.SecurityManager manager) { + manager.iotSecuritySolutions().listByResourceGroup("MyRg", + "properties.iotHubs/any(i eq \"/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/myRg/providers/Microsoft.Devices/IotHubs/FirstIotHub\")", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/GetIoTSecuritySolutionsListByRg.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * GetIoTSecuritySolutionsListByRg.json */ /** * Sample code: List IoT Security solutions by resource group. - * + * * @param manager Entry point to SecurityManager. */ - public static void listIoTSecuritySolutionsByResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listIoTSecuritySolutionsByResourceGroup(com.azure.resourcemanager.security.SecurityManager manager) { manager.iotSecuritySolutions().listByResourceGroup("MyGroup", null, com.azure.core.util.Context.NONE); } } @@ -4000,42 +4856,38 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for IotSecuritySolution Update. */ +/** + * Samples for IotSecuritySolution Update. + */ public final class IotSecuritySolutionUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/UpdateIoTSecuritySolution.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutions/ + * UpdateIoTSecuritySolution.json */ /** * Sample code: Use this method to update existing IoT Security solution. - * + * * @param manager Entry point to SecurityManager. */ - public static void useThisMethodToUpdateExistingIoTSecuritySolution( - com.azure.resourcemanager.security.SecurityManager manager) { - IoTSecuritySolutionModel resource = - manager - .iotSecuritySolutions() - .getByResourceGroupWithResponse("myRg", "default", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("foo", "bar")) - .withUserDefinedResources( - new UserDefinedResourcesProperties() - .withQuery("where type != \"microsoft.devices/iothubs\" | where name contains \"v2\"") - .withQuerySubscriptions(Arrays.asList("075423e9-7d33-4166-8bdf-3920b04e3735"))) - .withRecommendationsConfiguration( - Arrays - .asList( - new RecommendationConfigurationProperties() - .withRecommendationType(RecommendationType.IO_T_OPEN_PORTS) - .withStatus(RecommendationConfigStatus.DISABLED), - new RecommendationConfigurationProperties() - .withRecommendationType(RecommendationType.IO_T_SHARED_CREDENTIALS) - .withStatus(RecommendationConfigStatus.DISABLED))) + public static void + useThisMethodToUpdateExistingIoTSecuritySolution(com.azure.resourcemanager.security.SecurityManager manager) { + IoTSecuritySolutionModel resource = manager.iotSecuritySolutions() + .getByResourceGroupWithResponse("myRg", "default", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("foo", "bar")) + .withUserDefinedResources(new UserDefinedResourcesProperties() + .withQuery("where type != \"microsoft.devices/iothubs\" | where name contains \"v2\"") + .withQuerySubscriptions(Arrays.asList("075423e9-7d33-4166-8bdf-3920b04e3735"))) + .withRecommendationsConfiguration(Arrays.asList( + new RecommendationConfigurationProperties().withRecommendationType(RecommendationType.IO_T_OPEN_PORTS) + .withStatus(RecommendationConfigStatus.DISABLED), + new RecommendationConfigurationProperties() + .withRecommendationType(RecommendationType.IO_T_SHARED_CREDENTIALS) + .withStatus(RecommendationConfigStatus.DISABLED))) .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -4052,14 +4904,17 @@ public final class IotSecuritySolutionUpdateSamples { ### IotSecuritySolutionAnalytics_Get ```java -/** Samples for IotSecuritySolutionAnalytics Get. */ +/** + * Samples for IotSecuritySolutionAnalytics Get. + */ public final class IotSecuritySolutionAnalyticsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAnalytics.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/ + * IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAnalytics.json */ /** * Sample code: Get Security Solution Analytics. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecuritySolutionAnalytics(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4071,14 +4926,17 @@ public final class IotSecuritySolutionAnalyticsGetSamples { ### IotSecuritySolutionAnalytics_List ```java -/** Samples for IotSecuritySolutionAnalytics List. */ +/** + * Samples for IotSecuritySolutionAnalytics List. + */ public final class IotSecuritySolutionAnalyticsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAnalyticsList.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/ + * IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAnalyticsList.json */ /** * Sample code: Get Security Solution Analytics. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecuritySolutionAnalytics(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4090,25 +4948,23 @@ public final class IotSecuritySolutionAnalyticsListSamples { ### IotSecuritySolutionsAnalyticsAggregatedAlert_Dismiss ```java -/** Samples for IotSecuritySolutionsAnalyticsAggregatedAlert Dismiss. */ +/** + * Samples for IotSecuritySolutionsAnalyticsAggregatedAlert Dismiss. + */ public final class IotSecuritySolutionsAnalyticsAggregatedAlertDismissSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/PostIoTSecuritySolutionsSecurityAggregatedAlertDismiss.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/ + * IoTSecuritySolutionsAnalytics/PostIoTSecuritySolutionsSecurityAggregatedAlertDismiss.json */ /** * Sample code: Dismiss an aggregated IoT Security Solution Alert. - * + * * @param manager Entry point to SecurityManager. */ - public static void dismissAnAggregatedIoTSecuritySolutionAlert( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutionsAnalyticsAggregatedAlerts() - .dismissWithResponse( - "IoTEdgeResources", - "default", - "IoT_Bruteforce_Fail/2019-02-02/dismiss", - com.azure.core.util.Context.NONE); + public static void + dismissAnAggregatedIoTSecuritySolutionAlert(com.azure.resourcemanager.security.SecurityManager manager) { + manager.iotSecuritySolutionsAnalyticsAggregatedAlerts().dismissWithResponse("IoTEdgeResources", "default", + "IoT_Bruteforce_Fail/2019-02-02/dismiss", com.azure.core.util.Context.NONE); } } ``` @@ -4116,23 +4972,25 @@ public final class IotSecuritySolutionsAnalyticsAggregatedAlertDismissSamples { ### IotSecuritySolutionsAnalyticsAggregatedAlert_Get ```java -/** Samples for IotSecuritySolutionsAnalyticsAggregatedAlert Get. */ +/** + * Samples for IotSecuritySolutionsAnalyticsAggregatedAlert Get. + */ public final class IotSecuritySolutionsAnalyticsAggregatedAlertGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAggregatedAlert.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/ + * IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAggregatedAlert.json */ /** * Sample code: Get the aggregated security analytics alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param manager Entry point to SecurityManager. */ public static void getTheAggregatedSecurityAnalyticsAlertOfYoursIoTSecuritySolutionThisAggregationIsPerformedByAlertName( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutionsAnalyticsAggregatedAlerts() - .getWithResponse("MyGroup", "default", "IoT_Bruteforce_Fail/2019-02-02", com.azure.core.util.Context.NONE); + manager.iotSecuritySolutionsAnalyticsAggregatedAlerts().getWithResponse("MyGroup", "default", + "IoT_Bruteforce_Fail/2019-02-02", com.azure.core.util.Context.NONE); } } ``` @@ -4140,21 +4998,23 @@ public final class IotSecuritySolutionsAnalyticsAggregatedAlertGetSamples { ### IotSecuritySolutionsAnalyticsAggregatedAlert_List ```java -/** Samples for IotSecuritySolutionsAnalyticsAggregatedAlert List. */ +/** + * Samples for IotSecuritySolutionsAnalyticsAggregatedAlert List. + */ public final class IotSecuritySolutionsAnalyticsAggregatedAlertListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAggregatedAlertList.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/ + * IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityAggregatedAlertList.json */ /** * Sample code: Get the aggregated alert list of yours IoT Security solution. - * + * * @param manager Entry point to SecurityManager. */ public static void getTheAggregatedAlertListOfYoursIoTSecuritySolution( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutionsAnalyticsAggregatedAlerts() - .list("MyGroup", "default", null, com.azure.core.util.Context.NONE); + manager.iotSecuritySolutionsAnalyticsAggregatedAlerts().list("MyGroup", "default", null, + com.azure.core.util.Context.NONE); } } ``` @@ -4162,21 +5022,23 @@ public final class IotSecuritySolutionsAnalyticsAggregatedAlertListSamples { ### IotSecuritySolutionsAnalyticsRecommendation_Get ```java -/** Samples for IotSecuritySolutionsAnalyticsRecommendation Get. */ +/** + * Samples for IotSecuritySolutionsAnalyticsRecommendation Get. + */ public final class IotSecuritySolutionsAnalyticsRecommendationGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendation.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/ + * IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendation.json */ /** * Sample code: Get the aggregated security analytics recommendation of yours IoT Security solution. - * + * * @param manager Entry point to SecurityManager. */ public static void getTheAggregatedSecurityAnalyticsRecommendationOfYoursIoTSecuritySolution( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutionsAnalyticsRecommendations() - .getWithResponse("IoTEdgeResources", "default", "OpenPortsOnDevice", com.azure.core.util.Context.NONE); + manager.iotSecuritySolutionsAnalyticsRecommendations().getWithResponse("IoTEdgeResources", "default", + "OpenPortsOnDevice", com.azure.core.util.Context.NONE); } } ``` @@ -4184,21 +5046,23 @@ public final class IotSecuritySolutionsAnalyticsRecommendationGetSamples { ### IotSecuritySolutionsAnalyticsRecommendation_List ```java -/** Samples for IotSecuritySolutionsAnalyticsRecommendation List. */ +/** + * Samples for IotSecuritySolutionsAnalyticsRecommendation List. + */ public final class IotSecuritySolutionsAnalyticsRecommendationListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendationList.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/ + * IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendationList.json */ /** * Sample code: Get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param manager Entry point to SecurityManager. */ public static void getTheListOfAggregatedSecurityAnalyticsRecommendationsOfYoursIoTSecuritySolution( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .iotSecuritySolutionsAnalyticsRecommendations() - .list("IoTEdgeResources", "default", null, com.azure.core.util.Context.NONE); + manager.iotSecuritySolutionsAnalyticsRecommendations().list("IoTEdgeResources", "default", null, + com.azure.core.util.Context.NONE); } } ``` @@ -4217,63 +5081,39 @@ import com.azure.resourcemanager.security.models.StatusReason; import java.time.OffsetDateTime; import java.util.Arrays; -/** Samples for JitNetworkAccessPolicies CreateOrUpdate. */ +/** + * Samples for JitNetworkAccessPolicies CreateOrUpdate. + */ public final class JitNetworkAccessPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * CreateJitNetworkAccessPolicy_example.json */ /** * Sample code: Create JIT network access policy. - * + * * @param manager Entry point to SecurityManager. */ public static void createJITNetworkAccessPolicy(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .jitNetworkAccessPolicies() - .define("default") - .withExistingLocation("myRg1", "westeurope") - .withVirtualMachines( - Arrays - .asList( - new JitNetworkAccessPolicyVirtualMachine() - .withId( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1") - .withPorts( - Arrays - .asList( - new JitNetworkAccessPortRule() - .withNumber(22) - .withProtocol(Protocol.ASTERISK) - .withAllowedSourceAddressPrefix("*") - .withMaxRequestAccessDuration("PT3H"), - new JitNetworkAccessPortRule() - .withNumber(3389) - .withProtocol(Protocol.ASTERISK) - .withAllowedSourceAddressPrefix("*") - .withMaxRequestAccessDuration("PT3H"))))) + manager.jitNetworkAccessPolicies().define("default").withExistingLocation("myRg1", "westeurope") + .withVirtualMachines(Arrays.asList(new JitNetworkAccessPolicyVirtualMachine().withId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1") + .withPorts(Arrays.asList( + new JitNetworkAccessPortRule().withNumber(22).withProtocol(Protocol.ASTERISK) + .withAllowedSourceAddressPrefix("*").withMaxRequestAccessDuration("PT3H"), + new JitNetworkAccessPortRule().withNumber(3389).withProtocol(Protocol.ASTERISK) + .withAllowedSourceAddressPrefix("*").withMaxRequestAccessDuration("PT3H"))))) .withKind("Basic") - .withRequests( - Arrays - .asList( - new JitNetworkAccessRequestInner() - .withVirtualMachines( - Arrays - .asList( - new JitNetworkAccessRequestVirtualMachine() - .withId( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1") - .withPorts( - Arrays - .asList( - new JitNetworkAccessRequestPort() - .withNumber(3389) - .withAllowedSourceAddressPrefix("192.127.0.2") - .withEndTimeUtc( - OffsetDateTime.parse("2018-05-17T09:06:45.5691611Z")) - .withStatus(Status.INITIATED) - .withStatusReason(StatusReason.USER_REQUESTED))))) - .withStartTimeUtc(OffsetDateTime.parse("2018-05-17T08:06:45.5691611Z")) - .withRequestor("barbara@contoso.com"))) + .withRequests(Arrays.asList(new JitNetworkAccessRequestInner() + .withVirtualMachines(Arrays.asList(new JitNetworkAccessRequestVirtualMachine().withId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1") + .withPorts(Arrays.asList( + new JitNetworkAccessRequestPort().withNumber(3389).withAllowedSourceAddressPrefix("192.127.0.2") + .withEndTimeUtc(OffsetDateTime.parse("2018-05-17T09:06:45.5691611Z")) + .withStatus(Status.INITIATED).withStatusReason(StatusReason.USER_REQUESTED))))) + .withStartTimeUtc(OffsetDateTime.parse("2018-05-17T08:06:45.5691611Z")) + .withRequestor("barbara@contoso.com"))) .create(); } } @@ -4282,20 +5122,23 @@ public final class JitNetworkAccessPoliciesCreateOrUpdateSamples { ### JitNetworkAccessPolicies_Delete ```java -/** Samples for JitNetworkAccessPolicies Delete. */ +/** + * Samples for JitNetworkAccessPolicies Delete. + */ public final class JitNetworkAccessPoliciesDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/DeleteJitNetworkAccessPolicy_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * DeleteJitNetworkAccessPolicy_example.json */ /** * Sample code: Delete a JIT network access policy. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteAJITNetworkAccessPolicy(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .jitNetworkAccessPolicies() - .deleteWithResponse("myRg1", "westeurope", "default", com.azure.core.util.Context.NONE); + manager.jitNetworkAccessPolicies().deleteWithResponse("myRg1", "westeurope", "default", + com.azure.core.util.Context.NONE); } } ``` @@ -4303,20 +5146,23 @@ public final class JitNetworkAccessPoliciesDeleteSamples { ### JitNetworkAccessPolicies_Get ```java -/** Samples for JitNetworkAccessPolicies Get. */ +/** + * Samples for JitNetworkAccessPolicies Get. + */ public final class JitNetworkAccessPoliciesGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPolicy_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * GetJitNetworkAccessPolicy_example.json */ /** * Sample code: Get JIT network access policy. - * + * * @param manager Entry point to SecurityManager. */ public static void getJITNetworkAccessPolicy(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .jitNetworkAccessPolicies() - .getWithResponse("myRg1", "westeurope", "default", com.azure.core.util.Context.NONE); + manager.jitNetworkAccessPolicies().getWithResponse("myRg1", "westeurope", "default", + com.azure.core.util.Context.NONE); } } ``` @@ -4329,39 +5175,30 @@ import com.azure.resourcemanager.security.models.JitNetworkAccessPolicyInitiateR import com.azure.resourcemanager.security.models.JitNetworkAccessPolicyInitiateVirtualMachine; import java.util.Arrays; -/** Samples for JitNetworkAccessPolicies Initiate. */ +/** + * Samples for JitNetworkAccessPolicies Initiate. + */ public final class JitNetworkAccessPoliciesInitiateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * InitiateJitNetworkAccessPolicy_example.json */ /** * Sample code: Initiate an action on a JIT network access policy. - * + * * @param manager Entry point to SecurityManager. */ - public static void initiateAnActionOnAJITNetworkAccessPolicy( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .jitNetworkAccessPolicies() - .initiateWithResponse( - "myRg1", - "westeurope", - "default", - new JitNetworkAccessPolicyInitiateRequest() - .withVirtualMachines( - Arrays - .asList( - new JitNetworkAccessPolicyInitiateVirtualMachine() - .withId( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1") - .withPorts( - Arrays - .asList( - new JitNetworkAccessPolicyInitiatePort() - .withNumber(3389) - .withAllowedSourceAddressPrefix("192.127.0.2"))))) - .withJustification("testing a new version of the product"), - com.azure.core.util.Context.NONE); + public static void + initiateAnActionOnAJITNetworkAccessPolicy(com.azure.resourcemanager.security.SecurityManager manager) { + manager.jitNetworkAccessPolicies().initiateWithResponse("myRg1", "westeurope", "default", + new JitNetworkAccessPolicyInitiateRequest() + .withVirtualMachines(Arrays.asList(new JitNetworkAccessPolicyInitiateVirtualMachine().withId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1") + .withPorts(Arrays.asList(new JitNetworkAccessPolicyInitiatePort().withNumber(3389) + .withAllowedSourceAddressPrefix("192.127.0.2"))))) + .withJustification("testing a new version of the product"), + com.azure.core.util.Context.NONE); } } ``` @@ -4369,18 +5206,22 @@ public final class JitNetworkAccessPoliciesInitiateSamples { ### JitNetworkAccessPolicies_List ```java -/** Samples for JitNetworkAccessPolicies List. */ +/** + * Samples for JitNetworkAccessPolicies List. + */ public final class JitNetworkAccessPoliciesListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * GetJitNetworkAccessPoliciesSubscription_example.json */ /** * Sample code: Get JIT network access policies on a subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void getJITNetworkAccessPoliciesOnASubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getJITNetworkAccessPoliciesOnASubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.jitNetworkAccessPolicies().list(com.azure.core.util.Context.NONE); } } @@ -4389,14 +5230,18 @@ public final class JitNetworkAccessPoliciesListSamples { ### JitNetworkAccessPolicies_ListByRegion ```java -/** Samples for JitNetworkAccessPolicies ListByRegion. */ +/** + * Samples for JitNetworkAccessPolicies ListByRegion. + */ public final class JitNetworkAccessPoliciesListByRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesSubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * GetJitNetworkAccessPoliciesSubscriptionLocation_example.json */ /** * Sample code: Get JIT network access policies on a subscription from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getJITNetworkAccessPoliciesOnASubscriptionFromASecurityDataLocation( @@ -4409,18 +5254,22 @@ public final class JitNetworkAccessPoliciesListByRegionSamples { ### JitNetworkAccessPolicies_ListByResourceGroup ```java -/** Samples for JitNetworkAccessPolicies ListByResourceGroup. */ +/** + * Samples for JitNetworkAccessPolicies ListByResourceGroup. + */ public final class JitNetworkAccessPoliciesListByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesResourceGroup_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * GetJitNetworkAccessPoliciesResourceGroup_example.json */ /** * Sample code: Get JIT network access policies on a resource group. - * + * * @param manager Entry point to SecurityManager. */ - public static void getJITNetworkAccessPoliciesOnAResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getJITNetworkAccessPoliciesOnAResourceGroup(com.azure.resourcemanager.security.SecurityManager manager) { manager.jitNetworkAccessPolicies().listByResourceGroup("myRg1", com.azure.core.util.Context.NONE); } } @@ -4429,21 +5278,24 @@ public final class JitNetworkAccessPoliciesListByResourceGroupSamples { ### JitNetworkAccessPolicies_ListByResourceGroupAndRegion ```java -/** Samples for JitNetworkAccessPolicies ListByResourceGroupAndRegion. */ +/** + * Samples for JitNetworkAccessPolicies ListByResourceGroupAndRegion. + */ public final class JitNetworkAccessPoliciesListByResourceGroupAndRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/GetJitNetworkAccessPoliciesResourceGroupLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/ + * GetJitNetworkAccessPoliciesResourceGroupLocation_example.json */ /** * Sample code: Get JIT network access policies on a resource group from a security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getJITNetworkAccessPoliciesOnAResourceGroupFromASecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .jitNetworkAccessPolicies() - .listByResourceGroupAndRegion("myRg1", "westeurope", com.azure.core.util.Context.NONE); + manager.jitNetworkAccessPolicies().listByResourceGroupAndRegion("myRg1", "westeurope", + com.azure.core.util.Context.NONE); } } ``` @@ -4451,14 +5303,18 @@ public final class JitNetworkAccessPoliciesListByResourceGroupAndRegionSamples { ### Locations_Get ```java -/** Samples for Locations Get. */ +/** + * Samples for Locations Get. + */ public final class LocationsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Locations/GetLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Locations/ + * GetLocation_example.json */ /** * Sample code: Get security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityDataLocation(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4470,14 +5326,18 @@ public final class LocationsGetSamples { ### Locations_List ```java -/** Samples for Locations List. */ +/** + * Samples for Locations List. + */ public final class LocationsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Locations/GetLocations_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Locations/ + * GetLocations_example.json */ /** * Sample code: Get security data locations. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityDataLocations(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4489,14 +5349,18 @@ public final class LocationsListSamples { ### MdeOnboardings_Get ```java -/** Samples for MdeOnboardings Get. */ +/** + * Samples for MdeOnboardings Get. + */ public final class MdeOnboardingsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-10-01-preview/examples/MdeOnboardings/GetMdeOnboardings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-10-01-preview/examples/MdeOnboardings/ + * GetMdeOnboardings_example.json */ /** * Sample code: The default configuration or data needed to onboard the machine to MDE. - * + * * @param manager Entry point to SecurityManager. */ public static void theDefaultConfigurationOrDataNeededToOnboardTheMachineToMDE( @@ -4509,14 +5373,18 @@ public final class MdeOnboardingsGetSamples { ### MdeOnboardings_List ```java -/** Samples for MdeOnboardings List. */ +/** + * Samples for MdeOnboardings List. + */ public final class MdeOnboardingsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-10-01-preview/examples/MdeOnboardings/ListMdeOnboardings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-10-01-preview/examples/MdeOnboardings/ + * ListMdeOnboardings_example.json */ /** * Sample code: The configuration or data needed to onboard the machine to MDE. - * + * * @param manager Entry point to SecurityManager. */ public static void theConfigurationOrDataNeededToOnboardTheMachineToMDE( @@ -4526,73 +5394,132 @@ public final class MdeOnboardingsListSamples { } ``` +### Pricings_Delete + +```java +/** + * Samples for Pricings Delete. + */ +public final class PricingsDeleteSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * DeleteResourcePricing_example.json + */ + /** + * Sample code: Delete a pricing on resource. + * + * @param manager Entry point to SecurityManager. + */ + public static void deleteAPricingOnResource(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().deleteByResourceGroupWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", + "VirtualMachines", com.azure.core.util.Context.NONE); + } +} +``` + ### Pricings_Get ```java -/** Samples for Pricings Get. */ +/** + * Samples for Pricings Get. + */ public final class PricingsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameCloudPosture_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * GetResourcePricingByNameVirtualMachines_example.json + */ + /** + * Sample code: Get pricings on resource - VirtualMachines plan. + * + * @param manager Entry point to SecurityManager. + */ + public static void + getPricingsOnResourceVirtualMachinesPlan(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().getWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", + "VirtualMachines", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * GetPricingByNameCloudPosture_example.json */ /** * Sample code: Get pricings on subscription - CloudPosture plan. - * + * * @param manager Entry point to SecurityManager. */ - public static void getPricingsOnSubscriptionCloudPosturePlan( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.pricings().getWithResponse("CloudPosture", com.azure.core.util.Context.NONE); + public static void + getPricingsOnSubscriptionCloudPosturePlan(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameDns_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * GetPricingByNameDns_example.json */ /** * Sample code: Get pricings on subscription - Dns plan. - * + * * @param manager Entry point to SecurityManager. */ public static void getPricingsOnSubscriptionDnsPlan(com.azure.resourcemanager.security.SecurityManager manager) { - manager.pricings().getWithResponse("Dns", com.azure.core.util.Context.NONE); + manager.pricings().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "Dns", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameContainers_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * GetPricingByNameContainers_example.json */ /** * Sample code: Get pricings on subscription - Containers plan. - * + * * @param manager Entry point to SecurityManager. */ - public static void getPricingsOnSubscriptionContainersPlan( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.pricings().getWithResponse("Containers", com.azure.core.util.Context.NONE); + public static void + getPricingsOnSubscriptionContainersPlan(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "Containers", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameStorageAccounts_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * GetPricingByNameStorageAccounts_example.json */ /** * Sample code: Get pricings on subscription - StorageAccounts plan. - * + * * @param manager Entry point to SecurityManager. */ - public static void getPricingsOnSubscriptionStorageAccountsPlan( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.pricings().getWithResponse("StorageAccounts", com.azure.core.util.Context.NONE); + public static void + getPricingsOnSubscriptionStorageAccountsPlan(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "StorageAccounts", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameVirtualMachines_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * GetPricingByNameVirtualMachines_example.json */ /** * Sample code: Get pricings on subscription - VirtualMachines plan. - * + * * @param manager Entry point to SecurityManager. */ - public static void getPricingsOnSubscriptionVirtualMachinesPlan( - com.azure.resourcemanager.security.SecurityManager manager) { - manager.pricings().getWithResponse("VirtualMachines", com.azure.core.util.Context.NONE); + public static void + getPricingsOnSubscriptionVirtualMachinesPlan(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().getWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "VirtualMachines", + com.azure.core.util.Context.NONE); } } ``` @@ -4600,18 +5527,55 @@ public final class PricingsGetSamples { ### Pricings_List ```java -/** Samples for Pricings List. */ +/** + * Samples for Pricings List. + */ public final class PricingsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/ListPricings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * ListPricingsWithPlanFilter_example.json + */ + /** + * Sample code: Get pricings on subscription with plans filter. + * + * @param manager Entry point to SecurityManager. + */ + public static void + getPricingsOnSubscriptionWithPlansFilter(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().listWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "name in (VirtualMachines,KeyVaults)", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * ListPricings_example.json */ /** * Sample code: Get pricings on subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getPricingsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager.pricings().listWithResponse(com.azure.core.util.Context.NONE); + manager.pricings().listWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * ListResourcePricings_example.json + */ + /** + * Sample code: Get pricings on resource. + * + * @param manager Entry point to SecurityManager. + */ + public static void getPricingsOnResource(com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().listWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", + null, com.azure.core.util.Context.NONE); } } ``` @@ -4620,43 +5584,78 @@ public final class PricingsListSamples { ```java import com.azure.resourcemanager.security.fluent.models.PricingInner; +import com.azure.resourcemanager.security.models.Enforce; import com.azure.resourcemanager.security.models.PricingTier; -/** Samples for Pricings Update. */ +/** + * Samples for Pricings Update. + */ public final class PricingsUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/PutPricingByNamePartialSuccess_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * PutPricingByName_example.json + */ + /** + * Sample code: Update pricing on subscription (example for CloudPosture plan). + * + * @param manager Entry point to SecurityManager. + */ + public static void updatePricingOnSubscriptionExampleForCloudPosturePlan( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().updateWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", + new PricingInner().withPricingTier(PricingTier.STANDARD), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * PutPricingByNamePartialSuccess_example.json + */ + /** + * Sample code: Update pricing on subscription (example for CloudPosture plan) - partial success. + * + * @param manager Entry point to SecurityManager. + */ + public static void updatePricingOnSubscriptionExampleForCloudPosturePlanPartialSuccess( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().updateWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "CloudPosture", + new PricingInner().withPricingTier(PricingTier.STANDARD), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * PutPricingVMsByName_example.json */ /** - * Sample code: Update pricing on subscription - partial success. - * + * Sample code: Update pricing on subscription (example for VirtualMachines plan). + * * @param manager Entry point to SecurityManager. */ - public static void updatePricingOnSubscriptionPartialSuccess( + public static void updatePricingOnSubscriptionExampleForVirtualMachinesPlan( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .pricings() - .updateWithResponse( - "CloudPosture", - new PricingInner().withPricingTier(PricingTier.STANDARD), - com.azure.core.util.Context.NONE); + manager.pricings().updateWithResponse("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", "VirtualMachines", + new PricingInner().withPricingTier(PricingTier.STANDARD).withSubPlan("P2").withEnforce(Enforce.TRUE), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/PutPricingByName_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2024-01-01/examples/Pricings/ + * PutResourcePricingByNameVirtualMachines_example.json */ /** - * Sample code: Update pricing on subscription. - * + * Sample code: Update pricing on resource (example for VirtualMachines plan). + * * @param manager Entry point to SecurityManager. */ - public static void updatePricingOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .pricings() - .updateWithResponse( - "CloudPosture", - new PricingInner().withPricingTier(PricingTier.STANDARD), - com.azure.core.util.Context.NONE); + public static void updatePricingOnResourceExampleForVirtualMachinesPlan( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.pricings().updateWithResponse( + "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/DEMO/providers/Microsoft.Compute/virtualMachines/VM-1", + "virtualMachines", new PricingInner().withPricingTier(PricingTier.STANDARD).withSubPlan("P1"), + com.azure.core.util.Context.NONE); } } ``` @@ -4664,22 +5663,24 @@ public final class PricingsUpdateSamples { ### RegulatoryComplianceAssessments_Get ```java -/** Samples for RegulatoryComplianceAssessments Get. */ +/** + * Samples for RegulatoryComplianceAssessments Get. + */ public final class RegulatoryComplianceAssessmentsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json */ /** * Sample code: Get selected regulatory compliance assessment details and state. - * + * * @param manager Entry point to SecurityManager. */ public static void getSelectedRegulatoryComplianceAssessmentDetailsAndState( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .regulatoryComplianceAssessments() - .getWithResponse( - "PCI-DSS-3.2", "1.1", "968548cb-02b3-8cd2-11f8-0cf64ab1a347", com.azure.core.util.Context.NONE); + manager.regulatoryComplianceAssessments().getWithResponse("PCI-DSS-3.2", "1.1", + "968548cb-02b3-8cd2-11f8-0cf64ab1a347", com.azure.core.util.Context.NONE); } } ``` @@ -4687,14 +5688,18 @@ public final class RegulatoryComplianceAssessmentsGetSamples { ### RegulatoryComplianceAssessments_List ```java -/** Samples for RegulatoryComplianceAssessments List. */ +/** + * Samples for RegulatoryComplianceAssessments List. + */ public final class RegulatoryComplianceAssessmentsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json */ /** * Sample code: Get all assessments mapped to selected regulatory compliance control. - * + * * @param manager Entry point to SecurityManager. */ public static void getAllAssessmentsMappedToSelectedRegulatoryComplianceControl( @@ -4707,14 +5712,18 @@ public final class RegulatoryComplianceAssessmentsListSamples { ### RegulatoryComplianceControls_Get ```java -/** Samples for RegulatoryComplianceControls Get. */ +/** + * Samples for RegulatoryComplianceControls Get. + */ public final class RegulatoryComplianceControlsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * RegulatoryCompliance/getRegulatoryComplianceControl_example.json */ /** * Sample code: Get selected regulatory compliance control details and state. - * + * * @param manager Entry point to SecurityManager. */ public static void getSelectedRegulatoryComplianceControlDetailsAndState( @@ -4727,14 +5736,18 @@ public final class RegulatoryComplianceControlsGetSamples { ### RegulatoryComplianceControls_List ```java -/** Samples for RegulatoryComplianceControls List. */ +/** + * Samples for RegulatoryComplianceControls List. + */ public final class RegulatoryComplianceControlsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * RegulatoryCompliance/getRegulatoryComplianceControlList_example.json */ /** * Sample code: Get all regulatory compliance controls details and state for selected standard. - * + * * @param manager Entry point to SecurityManager. */ public static void getAllRegulatoryComplianceControlsDetailsAndStateForSelectedStandard( @@ -4747,14 +5760,18 @@ public final class RegulatoryComplianceControlsListSamples { ### RegulatoryComplianceStandards_Get ```java -/** Samples for RegulatoryComplianceStandards Get. */ +/** + * Samples for RegulatoryComplianceStandards Get. + */ public final class RegulatoryComplianceStandardsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * RegulatoryCompliance/getRegulatoryComplianceStandard_example.json */ /** * Sample code: Get selected regulatory compliance standard details and state. - * + * * @param manager Entry point to SecurityManager. */ public static void getSelectedRegulatoryComplianceStandardDetailsAndState( @@ -4767,14 +5784,18 @@ public final class RegulatoryComplianceStandardsGetSamples { ### RegulatoryComplianceStandards_List ```java -/** Samples for RegulatoryComplianceStandards List. */ +/** + * Samples for RegulatoryComplianceStandards List. + */ public final class RegulatoryComplianceStandardsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/ + * RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json */ /** * Sample code: Get all supported regulatory compliance standards details and state. - * + * * @param manager Entry point to SecurityManager. */ public static void getAllSupportedRegulatoryComplianceStandardsDetailsAndState( @@ -4784,17 +5805,77 @@ public final class RegulatoryComplianceStandardsListSamples { } ``` +### ResourceProvider_GetSensitivitySettings + +```java +/** + * Samples for ResourceProvider GetSensitivitySettings. + */ +public final class ResourceProviderGetSensitivitySettingsSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/ + * SensitivitySettings/GetSensitivitySettings_example.json + */ + /** + * Sample code: Get sensitivity settings. + * + * @param manager Entry point to SecurityManager. + */ + public static void getSensitivitySettings(com.azure.resourcemanager.security.SecurityManager manager) { + manager.resourceProviders().getSensitivitySettingsWithResponse(com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceProvider_UpdateSensitivitySettings + +```java +import com.azure.resourcemanager.security.models.UpdateSensitivitySettingsRequest; +import java.util.Arrays; +import java.util.UUID; + +/** + * Samples for ResourceProvider UpdateSensitivitySettings. + */ +public final class ResourceProviderUpdateSensitivitySettingsSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/ + * SensitivitySettings/PutSensitivitySettings_example.json + */ + /** + * Sample code: Update sensitivity settings. + * + * @param manager Entry point to SecurityManager. + */ + public static void updateSensitivitySettings(com.azure.resourcemanager.security.SecurityManager manager) { + manager.resourceProviders().updateSensitivitySettingsWithResponse( + new UpdateSensitivitySettingsRequest() + .withSensitiveInfoTypesIds(Arrays.asList(UUID.fromString("f2f8a7a1-28c0-404b-9ab4-30a0a7af18cb"), + UUID.fromString("b452f22b-f87d-4f48-8490-ecf0873325b5"), + UUID.fromString("d59ee8b6-2618-404b-a5e7-aa377cd67543"))) + .withSensitivityThresholdLabelOrder(2.0F).withSensitivityThresholdLabelId( + UUID.fromString("f2f8a7a1-28c0-404b-9ab4-30a0a7af18cb")), + com.azure.core.util.Context.NONE); + } +} +``` + ### SecureScoreControlDefinitions_List ```java -/** Samples for SecureScoreControlDefinitions List. */ +/** + * Samples for SecureScoreControlDefinitions List. + */ public final class SecureScoreControlDefinitionsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScoreControlDefinitions/ListSecureScoreControlDefinitions_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * secureScoreControlDefinitions/ListSecureScoreControlDefinitions_example.json */ /** * Sample code: List security controls definition. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecurityControlsDefinition(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4806,18 +5887,21 @@ public final class SecureScoreControlDefinitionsListSamples { ### SecureScoreControlDefinitions_ListBySubscription ```java -/** Samples for SecureScoreControlDefinitions ListBySubscription. */ +/** + * Samples for SecureScoreControlDefinitions ListBySubscription. + */ public final class SecureScoreControlDefinitionsListBySubscriptionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScoreControlDefinitions/ListSecureScoreControlDefinitions_subscription_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * secureScoreControlDefinitions/ListSecureScoreControlDefinitions_subscription_example.json */ /** * Sample code: List security controls definition by subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void listSecurityControlsDefinitionBySubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listSecurityControlsDefinitionBySubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.secureScoreControlDefinitions().listBySubscription(com.azure.core.util.Context.NONE); } } @@ -4826,14 +5910,19 @@ public final class SecureScoreControlDefinitionsListBySubscriptionSamples { ### SecureScoreControls_List ```java -/** Samples for SecureScoreControls List. */ + +/** + * Samples for SecureScoreControls List. + */ public final class SecureScoreControlsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControls_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ + * ListSecureScoreControls_example.json */ /** * Sample code: List all secure scores controls. - * + * * @param manager Entry point to SecurityManager. */ public static void listAllSecureScoresControls(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4847,30 +5936,35 @@ public final class SecureScoreControlsListSamples { ```java import com.azure.resourcemanager.security.models.ExpandControlsEnum; -/** Samples for SecureScoreControls ListBySecureScore. */ +/** + * Samples for SecureScoreControls ListBySecureScore. + */ public final class SecureScoreControlsListBySecureScoreSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControlsForNameWithExpand_builtin_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ + * ListSecureScoreControlsForNameWithExpand_builtin_example.json */ /** * Sample code: Get security controls and their current score for the specified initiative with the expand * parameter. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityControlsAndTheirCurrentScoreForTheSpecifiedInitiativeWithTheExpandParameter( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .secureScoreControls() - .listBySecureScore("ascScore", ExpandControlsEnum.DEFINITION, com.azure.core.util.Context.NONE); + manager.secureScoreControls().listBySecureScore("ascScore", ExpandControlsEnum.DEFINITION, + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControlsForName_builtin_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ + * ListSecureScoreControlsForName_builtin_example.json */ /** * Sample code: Get security controls and their current score for the specified initiative. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityControlsAndTheirCurrentScoreForTheSpecifiedInitiative( @@ -4883,14 +5977,18 @@ public final class SecureScoreControlsListBySecureScoreSamples { ### SecureScores_Get ```java -/** Samples for SecureScores Get. */ +/** + * Samples for SecureScores Get. + */ public final class SecureScoresGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/GetSecureScoresSingle_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ + * GetSecureScoresSingle_example.json */ /** * Sample code: Get single secure score. - * + * * @param manager Entry point to SecurityManager. */ public static void getSingleSecureScore(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4902,14 +6000,18 @@ public final class SecureScoresGetSamples { ### SecureScores_List ```java -/** Samples for SecureScores List. */ +/** + * Samples for SecureScores List. + */ public final class SecureScoresListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ListSecureScores_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/secureScores/ + * ListSecureScores_example.json */ /** * Sample code: List secure scores. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecureScores(com.azure.resourcemanager.security.SecurityManager manager) { @@ -4928,38 +6030,31 @@ import com.azure.resourcemanager.security.models.ApplicationSourceResourceType; import java.io.IOException; import java.util.Arrays; -/** Samples for SecurityConnectorApplicationOperation CreateOrUpdate. */ +/** + * Samples for SecurityConnectorApplicationOperation CreateOrUpdate. + */ public final class SecurityConnectorApplicationOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/PutSecurityConnectorApplication_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * PutSecurityConnectorApplication_example.json */ /** * Sample code: Create Application. - * + * * @param manager Entry point to SecurityManager. */ public static void createApplication(com.azure.resourcemanager.security.SecurityManager manager) throws IOException { - manager - .securityConnectorApplicationOperations() - .createOrUpdateWithResponse( - "gcpResourceGroup", - "gcpconnector", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - new ApplicationInner() - .withDisplayName("GCP Admin's application") - .withDescription("An application on critical GCP recommendations") - .withSourceResourceType(ApplicationSourceResourceType.ASSESSMENTS) - .withConditionSets( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"conditions\":[{\"operator\":\"contains\",\"property\":\"$.Id\",\"value\":\"-prod-\"}]}", - Object.class, - SerializerEncoding.JSON))), - com.azure.core.util.Context.NONE); + manager.securityConnectorApplicationOperations().createOrUpdateWithResponse("gcpResourceGroup", "gcpconnector", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", + new ApplicationInner().withDisplayName("GCP Admin's application") + .withDescription("An application on critical GCP recommendations") + .withSourceResourceType(ApplicationSourceResourceType.ASSESSMENTS).withConditionSets( + Arrays.asList(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"conditions\":[{\"operator\":\"contains\",\"property\":\"$.Id\",\"value\":\"-prod-\"}]}", + Object.class, SerializerEncoding.JSON))), + com.azure.core.util.Context.NONE); } } ``` @@ -4967,24 +6062,23 @@ public final class SecurityConnectorApplicationOperationCreateOrUpdateSamples { ### SecurityConnectorApplicationOperation_Delete ```java -/** Samples for SecurityConnectorApplicationOperation Delete. */ +/** + * Samples for SecurityConnectorApplicationOperation Delete. + */ public final class SecurityConnectorApplicationOperationDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/DeleteSecurityConnectorApplication_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * DeleteSecurityConnectorApplication_example.json */ /** * Sample code: Delete security Application. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteSecurityApplication(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityConnectorApplicationOperations() - .deleteWithResponse( - "gcpResourceGroup", - "gcpconnector", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + manager.securityConnectorApplicationOperations().deleteWithResponse("gcpResourceGroup", "gcpconnector", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } } ``` @@ -4992,25 +6086,24 @@ public final class SecurityConnectorApplicationOperationDeleteSamples { ### SecurityConnectorApplicationOperation_Get ```java -/** Samples for SecurityConnectorApplicationOperation Get. */ +/** + * Samples for SecurityConnectorApplicationOperation Get. + */ public final class SecurityConnectorApplicationOperationGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/GetSecurityConnectorApplication_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * GetSecurityConnectorApplication_example.json */ /** * Sample code: Get security applications by specific applicationId. - * + * * @param manager Entry point to SecurityManager. */ - public static void getSecurityApplicationsBySpecificApplicationId( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityConnectorApplicationOperations() - .getWithResponse( - "gcpResourceGroup", - "gcpconnector", - "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - com.azure.core.util.Context.NONE); + public static void + getSecurityApplicationsBySpecificApplicationId(com.azure.resourcemanager.security.SecurityManager manager) { + manager.securityConnectorApplicationOperations().getWithResponse("gcpResourceGroup", "gcpconnector", + "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", com.azure.core.util.Context.NONE); } } ``` @@ -5018,21 +6111,24 @@ public final class SecurityConnectorApplicationOperationGetSamples { ### SecurityConnectorApplications_List ```java -/** Samples for SecurityConnectorApplications List. */ +/** + * Samples for SecurityConnectorApplications List. + */ public final class SecurityConnectorApplicationsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ListBySecurityConnectorApplications_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/examples/Applications/ + * ListBySecurityConnectorApplications_example.json */ /** * Sample code: List security applications by security connector level scope. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecurityApplicationsBySecurityConnectorLevelScope( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityConnectorApplications() - .list("gcpResourceGroup", "gcpconnector", com.azure.core.util.Context.NONE); + manager.securityConnectorApplications().list("gcpResourceGroup", "gcpconnector", + com.azure.core.util.Context.NONE); } } ``` @@ -5048,36 +6144,31 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for SecurityConnectors CreateOrUpdate. */ +/** + * Samples for SecurityConnectors CreateOrUpdate. + */ public final class SecurityConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors + * /PutSecurityConnector_example.json */ /** * Sample code: Create or update a security connector. - * + * * @param manager Entry point to SecurityManager. */ public static void createOrUpdateASecurityConnector(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityConnectors() - .define("exampleSecurityConnectorName") - .withRegion("Central US") - .withExistingResourceGroup("exampleResourceGroup") - .withTags(mapOf()) - .withHierarchyIdentifier("exampleHierarchyId") - .withEnvironmentName(CloudName.AWS) - .withOfferings( - Arrays - .asList( - new CspmMonitorAwsOffering() - .withNativeCloudConnection( - new CspmMonitorAwsOfferingNativeCloudConnection() - .withCloudRoleArn("arn:aws:iam::00000000:role/ASCMonitor")))) - .withEnvironmentData(new AwsEnvironmentData()) - .create(); + manager.securityConnectors().define("exampleSecurityConnectorName").withRegion("Central US") + .withExistingResourceGroup("exampleResourceGroup").withTags(mapOf()) + .withHierarchyIdentifier("exampleHierarchyId").withEnvironmentName(CloudName.AWS) + .withOfferings(Arrays.asList( + new CspmMonitorAwsOffering().withNativeCloudConnection(new CspmMonitorAwsOfferingNativeCloudConnection() + .withCloudRoleArn("arn:aws:iam::00000000:role/ASCMonitor")))) + .withEnvironmentData(new AwsEnvironmentData().withScanInterval(4L)).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -5094,20 +6185,23 @@ public final class SecurityConnectorsCreateOrUpdateSamples { ### SecurityConnectors_Delete ```java -/** Samples for SecurityConnectors Delete. */ +/** + * Samples for SecurityConnectors Delete. + */ public final class SecurityConnectorsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors + * /DeleteSecurityConnector_example.json */ /** * Sample code: Delete a security connector. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteASecurityConnector(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityConnectors() - .deleteByResourceGroupWithResponse("myRg", "mySecurityConnectorName", com.azure.core.util.Context.NONE); + manager.securityConnectors().deleteByResourceGroupWithResponse("myRg", "mySecurityConnectorName", + com.azure.core.util.Context.NONE); } } ``` @@ -5115,21 +6209,23 @@ public final class SecurityConnectorsDeleteSamples { ### SecurityConnectors_GetByResourceGroup ```java -/** Samples for SecurityConnectors GetByResourceGroup. */ +/** + * Samples for SecurityConnectors GetByResourceGroup. + */ public final class SecurityConnectorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors + * /GetSecurityConnectorSingleResource_example.json */ /** * Sample code: Retrieve a security connector. - * + * * @param manager Entry point to SecurityManager. */ public static void retrieveASecurityConnector(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityConnectors() - .getByResourceGroupWithResponse( - "exampleResourceGroup", "exampleSecurityConnectorName", com.azure.core.util.Context.NONE); + manager.securityConnectors().getByResourceGroupWithResponse("exampleResourceGroup", + "exampleSecurityConnectorName", com.azure.core.util.Context.NONE); } } ``` @@ -5137,18 +6233,22 @@ public final class SecurityConnectorsGetByResourceGroupSamples { ### SecurityConnectors_List ```java -/** Samples for SecurityConnectors List. */ +/** + * Samples for SecurityConnectors List. + */ public final class SecurityConnectorsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors + * /GetSecurityConnectorsSubscription_example.json */ /** * Sample code: List all security connectors of a specified subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void listAllSecurityConnectorsOfASpecifiedSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listAllSecurityConnectorsOfASpecifiedSubscription(com.azure.resourcemanager.security.SecurityManager manager) { manager.securityConnectors().list(com.azure.core.util.Context.NONE); } } @@ -5157,18 +6257,22 @@ public final class SecurityConnectorsListSamples { ### SecurityConnectors_ListByResourceGroup ```java -/** Samples for SecurityConnectors ListByResourceGroup. */ +/** + * Samples for SecurityConnectors ListByResourceGroup. + */ public final class SecurityConnectorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors + * /GetSecurityConnectorsResourceGroup_example.json */ /** * Sample code: List all security connectors of a specified resource group. - * + * * @param manager Entry point to SecurityManager. */ - public static void listAllSecurityConnectorsOfASpecifiedResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + listAllSecurityConnectorsOfASpecifiedResourceGroup(com.azure.resourcemanager.security.SecurityManager manager) { manager.securityConnectors().listByResourceGroup("exampleResourceGroup", com.azure.core.util.Context.NONE); } } @@ -5186,39 +6290,32 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for SecurityConnectors Update. */ +/** + * Samples for SecurityConnectors Update. + */ public final class SecurityConnectorsUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors + * /PatchSecurityConnector_example.json */ /** * Sample code: Update a security connector. - * + * * @param manager Entry point to SecurityManager. */ public static void updateASecurityConnector(com.azure.resourcemanager.security.SecurityManager manager) { - SecurityConnector resource = - manager - .securityConnectors() - .getByResourceGroupWithResponse( - "exampleResourceGroup", "exampleSecurityConnectorName", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withHierarchyIdentifier("exampleHierarchyId") + SecurityConnector resource = manager.securityConnectors().getByResourceGroupWithResponse("exampleResourceGroup", + "exampleSecurityConnectorName", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()).withHierarchyIdentifier("exampleHierarchyId") .withEnvironmentName(CloudName.AWS) - .withOfferings( - Arrays - .asList( - new CspmMonitorAwsOffering() - .withNativeCloudConnection( - new CspmMonitorAwsOfferingNativeCloudConnection() - .withCloudRoleArn("arn:aws:iam::00000000:role/ASCMonitor")))) - .withEnvironmentData(new AwsEnvironmentData()) - .apply(); + .withOfferings(Arrays.asList( + new CspmMonitorAwsOffering().withNativeCloudConnection(new CspmMonitorAwsOfferingNativeCloudConnection() + .withCloudRoleArn("arn:aws:iam::00000000:role/ASCMonitor")))) + .withEnvironmentData(new AwsEnvironmentData()).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -5235,37 +6332,38 @@ public final class SecurityConnectorsUpdateSamples { ### SecurityContacts_Create ```java +import com.azure.resourcemanager.security.models.MinimalRiskLevel; import com.azure.resourcemanager.security.models.MinimalSeverity; -import com.azure.resourcemanager.security.models.Roles; -import com.azure.resourcemanager.security.models.SecurityContactPropertiesAlertNotifications; +import com.azure.resourcemanager.security.models.NotificationsSourceAlert; +import com.azure.resourcemanager.security.models.NotificationsSourceAttackPath; +import com.azure.resourcemanager.security.models.SecurityContactName; import com.azure.resourcemanager.security.models.SecurityContactPropertiesNotificationsByRole; +import com.azure.resourcemanager.security.models.SecurityContactRole; import com.azure.resourcemanager.security.models.State; import java.util.Arrays; -/** Samples for SecurityContacts Create. */ +/** + * Samples for SecurityContacts Create. + */ public final class SecurityContactsCreateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/CreateSecurityContact_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/SecurityContacts/ + * CreateSecurityContact_example.json */ /** * Sample code: Create security contact data. - * + * * @param manager Entry point to SecurityManager. */ public static void createSecurityContactData(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityContacts() - .define("default") - .withEmails("john@contoso.com;jane@contoso.com") - .withPhone("(214)275-4038") - .withAlertNotifications( - new SecurityContactPropertiesAlertNotifications() - .withState(State.fromString("On")) - .withMinimalSeverity(MinimalSeverity.LOW)) - .withNotificationsByRole( - new SecurityContactPropertiesNotificationsByRole() - .withState(State.fromString("On")) - .withRoles(Arrays.asList(Roles.OWNER))) + manager.securityContacts().define(SecurityContactName.DEFAULT).withEmails("john@contoso.com;jane@contoso.com") + .withPhone("(214)275-4038").withIsEnabled(true) + .withNotificationsSources( + Arrays.asList(new NotificationsSourceAttackPath().withMinimalRiskLevel(MinimalRiskLevel.CRITICAL), + new NotificationsSourceAlert().withMinimalSeverity(MinimalSeverity.MEDIUM))) + .withNotificationsByRole(new SecurityContactPropertiesNotificationsByRole() + .withState(State.fromString("On")).withRoles(Arrays.asList(SecurityContactRole.OWNER))) .create(); } } @@ -5274,18 +6372,24 @@ public final class SecurityContactsCreateSamples { ### SecurityContacts_Delete ```java -/** Samples for SecurityContacts Delete. */ +import com.azure.resourcemanager.security.models.SecurityContactName; + +/** + * Samples for SecurityContacts Delete. + */ public final class SecurityContactsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/DeleteSecurityContact_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/SecurityContacts/ + * DeleteSecurityContact_example.json */ /** * Sample code: Deletes a security contact data. - * + * * @param manager Entry point to SecurityManager. */ public static void deletesASecurityContactData(com.azure.resourcemanager.security.SecurityManager manager) { - manager.securityContacts().deleteWithResponse("default", com.azure.core.util.Context.NONE); + manager.securityContacts().deleteWithResponse(SecurityContactName.DEFAULT, com.azure.core.util.Context.NONE); } } ``` @@ -5293,18 +6397,24 @@ public final class SecurityContactsDeleteSamples { ### SecurityContacts_Get ```java -/** Samples for SecurityContacts Get. */ +import com.azure.resourcemanager.security.models.SecurityContactName; + +/** + * Samples for SecurityContacts Get. + */ public final class SecurityContactsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/GetSecurityContact_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/SecurityContacts/ + * GetSecurityContact_example.json */ /** * Sample code: Get a security contact. - * + * * @param manager Entry point to SecurityManager. */ public static void getASecurityContact(com.azure.resourcemanager.security.SecurityManager manager) { - manager.securityContacts().getWithResponse("default", com.azure.core.util.Context.NONE); + manager.securityContacts().getWithResponse(SecurityContactName.DEFAULT, com.azure.core.util.Context.NONE); } } ``` @@ -5312,14 +6422,18 @@ public final class SecurityContactsGetSamples { ### SecurityContacts_List ```java -/** Samples for SecurityContacts List. */ +/** + * Samples for SecurityContacts List. + */ public final class SecurityContactsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-01-01-preview/examples/SecurityContacts/GetSecurityContactsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-12-01-preview/examples/SecurityContacts/ + * GetSecurityContactsSubscription_example.json */ /** * Sample code: List security contact data. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecurityContactData(com.azure.resourcemanager.security.SecurityManager manager) { @@ -5331,22 +6445,24 @@ public final class SecurityContactsListSamples { ### SecurityOperators_CreateOrUpdate ```java -/** Samples for SecurityOperators CreateOrUpdate. */ +/** + * Samples for SecurityOperators CreateOrUpdate. + */ public final class SecurityOperatorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/PutSecurityOperatorByName_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ + * PutSecurityOperatorByName_example.json */ /** * Sample code: Create a security operator on the given scope. - * + * * @param manager Entry point to SecurityManager. */ - public static void createASecurityOperatorOnTheGivenScope( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityOperators() - .createOrUpdateWithResponse( - "CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE); + public static void + createASecurityOperatorOnTheGivenScope(com.azure.resourcemanager.security.SecurityManager manager) { + manager.securityOperators().createOrUpdateWithResponse("CloudPosture", "DefenderCSPMSecurityOperator", + com.azure.core.util.Context.NONE); } } ``` @@ -5354,22 +6470,24 @@ public final class SecurityOperatorsCreateOrUpdateSamples { ### SecurityOperators_Delete ```java -/** Samples for SecurityOperators Delete. */ +/** + * Samples for SecurityOperators Delete. + */ public final class SecurityOperatorsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/DeleteSecurityOperatorByName_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ + * DeleteSecurityOperatorByName_example.json */ /** * Sample code: Delete SecurityOperator on subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteSecurityOperatorOnSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityOperators() - .deleteByResourceGroupWithResponse( - "CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE); + public static void + deleteSecurityOperatorOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.securityOperators().deleteByResourceGroupWithResponse("CloudPosture", "DefenderCSPMSecurityOperator", + com.azure.core.util.Context.NONE); } } ``` @@ -5377,21 +6495,24 @@ public final class SecurityOperatorsDeleteSamples { ### SecurityOperators_Get ```java -/** Samples for SecurityOperators Get. */ +/** + * Samples for SecurityOperators Get. + */ public final class SecurityOperatorsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/GetSecurityOperatorByName_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ + * GetSecurityOperatorByName_example.json */ /** * Sample code: Get a specific security operator by scope and securityOperatorName. - * + * * @param manager Entry point to SecurityManager. */ public static void getASpecificSecurityOperatorByScopeAndSecurityOperatorName( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securityOperators() - .getWithResponse("CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE); + manager.securityOperators().getWithResponse("CloudPosture", "DefenderCSPMSecurityOperator", + com.azure.core.util.Context.NONE); } } ``` @@ -5399,14 +6520,18 @@ public final class SecurityOperatorsGetSamples { ### SecurityOperators_List ```java -/** Samples for SecurityOperators List. */ +/** + * Samples for SecurityOperators List. + */ public final class SecurityOperatorsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ListSecurityOperators_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ + * ListSecurityOperators_example.json */ /** * Sample code: List SecurityOperators. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecurityOperators(com.azure.resourcemanager.security.SecurityManager manager) { @@ -5418,21 +6543,24 @@ public final class SecurityOperatorsListSamples { ### SecuritySolutions_Get ```java -/** Samples for SecuritySolutions Get. */ +/** + * Samples for SecuritySolutions Get. + */ public final class SecuritySolutionsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutions/GetSecuritySolutionsResourceGroupLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutions/ + * GetSecuritySolutionsResourceGroupLocation_example.json */ /** * Sample code: Get a security solution from a security data location. - * + * * @param manager Entry point to SecurityManager. */ - public static void getASecuritySolutionFromASecurityDataLocation( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securitySolutions() - .getWithResponse("myRg2", "centralus", "paloalto7", com.azure.core.util.Context.NONE); + public static void + getASecuritySolutionFromASecurityDataLocation(com.azure.resourcemanager.security.SecurityManager manager) { + manager.securitySolutions().getWithResponse("myRg2", "centralus", "paloalto7", + com.azure.core.util.Context.NONE); } } ``` @@ -5440,14 +6568,18 @@ public final class SecuritySolutionsGetSamples { ### SecuritySolutions_List ```java -/** Samples for SecuritySolutions List. */ +/** + * Samples for SecuritySolutions List. + */ public final class SecuritySolutionsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutions/GetSecuritySolutionsSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutions/ + * GetSecuritySolutionsSubscription_example.json */ /** * Sample code: Get security solutions. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecuritySolutions(com.azure.resourcemanager.security.SecurityManager manager) { @@ -5459,14 +6591,17 @@ public final class SecuritySolutionsListSamples { ### SecuritySolutionsReferenceData_List ```java -/** Samples for SecuritySolutionsReferenceData List. */ +/** + * Samples for SecuritySolutionsReferenceData List. + */ public final class SecuritySolutionsReferenceDataListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutionsReferenceData/GetSecuritySolutionsReferenceDataSubscription_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * SecuritySolutionsReferenceData/GetSecuritySolutionsReferenceDataSubscription_example.json */ /** * Sample code: Get security solutions. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecuritySolutions(com.azure.resourcemanager.security.SecurityManager manager) { @@ -5478,21 +6613,46 @@ public final class SecuritySolutionsReferenceDataListSamples { ### SecuritySolutionsReferenceData_ListByHomeRegion ```java -/** Samples for SecuritySolutionsReferenceData ListByHomeRegion. */ +/** + * Samples for SecuritySolutionsReferenceData ListByHomeRegion. + */ public final class SecuritySolutionsReferenceDataListByHomeRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/SecuritySolutionsReferenceData/GetSecuritySolutionsReferenceDataSubscriptionLocation_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * SecuritySolutionsReferenceData/GetSecuritySolutionsReferenceDataSubscriptionLocation_example.json */ /** * Sample code: Get security solutions from a security data location. - * + * * @param manager Entry point to SecurityManager. */ - public static void getSecuritySolutionsFromASecurityDataLocation( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .securitySolutionsReferenceDatas() - .listByHomeRegionWithResponse("westcentralus", com.azure.core.util.Context.NONE); + public static void + getSecuritySolutionsFromASecurityDataLocation(com.azure.resourcemanager.security.SecurityManager manager) { + manager.securitySolutionsReferenceDatas().listByHomeRegionWithResponse("westcentralus", + com.azure.core.util.Context.NONE); + } +} +``` + +### SensitivitySettings_List + +```java +/** + * Samples for SensitivitySettings List. + */ +public final class SensitivitySettingsListSamples { + /* + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/ + * SensitivitySettings/GetSensitivitySettingsList_example.json + */ + /** + * Sample code: Get sensitivity settings list. + * + * @param manager Entry point to SecurityManager. + */ + public static void getSensitivitySettingsList(com.azure.resourcemanager.security.SecurityManager manager) { + manager.sensitivitySettings().listWithResponse(com.azure.core.util.Context.NONE); } } ``` @@ -5500,24 +6660,25 @@ public final class SecuritySolutionsReferenceDataListByHomeRegionSamples { ### ServerVulnerabilityAssessment_CreateOrUpdate ```java -/** Samples for ServerVulnerabilityAssessment CreateOrUpdate. */ +/** + * Samples for ServerVulnerabilityAssessment CreateOrUpdate. + */ public final class ServerVulnerabilityAssessmentCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/CreateServerVulnerabilityAssessments_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * ServerVulnerabilityAssessments/CreateServerVulnerabilityAssessments_example.json */ /** * Sample code: Create a server vulnerability assessments on a resource. Only 'default' resource is supported. Once * creating the resource, the server will be onboarded to vulnerability assessment by Microsoft.Security. - * + * * @param manager Entry point to SecurityManager. */ public static void createAServerVulnerabilityAssessmentsOnAResourceOnlyDefaultResourceIsSupportedOnceCreatingTheResourceTheServerWillBeOnboardedToVulnerabilityAssessmentByMicrosoftSecurity( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .serverVulnerabilityAssessments() - .createOrUpdateWithResponse( - "rg1", "Microsoft.Compute", "virtualMachines", "vm1", com.azure.core.util.Context.NONE); + manager.serverVulnerabilityAssessments().createOrUpdateWithResponse("rg1", "Microsoft.Compute", + "virtualMachines", "vm1", com.azure.core.util.Context.NONE); } } ``` @@ -5525,23 +6686,25 @@ public final class ServerVulnerabilityAssessmentCreateOrUpdateSamples { ### ServerVulnerabilityAssessment_Delete ```java -/** Samples for ServerVulnerabilityAssessment Delete. */ +/** + * Samples for ServerVulnerabilityAssessment Delete. + */ public final class ServerVulnerabilityAssessmentDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json */ /** * Sample code: Delete a server vulnerability assessments on a resource. Only 'default' resource is supported. Once * deleting, Microsoft.Security will not provide vulnerability assessment findings on the resource. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteAServerVulnerabilityAssessmentsOnAResourceOnlyDefaultResourceIsSupportedOnceDeletingMicrosoftSecurityWillNotProvideVulnerabilityAssessmentFindingsOnTheResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .serverVulnerabilityAssessments() - .delete("rg1", "Microsoft.Compute", "virtualMachines", "vm1", com.azure.core.util.Context.NONE); + manager.serverVulnerabilityAssessments().delete("rg1", "Microsoft.Compute", "virtualMachines", "vm1", + com.azure.core.util.Context.NONE); } } ``` @@ -5549,23 +6712,25 @@ public final class ServerVulnerabilityAssessmentDeleteSamples { ### ServerVulnerabilityAssessment_Get ```java -/** Samples for ServerVulnerabilityAssessment Get. */ +/** + * Samples for ServerVulnerabilityAssessment Get. + */ public final class ServerVulnerabilityAssessmentGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetServerVulnerabilityAssessments_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * ServerVulnerabilityAssessments/GetServerVulnerabilityAssessments_example.json */ /** * Sample code: Get a server vulnerability assessments onboarding status on a resource. Currently Microsoft.Security * only supports the single 'default' resource. - * + * * @param manager Entry point to SecurityManager. */ public static void getAServerVulnerabilityAssessmentsOnboardingStatusOnAResourceCurrentlyMicrosoftSecurityOnlySupportsTheSingleDefaultResource( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .serverVulnerabilityAssessments() - .getWithResponse("rg1", "Microsoft.Compute", "virtualMachines", "vm1", com.azure.core.util.Context.NONE); + manager.serverVulnerabilityAssessments().getWithResponse("rg1", "Microsoft.Compute", "virtualMachines", "vm1", + com.azure.core.util.Context.NONE); } } ``` @@ -5573,24 +6738,131 @@ public final class ServerVulnerabilityAssessmentGetSamples { ### ServerVulnerabilityAssessment_ListByExtendedResource ```java -/** Samples for ServerVulnerabilityAssessment ListByExtendedResource. */ +/** + * Samples for ServerVulnerabilityAssessment ListByExtendedResource. + */ public final class ServerVulnerabilityAssessmentListByExtendedResourceSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/ListByExtendedResourceServerVulnerabilityAssessments_example.json + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ + * ServerVulnerabilityAssessments/ListByExtendedResourceServerVulnerabilityAssessments_example.json */ /** * Sample code: Get a list of server vulnerability assessments on a resource. Though this API returns a list, * Currently Microsoft.Security only supports a single default type of server vulnerability assessment. - * + * * @param manager Entry point to SecurityManager. */ public static void getAListOfServerVulnerabilityAssessmentsOnAResourceThoughThisAPIReturnsAListCurrentlyMicrosoftSecurityOnlySupportsASingleDefaultTypeOfServerVulnerabilityAssessment( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .serverVulnerabilityAssessments() - .listByExtendedResourceWithResponse( - "rg1", "Microsoft.Compute", "virtualMachines", "vm1", com.azure.core.util.Context.NONE); + manager.serverVulnerabilityAssessments().listByExtendedResourceWithResponse("rg1", "Microsoft.Compute", + "virtualMachines", "vm1", com.azure.core.util.Context.NONE); + } +} +``` + +### ServerVulnerabilityAssessmentsSettings_CreateOrUpdate + +```java +import com.azure.resourcemanager.security.models.AzureServersSetting; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsAzureSettingSelectedProvider; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettingKindName; + +/** + * Samples for ServerVulnerabilityAssessmentsSettings CreateOrUpdate. + */ +public final class ServerVulnerabilityAssessmentsSettingsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ + * ServerVulnerabilityAssessmentsSettings/PutServerVulnerabilityAssessmentsSetting_example.json + */ + /** + * Sample code: Set a server vulnerability assessments setting of the kind settingKind on the subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void setAServerVulnerabilityAssessmentsSettingOfTheKindSettingKindOnTheSubscription( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.serverVulnerabilityAssessmentsSettings().createOrUpdateWithResponse( + ServerVulnerabilityAssessmentsSettingKindName.AZURE_SERVERS_SETTING, new AzureServersSetting() + .withSelectedProvider(ServerVulnerabilityAssessmentsAzureSettingSelectedProvider.MDE_TVM), + com.azure.core.util.Context.NONE); + } +} +``` + +### ServerVulnerabilityAssessmentsSettings_Delete + +```java +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettingKindName; + +/** + * Samples for ServerVulnerabilityAssessmentsSettings Delete. + */ +public final class ServerVulnerabilityAssessmentsSettingsDeleteSamples { + /* + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ + * ServerVulnerabilityAssessmentsSettings/DeleteServerVulnerabilityAssessmentsSetting_example.json + */ + /** + * Sample code: Delete the server vulnerability assessments setting of the kind settingKind from the subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void deleteTheServerVulnerabilityAssessmentsSettingOfTheKindSettingKindFromTheSubscription( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.serverVulnerabilityAssessmentsSettings().deleteWithResponse( + ServerVulnerabilityAssessmentsSettingKindName.AZURE_SERVERS_SETTING, com.azure.core.util.Context.NONE); + } +} +``` + +### ServerVulnerabilityAssessmentsSettings_Get + +```java +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettingKindName; + +/** + * Samples for ServerVulnerabilityAssessmentsSettings Get. + */ +public final class ServerVulnerabilityAssessmentsSettingsGetSamples { + /* + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ + * ServerVulnerabilityAssessmentsSettings/GetServerVulnerabilityAssessmentsSetting_example.json + */ + /** + * Sample code: Get the server vulnerability assessments setting of the kind settingKind that is set on the + * subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void getTheServerVulnerabilityAssessmentsSettingOfTheKindSettingKindThatIsSetOnTheSubscription( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.serverVulnerabilityAssessmentsSettings().getWithResponse( + ServerVulnerabilityAssessmentsSettingKindName.AZURE_SERVERS_SETTING, com.azure.core.util.Context.NONE); + } +} +``` + +### ServerVulnerabilityAssessmentsSettings_List + +```java +/** + * Samples for ServerVulnerabilityAssessmentsSettings List. + */ +public final class ServerVulnerabilityAssessmentsSettingsListSamples { + /* + * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ + * ServerVulnerabilityAssessmentsSettings/ListServerVulnerabilityAssessmentsSettings_example.json + */ + /** + * Sample code: List the server vulnerability assessments settings set on the subscription. + * + * @param manager Entry point to SecurityManager. + */ + public static void listTheServerVulnerabilityAssessmentsSettingsSetOnTheSubscription( + com.azure.resourcemanager.security.SecurityManager manager) { + manager.serverVulnerabilityAssessmentsSettings().list(com.azure.core.util.Context.NONE); } } ``` @@ -5598,20 +6870,24 @@ public final class ServerVulnerabilityAssessmentListByExtendedResourceSamples { ### Settings_Get ```java -import com.azure.resourcemanager.security.models.SettingName; +import com.azure.resourcemanager.security.models.SettingNameAutoGenerated; -/** Samples for Settings Get. */ +/** + * Samples for Settings Get. + */ public final class SettingsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/GetSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/GetSetting_example + * .json */ /** * Sample code: Get a setting on subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getASettingOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager.settings().getWithResponse(SettingName.WDATP, com.azure.core.util.Context.NONE); + manager.settings().getWithResponse(SettingNameAutoGenerated.WDATP, com.azure.core.util.Context.NONE); } } ``` @@ -5619,14 +6895,18 @@ public final class SettingsGetSamples { ### Settings_List ```java -/** Samples for Settings List. */ +/** + * Samples for Settings List. + */ public final class SettingsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/GetSettings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/ + * GetSettings_example.json */ /** * Sample code: Get settings of subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getSettingsOfSubscription(com.azure.resourcemanager.security.SecurityManager manager) { @@ -5639,23 +6919,25 @@ public final class SettingsListSamples { ```java import com.azure.resourcemanager.security.models.DataExportSettings; -import com.azure.resourcemanager.security.models.SettingName; +import com.azure.resourcemanager.security.models.SettingNameAutoGenerated; -/** Samples for Settings Update. */ +/** + * Samples for Settings Update. + */ public final class SettingsUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/UpdateSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2022-05-01/examples/Settings/ + * UpdateSetting_example.json */ /** * Sample code: Update a setting for subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void updateASettingForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .settings() - .updateWithResponse( - SettingName.WDATP, new DataExportSettings().withEnabled(true), com.azure.core.util.Context.NONE); + manager.settings().updateWithResponse(SettingNameAutoGenerated.WDATP, + new DataExportSettings().withEnabled(true), com.azure.core.util.Context.NONE); } } ``` @@ -5663,27 +6945,24 @@ public final class SettingsUpdateSamples { ### SoftwareInventories_Get ```java -/** Samples for SoftwareInventories Get. */ +/** + * Samples for SoftwareInventories Get. + */ public final class SoftwareInventoriesGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/SoftwareInventories/GetSoftware_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/ + * SoftwareInventories/GetSoftware_example.json */ /** * Sample code: Gets a single software data of the virtual machine. - * + * * @param manager Entry point to SecurityManager. */ - public static void getsASingleSoftwareDataOfTheVirtualMachine( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .softwareInventories() - .getWithResponse( - "EITAN-TESTS", - "Microsoft.Compute", - "virtualMachines", - "Eitan-Test1", - "outlook_16.0.10371.20060", - com.azure.core.util.Context.NONE); + public static void + getsASingleSoftwareDataOfTheVirtualMachine(com.azure.resourcemanager.security.SecurityManager manager) { + manager.softwareInventories().getWithResponse("EITAN-TESTS", "Microsoft.Compute", "virtualMachines", + "Eitan-Test1", "outlook_16.0.10371.20060", com.azure.core.util.Context.NONE); } } ``` @@ -5691,14 +6970,18 @@ public final class SoftwareInventoriesGetSamples { ### SoftwareInventories_List ```java -/** Samples for SoftwareInventories List. */ +/** + * Samples for SoftwareInventories List. + */ public final class SoftwareInventoriesListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/SoftwareInventories/ListBySubscriptionSoftwareInventories_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/ + * SoftwareInventories/ListBySubscriptionSoftwareInventories_example.json */ /** * Sample code: Gets the software inventory of all virtual machines in the subscriptions. - * + * * @param manager Entry point to SecurityManager. */ public static void getsTheSoftwareInventoryOfAllVirtualMachinesInTheSubscriptions( @@ -5711,22 +6994,24 @@ public final class SoftwareInventoriesListSamples { ### SoftwareInventories_ListByExtendedResource ```java -/** Samples for SoftwareInventories ListByExtendedResource. */ +/** + * Samples for SoftwareInventories ListByExtendedResource. + */ public final class SoftwareInventoriesListByExtendedResourceSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/SoftwareInventories/ListByExtendedResourceSoftwareInventories_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2021-05-01-preview/examples/ + * SoftwareInventories/ListByExtendedResourceSoftwareInventories_example.json */ /** * Sample code: Gets the software inventory of the virtual machine. - * + * * @param manager Entry point to SecurityManager. */ - public static void getsTheSoftwareInventoryOfTheVirtualMachine( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .softwareInventories() - .listByExtendedResource( - "EITAN-TESTS", "Microsoft.Compute", "virtualMachines", "Eitan-Test1", com.azure.core.util.Context.NONE); + public static void + getsTheSoftwareInventoryOfTheVirtualMachine(com.azure.resourcemanager.security.SecurityManager manager) { + manager.softwareInventories().listByExtendedResource("EITAN-TESTS", "Microsoft.Compute", "virtualMachines", + "Eitan-Test1", com.azure.core.util.Context.NONE); } } ``` @@ -5739,52 +7024,47 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for SqlVulnerabilityAssessmentBaselineRules Add. */ +/** + * Samples for SqlVulnerabilityAssessmentBaselineRules Add. + */ public final class SqlVulnerabilityAssessmentBaselineRulesAddSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Add.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Add.json */ /** * Sample code: Create a baseline for all rules. - * + * * @param manager Entry point to SecurityManager. */ public static void createABaselineForAllRules(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentBaselineRules() - .addWithResponse( - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - new RulesResultsInput() - .withLatestScan(false) - .withResults( - mapOf( - "VA1234", - Arrays.asList(Arrays.asList("userA", "SELECT"), Arrays.asList("userB", "SELECT")), - "VA5678", - Arrays.asList(Arrays.asList("Test", "0.0.0.0", "125.125.125.125")))), - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentBaselineRules().addWithResponse("55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + new RulesResultsInput().withLatestScan(false).withResults( + mapOf("VA1234", Arrays.asList(Arrays.asList("userA", "SELECT"), Arrays.asList("userB", "SELECT")), + "VA5678", Arrays.asList(Arrays.asList("Test", "0.0.0.0", "125.125.125.125")))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_AddLatest.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_AddLatest.json */ /** * Sample code: Create a baseline for all rules using the latest scan results. - * + * * @param manager Entry point to SecurityManager. */ public static void createABaselineForAllRulesUsingTheLatestScanResults( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentBaselineRules() - .addWithResponse( - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - new RulesResultsInput().withLatestScan(true).withResults(mapOf()), - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentBaselineRules().addWithResponse("55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + new RulesResultsInput().withLatestScan(true).withResults(mapOf()), com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -5803,47 +7083,44 @@ public final class SqlVulnerabilityAssessmentBaselineRulesAddSamples { ```java import java.util.Arrays; -/** Samples for SqlVulnerabilityAssessmentBaselineRules CreateOrUpdate. */ +/** + * Samples for SqlVulnerabilityAssessmentBaselineRules CreateOrUpdate. + */ public final class SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_PutLatest.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_PutLatest.json */ /** * Sample code: Create a baseline using the latest scan results. - * + * * @param manager Entry point to SecurityManager. */ - public static void createABaselineUsingTheLatestScanResults( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentBaselineRules() - .define("VA1234") - .withExistingResourceId( - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master") - .withLatestScan(true) - .withResults(Arrays.asList()) - .withWorkspaceId("55555555-6666-7777-8888-999999999999") + public static void + createABaselineUsingTheLatestScanResults(com.azure.resourcemanager.security.SecurityManager manager) { + manager.sqlVulnerabilityAssessmentBaselineRules().define("VA1234").withExistingResourceId( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master") + .withLatestScan(true).withResults(Arrays.asList()).withWorkspaceId("55555555-6666-7777-8888-999999999999") .create(); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Put.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Put.json */ /** * Sample code: Create a baseline. - * + * * @param manager Entry point to SecurityManager. */ public static void createABaseline(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentBaselineRules() - .define("VA1234") - .withExistingResourceId( - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master") + manager.sqlVulnerabilityAssessmentBaselineRules().define("VA1234").withExistingResourceId( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master") .withLatestScan(false) .withResults(Arrays.asList(Arrays.asList("userA", "SELECT"), Arrays.asList("userB", "SELECT"))) - .withWorkspaceId("55555555-6666-7777-8888-999999999999") - .create(); + .withWorkspaceId("55555555-6666-7777-8888-999999999999").create(); } } ``` @@ -5851,24 +7128,25 @@ public final class SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateSamples ### SqlVulnerabilityAssessmentBaselineRules_Delete ```java -/** Samples for SqlVulnerabilityAssessmentBaselineRules Delete. */ +/** + * Samples for SqlVulnerabilityAssessmentBaselineRules Delete. + */ public final class SqlVulnerabilityAssessmentBaselineRulesDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Delete.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Delete.json */ /** * Sample code: Delete the baseline. - * + * * @param manager Entry point to SecurityManager. */ public static void deleteTheBaseline(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentBaselineRules() - .deleteWithResponse( - "VA1234", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentBaselineRules().deleteWithResponse("VA1234", + "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } } ``` @@ -5876,24 +7154,25 @@ public final class SqlVulnerabilityAssessmentBaselineRulesDeleteSamples { ### SqlVulnerabilityAssessmentBaselineRules_Get ```java -/** Samples for SqlVulnerabilityAssessmentBaselineRules Get. */ +/** + * Samples for SqlVulnerabilityAssessmentBaselineRules Get. + */ public final class SqlVulnerabilityAssessmentBaselineRulesGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Get.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_Get.json */ /** * Sample code: Get the baseline. - * + * * @param manager Entry point to SecurityManager. */ public static void getTheBaseline(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentBaselineRules() - .getWithResponse( - "VA1234", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentBaselineRules().getWithResponse("VA1234", + "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } } ``` @@ -5901,23 +7180,24 @@ public final class SqlVulnerabilityAssessmentBaselineRulesGetSamples { ### SqlVulnerabilityAssessmentBaselineRules_List ```java -/** Samples for SqlVulnerabilityAssessmentBaselineRules List. */ +/** + * Samples for SqlVulnerabilityAssessmentBaselineRules List. + */ public final class SqlVulnerabilityAssessmentBaselineRulesListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_List.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsBaselineRuleOperations/ArcMachineBaselineRules_List.json */ /** * Sample code: List baseline for all rules. - * + * * @param manager Entry point to SecurityManager. */ public static void listBaselineForAllRules(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentBaselineRules() - .listWithResponse( - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentBaselineRules().listWithResponse("55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } } ``` @@ -5925,44 +7205,42 @@ public final class SqlVulnerabilityAssessmentBaselineRulesListSamples { ### SqlVulnerabilityAssessmentScanResults_Get ```java -/** Samples for SqlVulnerabilityAssessmentScanResults Get. */ +/** + * Samples for SqlVulnerabilityAssessmentScanResults Get. + */ public final class SqlVulnerabilityAssessmentScanResultsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_Get.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_Get.json */ /** * Sample code: Get scan details of a scan record. - * + * * @param manager Entry point to SecurityManager. */ public static void getScanDetailsOfAScanRecord(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentScanResults() - .getWithResponse( - "Scheduled-20200623", - "VA2063", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentScanResults().getWithResponse("Scheduled-20200623", "VA2063", + "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_GetLatest.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_GetLatest.json */ /** * Sample code: Get scan details of the latest scan record. - * + * * @param manager Entry point to SecurityManager. */ public static void getScanDetailsOfTheLatestScanRecord(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentScanResults() - .getWithResponse( - "latest", - "VA2063", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentScanResults().getWithResponse("latest", "VA2063", + "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } } ``` @@ -5970,42 +7248,42 @@ public final class SqlVulnerabilityAssessmentScanResultsGetSamples { ### SqlVulnerabilityAssessmentScanResults_List ```java -/** Samples for SqlVulnerabilityAssessmentScanResults List. */ +/** + * Samples for SqlVulnerabilityAssessmentScanResults List. + */ public final class SqlVulnerabilityAssessmentScanResultsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_ListLatest.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_ListLatest.json */ /** * Sample code: List scan results of the latest scan. - * + * * @param manager Entry point to SecurityManager. */ public static void listScanResultsOfTheLatestScan(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentScanResults() - .listWithResponse( - "latest", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentScanResults().listWithResponse("latest", + "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_List.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentsScanResultsOperations/ArcMachineScanResults_List.json */ /** * Sample code: List scan results. - * + * * @param manager Entry point to SecurityManager. */ public static void listScanResults(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentScanResults() - .listWithResponse( - "Scheduled-20200623", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentScanResults().listWithResponse("Scheduled-20200623", + "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } } ``` @@ -6013,42 +7291,41 @@ public final class SqlVulnerabilityAssessmentScanResultsListSamples { ### SqlVulnerabilityAssessmentScans_Get ```java -/** Samples for SqlVulnerabilityAssessmentScans Get. */ +/** + * Samples for SqlVulnerabilityAssessmentScans Get. + */ public final class SqlVulnerabilityAssessmentScansGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_Get.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_Get.json */ /** * Sample code: Get scan details of a scan record. - * + * * @param manager Entry point to SecurityManager. */ public static void getScanDetailsOfAScanRecord(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentScans() - .getWithResponse( - "Scheduled-20200623", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentScans().getWithResponse("Scheduled-20200623", + "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_GetLatest.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_GetLatest.json */ /** * Sample code: Get scan details of the latest scan record. - * + * * @param manager Entry point to SecurityManager. */ public static void getScanDetailsOfTheLatestScanRecord(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentScans() - .getWithResponse( - "latest", - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentScans().getWithResponse("latest", "55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } } ``` @@ -6056,23 +7333,24 @@ public final class SqlVulnerabilityAssessmentScansGetSamples { ### SqlVulnerabilityAssessmentScans_List ```java -/** Samples for SqlVulnerabilityAssessmentScans List. */ +/** + * Samples for SqlVulnerabilityAssessmentScans List. + */ public final class SqlVulnerabilityAssessmentScansListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_List.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2023-02-01-preview/examples/ + * sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_List.json */ /** * Sample code: List scan details. - * + * * @param manager Entry point to SecurityManager. */ public static void listScanDetails(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .sqlVulnerabilityAssessmentScans() - .listWithResponse( - "55555555-6666-7777-8888-999999999999", - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", - com.azure.core.util.Context.NONE); + manager.sqlVulnerabilityAssessmentScans().listWithResponse("55555555-6666-7777-8888-999999999999", + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master", + com.azure.core.util.Context.NONE); } } ``` @@ -6080,25 +7358,26 @@ public final class SqlVulnerabilityAssessmentScansListSamples { ### SubAssessments_Get ```java -/** Samples for SubAssessments Get. */ +/** + * Samples for SubAssessments Get. + */ public final class SubAssessmentsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/GetSubAssessment_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/ + * GetSubAssessment_example.json */ /** * Sample code: Get security recommendation task from security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityRecommendationTaskFromSecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .subAssessments() - .getWithResponse( - "subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/DEMORG/providers/Microsoft.Compute/virtualMachines/vm2", - "1195afff-c881-495e-9bc5-1486211ae03f", - "95f7da9c-a2a4-1322-0758-fcd24ef09b85", - com.azure.core.util.Context.NONE); + manager.subAssessments().getWithResponse( + "subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/DEMORG/providers/Microsoft.Compute/virtualMachines/vm2", + "1195afff-c881-495e-9bc5-1486211ae03f", "95f7da9c-a2a4-1322-0758-fcd24ef09b85", + com.azure.core.util.Context.NONE); } } ``` @@ -6106,23 +7385,23 @@ public final class SubAssessmentsGetSamples { ### SubAssessments_List ```java -/** Samples for SubAssessments List. */ +/** + * Samples for SubAssessments List. + */ public final class SubAssessmentsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/ListSubAssessments_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/ + * ListSubAssessments_example.json */ /** * Sample code: List security sub-assessments. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecuritySubAssessments(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .subAssessments() - .list( - "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "82e20e14-edc5-4373-bfc4-f13121257c37", - com.azure.core.util.Context.NONE); + manager.subAssessments().list("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "82e20e14-edc5-4373-bfc4-f13121257c37", com.azure.core.util.Context.NONE); } } ``` @@ -6130,20 +7409,23 @@ public final class SubAssessmentsListSamples { ### SubAssessments_ListAll ```java -/** Samples for SubAssessments ListAll. */ +/** + * Samples for SubAssessments ListAll. + */ public final class SubAssessmentsListAllSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/ListSubscriptionSubAssessments_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/SubAssessments/ + * ListSubscriptionSubAssessments_example.json */ /** * Sample code: List security sub-assessments. - * + * * @param manager Entry point to SecurityManager. */ public static void listSecuritySubAssessments(com.azure.resourcemanager.security.SecurityManager manager) { - manager - .subAssessments() - .listAll("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", com.azure.core.util.Context.NONE); + manager.subAssessments().listAll("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + com.azure.core.util.Context.NONE); } } ``` @@ -6151,22 +7433,24 @@ public final class SubAssessmentsListAllSamples { ### Tasks_GetResourceGroupLevelTask ```java -/** Samples for Tasks GetResourceGroupLevelTask. */ +/** + * Samples for Tasks GetResourceGroupLevelTask. + */ public final class TasksGetResourceGroupLevelTaskSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTaskResourceGroupLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/ + * GetTaskResourceGroupLocation_example.json */ /** * Sample code: Get security recommendation task in a resource group. - * + * * @param manager Entry point to SecurityManager. */ - public static void getSecurityRecommendationTaskInAResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .tasks() - .getResourceGroupLevelTaskWithResponse( - "myRg", "westeurope", "d55b4dc0-779c-c66c-33e5-d7bce24c4222", com.azure.core.util.Context.NONE); + public static void + getSecurityRecommendationTaskInAResourceGroup(com.azure.resourcemanager.security.SecurityManager manager) { + manager.tasks().getResourceGroupLevelTaskWithResponse("myRg", "westeurope", + "d55b4dc0-779c-c66c-33e5-d7bce24c4222", com.azure.core.util.Context.NONE); } } ``` @@ -6174,22 +7458,24 @@ public final class TasksGetResourceGroupLevelTaskSamples { ### Tasks_GetSubscriptionLevelTask ```java -/** Samples for Tasks GetSubscriptionLevelTask. */ +/** + * Samples for Tasks GetSubscriptionLevelTask. + */ public final class TasksGetSubscriptionLevelTaskSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTaskSubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/ + * GetTaskSubscriptionLocation_example.json */ /** * Sample code: Get security recommendation task from security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityRecommendationTaskFromSecurityDataLocation( com.azure.resourcemanager.security.SecurityManager manager) { - manager - .tasks() - .getSubscriptionLevelTaskWithResponse( - "westeurope", "62609ee7-d0a5-8616-9fe4-1df5cca7758d", com.azure.core.util.Context.NONE); + manager.tasks().getSubscriptionLevelTaskWithResponse("westeurope", "62609ee7-d0a5-8616-9fe4-1df5cca7758d", + com.azure.core.util.Context.NONE); } } ``` @@ -6197,14 +7483,18 @@ public final class TasksGetSubscriptionLevelTaskSamples { ### Tasks_List ```java -/** Samples for Tasks List. */ +/** + * Samples for Tasks List. + */ public final class TasksListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTasksSubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/ + * GetTasksSubscription_example.json */ /** * Sample code: Get security recommendations tasks. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityRecommendationsTasks(com.azure.resourcemanager.security.SecurityManager manager) { @@ -6216,14 +7506,18 @@ public final class TasksListSamples { ### Tasks_ListByHomeRegion ```java -/** Samples for Tasks ListByHomeRegion. */ +/** + * Samples for Tasks ListByHomeRegion. + */ public final class TasksListByHomeRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTasksSubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/ + * GetTasksSubscriptionLocation_example.json */ /** * Sample code: Get security recommendations tasks from security data location. - * + * * @param manager Entry point to SecurityManager. */ public static void getSecurityRecommendationsTasksFromSecurityDataLocation( @@ -6236,18 +7530,22 @@ public final class TasksListByHomeRegionSamples { ### Tasks_ListByResourceGroup ```java -/** Samples for Tasks ListByResourceGroup. */ +/** + * Samples for Tasks ListByResourceGroup. + */ public final class TasksListByResourceGroupSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/GetTasksResourceGroupLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/ + * GetTasksResourceGroupLocation_example.json */ /** * Sample code: Get security recommendation tasks in a resource group. - * + * * @param manager Entry point to SecurityManager. */ - public static void getSecurityRecommendationTasksInAResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getSecurityRecommendationTasksInAResourceGroup(com.azure.resourcemanager.security.SecurityManager manager) { manager.tasks().listByResourceGroup("myRg", "westeurope", null, com.azure.core.util.Context.NONE); } } @@ -6258,26 +7556,24 @@ public final class TasksListByResourceGroupSamples { ```java import com.azure.resourcemanager.security.models.TaskUpdateActionType; -/** Samples for Tasks UpdateResourceGroupLevelTaskState. */ +/** + * Samples for Tasks UpdateResourceGroupLevelTaskState. + */ public final class TasksUpdateResourceGroupLevelTaskStateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/UpdateTaskResourceGroupLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/ + * UpdateTaskResourceGroupLocation_example.json */ /** * Sample code: Change security recommendation task state. - * + * * @param manager Entry point to SecurityManager. */ - public static void changeSecurityRecommendationTaskState( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .tasks() - .updateResourceGroupLevelTaskStateWithResponse( - "myRg", - "westeurope", - "d55b4dc0-779c-c66c-33e5-d7bce24c4222", - TaskUpdateActionType.DISMISS, - com.azure.core.util.Context.NONE); + public static void + changeSecurityRecommendationTaskState(com.azure.resourcemanager.security.SecurityManager manager) { + manager.tasks().updateResourceGroupLevelTaskStateWithResponse("myRg", "westeurope", + "d55b4dc0-779c-c66c-33e5-d7bce24c4222", TaskUpdateActionType.DISMISS, com.azure.core.util.Context.NONE); } } ``` @@ -6287,25 +7583,24 @@ public final class TasksUpdateResourceGroupLevelTaskStateSamples { ```java import com.azure.resourcemanager.security.models.TaskUpdateActionType; -/** Samples for Tasks UpdateSubscriptionLevelTaskState. */ +/** + * Samples for Tasks UpdateSubscriptionLevelTaskState. + */ public final class TasksUpdateSubscriptionLevelTaskStateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/UpdateTaskSubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/ + * UpdateTaskSubscriptionLocation_example.json */ /** * Sample code: Change security recommendation task state. - * + * * @param manager Entry point to SecurityManager. */ - public static void changeSecurityRecommendationTaskState( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .tasks() - .updateSubscriptionLevelTaskStateWithResponse( - "westeurope", - "62609ee7-d0a5-8616-9fe4-1df5cca7758d", - TaskUpdateActionType.DISMISS, - com.azure.core.util.Context.NONE); + public static void + changeSecurityRecommendationTaskState(com.azure.resourcemanager.security.SecurityManager manager) { + manager.tasks().updateSubscriptionLevelTaskStateWithResponse("westeurope", + "62609ee7-d0a5-8616-9fe4-1df5cca7758d", TaskUpdateActionType.DISMISS, com.azure.core.util.Context.NONE); } } ``` @@ -6313,14 +7608,18 @@ public final class TasksUpdateSubscriptionLevelTaskStateSamples { ### Topology_Get ```java -/** Samples for Topology Get. */ +/** + * Samples for Topology Get. + */ public final class TopologyGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/GetTopology_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/ + * GetTopology_example.json */ /** * Sample code: Get topology. - * + * * @param manager Entry point to SecurityManager. */ public static void getTopology(com.azure.resourcemanager.security.SecurityManager manager) { @@ -6332,14 +7631,18 @@ public final class TopologyGetSamples { ### Topology_List ```java -/** Samples for Topology List. */ +/** + * Samples for Topology List. + */ public final class TopologyListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/GetTopologySubscription_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/ + * GetTopologySubscription_example.json */ /** * Sample code: Get topology on a subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getTopologyOnASubscription(com.azure.resourcemanager.security.SecurityManager manager) { @@ -6351,18 +7654,22 @@ public final class TopologyListSamples { ### Topology_ListByHomeRegion ```java -/** Samples for Topology ListByHomeRegion. */ +/** + * Samples for Topology ListByHomeRegion. + */ public final class TopologyListByHomeRegionSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/GetTopologySubscriptionLocation_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/Topology/ + * GetTopologySubscriptionLocation_example.json */ /** * Sample code: Get topology on a subscription from security data location. - * + * * @param manager Entry point to SecurityManager. */ - public static void getTopologyOnASubscriptionFromSecurityDataLocation( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + getTopologyOnASubscriptionFromSecurityDataLocation(com.azure.resourcemanager.security.SecurityManager manager) { manager.topologies().listByHomeRegion("centralus", com.azure.core.util.Context.NONE); } } @@ -6371,25 +7678,25 @@ public final class TopologyListByHomeRegionSamples { ### WorkspaceSettings_Create ```java -/** Samples for WorkspaceSettings Create. */ +/** + * Samples for WorkspaceSettings Create. + */ public final class WorkspaceSettingsCreateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/CreateWorkspaceSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/ + * CreateWorkspaceSetting_example.json */ /** * Sample code: Create a workspace setting data for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void createAWorkspaceSettingDataForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - manager - .workspaceSettings() - .define("default") - .withWorkspaceId( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace") - .withScope("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23") - .create(); + public static void + createAWorkspaceSettingDataForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + manager.workspaceSettings().define("default").withWorkspaceId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace") + .withScope("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23").create(); } } ``` @@ -6397,18 +7704,22 @@ public final class WorkspaceSettingsCreateSamples { ### WorkspaceSettings_Delete ```java -/** Samples for WorkspaceSettings Delete. */ +/** + * Samples for WorkspaceSettings Delete. + */ public final class WorkspaceSettingsDeleteSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/DeleteWorkspaceSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/ + * DeleteWorkspaceSetting_example.json */ /** * Sample code: Delete a workspace setting data for resource group. - * + * * @param manager Entry point to SecurityManager. */ - public static void deleteAWorkspaceSettingDataForResourceGroup( - com.azure.resourcemanager.security.SecurityManager manager) { + public static void + deleteAWorkspaceSettingDataForResourceGroup(com.azure.resourcemanager.security.SecurityManager manager) { manager.workspaceSettings().deleteWithResponse("default", com.azure.core.util.Context.NONE); } } @@ -6417,14 +7728,18 @@ public final class WorkspaceSettingsDeleteSamples { ### WorkspaceSettings_Get ```java -/** Samples for WorkspaceSettings Get. */ +/** + * Samples for WorkspaceSettings Get. + */ public final class WorkspaceSettingsGetSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/GetWorkspaceSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/ + * GetWorkspaceSetting_example.json */ /** * Sample code: Get a workspace setting on subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getAWorkspaceSettingOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { @@ -6436,14 +7751,18 @@ public final class WorkspaceSettingsGetSamples { ### WorkspaceSettings_List ```java -/** Samples for WorkspaceSettings List. */ +/** + * Samples for WorkspaceSettings List. + */ public final class WorkspaceSettingsListSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/GetWorkspaceSettings_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/ + * GetWorkspaceSettings_example.json */ /** * Sample code: Get workspace settings on subscription. - * + * * @param manager Entry point to SecurityManager. */ public static void getWorkspaceSettingsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) { @@ -6457,24 +7776,26 @@ public final class WorkspaceSettingsListSamples { ```java import com.azure.resourcemanager.security.models.WorkspaceSetting; -/** Samples for WorkspaceSettings Update. */ +/** + * Samples for WorkspaceSettings Update. + */ public final class WorkspaceSettingsUpdateSamples { /* - * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/UpdateWorkspaceSetting_example.json + * x-ms-original-file: + * specification/security/resource-manager/Microsoft.Security/preview/2017-08-01-preview/examples/WorkspaceSettings/ + * UpdateWorkspaceSetting_example.json */ /** * Sample code: Update a workspace setting data for subscription. - * + * * @param manager Entry point to SecurityManager. */ - public static void updateAWorkspaceSettingDataForSubscription( - com.azure.resourcemanager.security.SecurityManager manager) { - WorkspaceSetting resource = - manager.workspaceSettings().getWithResponse("default", com.azure.core.util.Context.NONE).getValue(); - resource - .update() - .withWorkspaceId( - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace") + public static void + updateAWorkspaceSettingDataForSubscription(com.azure.resourcemanager.security.SecurityManager manager) { + WorkspaceSetting resource + = manager.workspaceSettings().getWithResponse("default", com.azure.core.util.Context.NONE).getValue(); + resource.update().withWorkspaceId( + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace") .apply(); } } diff --git a/sdk/security/azure-resourcemanager-security/pom.xml b/sdk/security/azure-resourcemanager-security/pom.xml index a17ad75df9f5..60126c77e3bc 100644 --- a/sdk/security/azure-resourcemanager-security/pom.xml +++ b/sdk/security/azure-resourcemanager-security/pom.xml @@ -45,6 +45,7 @@ UTF-8 0 0 + true @@ -87,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java index 80fd7da717a7..de2f8a7627be 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java @@ -30,8 +30,6 @@ import com.azure.resourcemanager.security.implementation.AlertsImpl; import com.azure.resourcemanager.security.implementation.AlertsSuppressionRulesImpl; import com.azure.resourcemanager.security.implementation.AllowedConnectionsImpl; -import com.azure.resourcemanager.security.implementation.ApiCollectionOffboardingsImpl; -import com.azure.resourcemanager.security.implementation.ApiCollectionOnboardingsImpl; import com.azure.resourcemanager.security.implementation.ApiCollectionsImpl; import com.azure.resourcemanager.security.implementation.ApplicationOperationsImpl; import com.azure.resourcemanager.security.implementation.ApplicationsImpl; @@ -39,20 +37,29 @@ import com.azure.resourcemanager.security.implementation.AssessmentsMetadatasImpl; import com.azure.resourcemanager.security.implementation.AutoProvisioningSettingsImpl; import com.azure.resourcemanager.security.implementation.AutomationsImpl; +import com.azure.resourcemanager.security.implementation.AzureDevOpsOrgsImpl; +import com.azure.resourcemanager.security.implementation.AzureDevOpsProjectsImpl; +import com.azure.resourcemanager.security.implementation.AzureDevOpsReposImpl; import com.azure.resourcemanager.security.implementation.ComplianceResultsImpl; import com.azure.resourcemanager.security.implementation.CompliancesImpl; import com.azure.resourcemanager.security.implementation.ConnectorsImpl; import com.azure.resourcemanager.security.implementation.CustomAssessmentAutomationsImpl; import com.azure.resourcemanager.security.implementation.CustomEntityStoreAssignmentsImpl; +import com.azure.resourcemanager.security.implementation.DefenderForStoragesImpl; +import com.azure.resourcemanager.security.implementation.DevOpsConfigurationsImpl; +import com.azure.resourcemanager.security.implementation.DevOpsOperationResultsImpl; import com.azure.resourcemanager.security.implementation.DeviceSecurityGroupsImpl; import com.azure.resourcemanager.security.implementation.DiscoveredSecuritySolutionsImpl; import com.azure.resourcemanager.security.implementation.ExternalSecuritySolutionsImpl; +import com.azure.resourcemanager.security.implementation.GitHubOwnersImpl; +import com.azure.resourcemanager.security.implementation.GitHubReposImpl; +import com.azure.resourcemanager.security.implementation.GitLabGroupsImpl; +import com.azure.resourcemanager.security.implementation.GitLabProjectsImpl; +import com.azure.resourcemanager.security.implementation.GitLabSubgroupsImpl; import com.azure.resourcemanager.security.implementation.GovernanceAssignmentsImpl; import com.azure.resourcemanager.security.implementation.GovernanceRulesImpl; -import com.azure.resourcemanager.security.implementation.HealthReportOperationsImpl; import com.azure.resourcemanager.security.implementation.HealthReportsImpl; import com.azure.resourcemanager.security.implementation.InformationProtectionPoliciesImpl; -import com.azure.resourcemanager.security.implementation.IngestionSettingsImpl; import com.azure.resourcemanager.security.implementation.IotSecuritySolutionAnalyticsImpl; import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsAnalyticsAggregatedAlertsImpl; import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsAnalyticsRecommendationsImpl; @@ -65,6 +72,7 @@ import com.azure.resourcemanager.security.implementation.RegulatoryComplianceAssessmentsImpl; import com.azure.resourcemanager.security.implementation.RegulatoryComplianceControlsImpl; import com.azure.resourcemanager.security.implementation.RegulatoryComplianceStandardsImpl; +import com.azure.resourcemanager.security.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.security.implementation.SecureScoreControlDefinitionsImpl; import com.azure.resourcemanager.security.implementation.SecureScoreControlsImpl; import com.azure.resourcemanager.security.implementation.SecureScoresImpl; @@ -76,7 +84,9 @@ import com.azure.resourcemanager.security.implementation.SecurityOperatorsImpl; import com.azure.resourcemanager.security.implementation.SecuritySolutionsImpl; import com.azure.resourcemanager.security.implementation.SecuritySolutionsReferenceDatasImpl; +import com.azure.resourcemanager.security.implementation.SensitivitySettingsImpl; import com.azure.resourcemanager.security.implementation.ServerVulnerabilityAssessmentsImpl; +import com.azure.resourcemanager.security.implementation.ServerVulnerabilityAssessmentsSettingsImpl; import com.azure.resourcemanager.security.implementation.SettingsImpl; import com.azure.resourcemanager.security.implementation.SoftwareInventoriesImpl; import com.azure.resourcemanager.security.implementation.SqlVulnerabilityAssessmentBaselineRulesImpl; @@ -92,8 +102,6 @@ import com.azure.resourcemanager.security.models.Alerts; import com.azure.resourcemanager.security.models.AlertsSuppressionRules; import com.azure.resourcemanager.security.models.AllowedConnections; -import com.azure.resourcemanager.security.models.ApiCollectionOffboardings; -import com.azure.resourcemanager.security.models.ApiCollectionOnboardings; import com.azure.resourcemanager.security.models.ApiCollections; import com.azure.resourcemanager.security.models.ApplicationOperations; import com.azure.resourcemanager.security.models.Applications; @@ -101,20 +109,29 @@ import com.azure.resourcemanager.security.models.AssessmentsMetadatas; import com.azure.resourcemanager.security.models.AutoProvisioningSettings; import com.azure.resourcemanager.security.models.Automations; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgs; +import com.azure.resourcemanager.security.models.AzureDevOpsProjects; +import com.azure.resourcemanager.security.models.AzureDevOpsRepos; import com.azure.resourcemanager.security.models.ComplianceResults; import com.azure.resourcemanager.security.models.Compliances; import com.azure.resourcemanager.security.models.Connectors; import com.azure.resourcemanager.security.models.CustomAssessmentAutomations; import com.azure.resourcemanager.security.models.CustomEntityStoreAssignments; +import com.azure.resourcemanager.security.models.DefenderForStorages; +import com.azure.resourcemanager.security.models.DevOpsConfigurations; +import com.azure.resourcemanager.security.models.DevOpsOperationResults; import com.azure.resourcemanager.security.models.DeviceSecurityGroups; import com.azure.resourcemanager.security.models.DiscoveredSecuritySolutions; import com.azure.resourcemanager.security.models.ExternalSecuritySolutions; +import com.azure.resourcemanager.security.models.GitHubOwners; +import com.azure.resourcemanager.security.models.GitHubRepos; +import com.azure.resourcemanager.security.models.GitLabGroups; +import com.azure.resourcemanager.security.models.GitLabProjects; +import com.azure.resourcemanager.security.models.GitLabSubgroups; import com.azure.resourcemanager.security.models.GovernanceAssignments; import com.azure.resourcemanager.security.models.GovernanceRules; -import com.azure.resourcemanager.security.models.HealthReportOperations; import com.azure.resourcemanager.security.models.HealthReports; import com.azure.resourcemanager.security.models.InformationProtectionPolicies; -import com.azure.resourcemanager.security.models.IngestionSettings; import com.azure.resourcemanager.security.models.IotSecuritySolutionAnalytics; import com.azure.resourcemanager.security.models.IotSecuritySolutions; import com.azure.resourcemanager.security.models.IotSecuritySolutionsAnalyticsAggregatedAlerts; @@ -127,6 +144,7 @@ import com.azure.resourcemanager.security.models.RegulatoryComplianceAssessments; import com.azure.resourcemanager.security.models.RegulatoryComplianceControls; import com.azure.resourcemanager.security.models.RegulatoryComplianceStandards; +import com.azure.resourcemanager.security.models.ResourceProviders; import com.azure.resourcemanager.security.models.SecureScoreControlDefinitions; import com.azure.resourcemanager.security.models.SecureScoreControls; import com.azure.resourcemanager.security.models.SecureScores; @@ -137,7 +155,9 @@ import com.azure.resourcemanager.security.models.SecurityOperators; import com.azure.resourcemanager.security.models.SecuritySolutions; import com.azure.resourcemanager.security.models.SecuritySolutionsReferenceDatas; +import com.azure.resourcemanager.security.models.SensitivitySettings; import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessments; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettings; import com.azure.resourcemanager.security.models.Settings; import com.azure.resourcemanager.security.models.SoftwareInventories; import com.azure.resourcemanager.security.models.SqlVulnerabilityAssessmentBaselineRules; @@ -154,147 +174,166 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to SecurityManager. API spec for Microsoft.Security (Azure Security Center) resource provider. */ +/** + * Entry point to SecurityManager. + * API spec for Microsoft.Security (Azure Security Center) resource provider. + */ public final class SecurityManager { - private MdeOnboardings mdeOnboardings; + private Locations locations; - private CustomAssessmentAutomations customAssessmentAutomations; + private Operations operations; - private CustomEntityStoreAssignments customEntityStoreAssignments; + private Tasks tasks; - private ComplianceResults complianceResults; + private AutoProvisioningSettings autoProvisioningSettings; - private Pricings pricings; + private Compliances compliances; - private AdvancedThreatProtections advancedThreatProtections; + private InformationProtectionPolicies informationProtectionPolicies; - private DeviceSecurityGroups deviceSecurityGroups; + private WorkspaceSettings workspaceSettings; - private IotSecuritySolutions iotSecuritySolutions; + private AlertsSuppressionRules alertsSuppressionRules; - private IotSecuritySolutionAnalytics iotSecuritySolutionAnalytics; + private Automations automations; - private IotSecuritySolutionsAnalyticsAggregatedAlerts iotSecuritySolutionsAnalyticsAggregatedAlerts; + private RegulatoryComplianceStandards regulatoryComplianceStandards; - private IotSecuritySolutionsAnalyticsRecommendations iotSecuritySolutionsAnalyticsRecommendations; + private RegulatoryComplianceControls regulatoryComplianceControls; - private Locations locations; + private RegulatoryComplianceAssessments regulatoryComplianceAssessments; - private Operations operations; + private SubAssessments subAssessments; - private Tasks tasks; + private Connectors connectors; - private AutoProvisioningSettings autoProvisioningSettings; + private SecurityContacts securityContacts; - private Compliances compliances; + private SoftwareInventories softwareInventories; - private InformationProtectionPolicies informationProtectionPolicies; + private CustomAssessmentAutomations customAssessmentAutomations; - private SecurityContacts securityContacts; + private CustomEntityStoreAssignments customEntityStoreAssignments; - private WorkspaceSettings workspaceSettings; + private MdeOnboardings mdeOnboardings; - private RegulatoryComplianceStandards regulatoryComplianceStandards; + private GovernanceAssignments governanceAssignments; - private RegulatoryComplianceControls regulatoryComplianceControls; + private GovernanceRules governanceRules; - private RegulatoryComplianceAssessments regulatoryComplianceAssessments; + private Applications applications; - private SubAssessments subAssessments; + private ApplicationOperations applicationOperations; - private Automations automations; + private SecurityConnectorApplications securityConnectorApplications; - private AlertsSuppressionRules alertsSuppressionRules; + private SecurityConnectorApplicationOperations securityConnectorApplicationOperations; - private ServerVulnerabilityAssessments serverVulnerabilityAssessments; + private DefenderForStorages defenderForStorages; - private AssessmentsMetadatas assessmentsMetadatas; + private SecurityOperators securityOperators; - private Assessments assessments; + private SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules; - private AdaptiveApplicationControls adaptiveApplicationControls; + private SqlVulnerabilityAssessmentScans sqlVulnerabilityAssessmentScans; - private AdaptiveNetworkHardenings adaptiveNetworkHardenings; + private SqlVulnerabilityAssessmentScanResults sqlVulnerabilityAssessmentScanResults; - private AllowedConnections allowedConnections; + private ResourceProviders resourceProviders; - private Topologies topologies; + private SensitivitySettings sensitivitySettings; - private JitNetworkAccessPolicies jitNetworkAccessPolicies; + private HealthReports healthReports; - private DiscoveredSecuritySolutions discoveredSecuritySolutions; + private AzureDevOpsOrgs azureDevOpsOrgs; - private SecuritySolutionsReferenceDatas securitySolutionsReferenceDatas; + private AzureDevOpsProjects azureDevOpsProjects; - private ExternalSecuritySolutions externalSecuritySolutions; + private AzureDevOpsRepos azureDevOpsRepos; - private SecureScores secureScores; + private DevOpsConfigurations devOpsConfigurations; - private SecureScoreControls secureScoreControls; + private GitHubOwners gitHubOwners; - private SecureScoreControlDefinitions secureScoreControlDefinitions; + private GitHubRepos gitHubRepos; - private SecuritySolutions securitySolutions; + private GitLabGroups gitLabGroups; - private Connectors connectors; + private GitLabSubgroups gitLabSubgroups; - private Alerts alerts; + private GitLabProjects gitLabProjects; - private Settings settings; + private DevOpsOperationResults devOpsOperationResults; - private IngestionSettings ingestionSettings; + private SecurityConnectors securityConnectors; - private SoftwareInventories softwareInventories; + private ComplianceResults complianceResults; - private GovernanceRules governanceRules; + private AdvancedThreatProtections advancedThreatProtections; - private GovernanceAssignments governanceAssignments; + private DeviceSecurityGroups deviceSecurityGroups; - private Applications applications; + private IotSecuritySolutionAnalytics iotSecuritySolutionAnalytics; - private ApplicationOperations applicationOperations; + private IotSecuritySolutionsAnalyticsAggregatedAlerts iotSecuritySolutionsAnalyticsAggregatedAlerts; - private SecurityConnectorApplications securityConnectorApplications; + private IotSecuritySolutionsAnalyticsRecommendations iotSecuritySolutionsAnalyticsRecommendations; - private SecurityConnectorApplicationOperations securityConnectorApplicationOperations; + private IotSecuritySolutions iotSecuritySolutions; - private ApiCollections apiCollections; + private AdaptiveNetworkHardenings adaptiveNetworkHardenings; - private ApiCollectionOnboardings apiCollectionOnboardings; + private AllowedConnections allowedConnections; - private ApiCollectionOffboardings apiCollectionOffboardings; + private AdaptiveApplicationControls adaptiveApplicationControls; - private HealthReports healthReports; + private DiscoveredSecuritySolutions discoveredSecuritySolutions; - private HealthReportOperations healthReportOperations; + private ExternalSecuritySolutions externalSecuritySolutions; - private SqlVulnerabilityAssessmentScans sqlVulnerabilityAssessmentScans; + private JitNetworkAccessPolicies jitNetworkAccessPolicies; - private SqlVulnerabilityAssessmentScanResults sqlVulnerabilityAssessmentScanResults; + private SecureScores secureScores; - private SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules; + private SecureScoreControls secureScoreControls; - private SecurityConnectors securityConnectors; + private SecureScoreControlDefinitions secureScoreControlDefinitions; - private SecurityOperators securityOperators; + private SecuritySolutions securitySolutions; + + private SecuritySolutionsReferenceDatas securitySolutionsReferenceDatas; + + private ServerVulnerabilityAssessments serverVulnerabilityAssessments; + + private Topologies topologies; + + private AssessmentsMetadatas assessmentsMetadatas; + + private Assessments assessments; + + private Alerts alerts; + + private Settings settings; + + private ServerVulnerabilityAssessmentsSettings serverVulnerabilityAssessmentsSettings; + + private ApiCollections apiCollections; + + private Pricings pricings; private final SecurityCenter clientObject; private SecurityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new SecurityCenterBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new SecurityCenterBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of Security service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the Security service API instance. @@ -307,7 +346,7 @@ public static SecurityManager authenticate(TokenCredential credential, AzureProf /** * Creates an instance of Security service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the Security service API instance. @@ -320,14 +359,16 @@ public static SecurityManager authenticate(HttpPipeline httpPipeline, AzureProfi /** * Gets a Configurable instance that can be used to create SecurityManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new SecurityManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -399,8 +440,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -417,8 +458,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -438,21 +479,12 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.security") - .append("/") - .append("1.0.0-beta.5"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.security").append("/") + .append("1.0.0-beta.6"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -471,178 +503,25 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new SecurityManager(httpPipeline, profile, defaultPollInterval); } } - /** - * Gets the resource collection API of MdeOnboardings. - * - * @return Resource collection API of MdeOnboardings. - */ - public MdeOnboardings mdeOnboardings() { - if (this.mdeOnboardings == null) { - this.mdeOnboardings = new MdeOnboardingsImpl(clientObject.getMdeOnboardings(), this); - } - return mdeOnboardings; - } - - /** - * Gets the resource collection API of CustomAssessmentAutomations. It manages CustomAssessmentAutomation. - * - * @return Resource collection API of CustomAssessmentAutomations. - */ - public CustomAssessmentAutomations customAssessmentAutomations() { - if (this.customAssessmentAutomations == null) { - this.customAssessmentAutomations = - new CustomAssessmentAutomationsImpl(clientObject.getCustomAssessmentAutomations(), this); - } - return customAssessmentAutomations; - } - - /** - * Gets the resource collection API of CustomEntityStoreAssignments. It manages CustomEntityStoreAssignment. - * - * @return Resource collection API of CustomEntityStoreAssignments. - */ - public CustomEntityStoreAssignments customEntityStoreAssignments() { - if (this.customEntityStoreAssignments == null) { - this.customEntityStoreAssignments = - new CustomEntityStoreAssignmentsImpl(clientObject.getCustomEntityStoreAssignments(), this); - } - return customEntityStoreAssignments; - } - - /** - * Gets the resource collection API of ComplianceResults. - * - * @return Resource collection API of ComplianceResults. - */ - public ComplianceResults complianceResults() { - if (this.complianceResults == null) { - this.complianceResults = new ComplianceResultsImpl(clientObject.getComplianceResults(), this); - } - return complianceResults; - } - - /** - * Gets the resource collection API of Pricings. - * - * @return Resource collection API of Pricings. - */ - public Pricings pricings() { - if (this.pricings == null) { - this.pricings = new PricingsImpl(clientObject.getPricings(), this); - } - return pricings; - } - - /** - * Gets the resource collection API of AdvancedThreatProtections. It manages AdvancedThreatProtectionSetting. - * - * @return Resource collection API of AdvancedThreatProtections. - */ - public AdvancedThreatProtections advancedThreatProtections() { - if (this.advancedThreatProtections == null) { - this.advancedThreatProtections = - new AdvancedThreatProtectionsImpl(clientObject.getAdvancedThreatProtections(), this); - } - return advancedThreatProtections; - } - - /** - * Gets the resource collection API of DeviceSecurityGroups. It manages DeviceSecurityGroup. - * - * @return Resource collection API of DeviceSecurityGroups. - */ - public DeviceSecurityGroups deviceSecurityGroups() { - if (this.deviceSecurityGroups == null) { - this.deviceSecurityGroups = new DeviceSecurityGroupsImpl(clientObject.getDeviceSecurityGroups(), this); - } - return deviceSecurityGroups; - } - - /** - * Gets the resource collection API of IotSecuritySolutions. It manages IoTSecuritySolutionModel. - * - * @return Resource collection API of IotSecuritySolutions. - */ - public IotSecuritySolutions iotSecuritySolutions() { - if (this.iotSecuritySolutions == null) { - this.iotSecuritySolutions = new IotSecuritySolutionsImpl(clientObject.getIotSecuritySolutions(), this); - } - return iotSecuritySolutions; - } - - /** - * Gets the resource collection API of IotSecuritySolutionAnalytics. - * - * @return Resource collection API of IotSecuritySolutionAnalytics. - */ - public IotSecuritySolutionAnalytics iotSecuritySolutionAnalytics() { - if (this.iotSecuritySolutionAnalytics == null) { - this.iotSecuritySolutionAnalytics = - new IotSecuritySolutionAnalyticsImpl(clientObject.getIotSecuritySolutionAnalytics(), this); - } - return iotSecuritySolutionAnalytics; - } - - /** - * Gets the resource collection API of IotSecuritySolutionsAnalyticsAggregatedAlerts. - * - * @return Resource collection API of IotSecuritySolutionsAnalyticsAggregatedAlerts. - */ - public IotSecuritySolutionsAnalyticsAggregatedAlerts iotSecuritySolutionsAnalyticsAggregatedAlerts() { - if (this.iotSecuritySolutionsAnalyticsAggregatedAlerts == null) { - this.iotSecuritySolutionsAnalyticsAggregatedAlerts = - new IotSecuritySolutionsAnalyticsAggregatedAlertsImpl( - clientObject.getIotSecuritySolutionsAnalyticsAggregatedAlerts(), this); - } - return iotSecuritySolutionsAnalyticsAggregatedAlerts; - } - - /** - * Gets the resource collection API of IotSecuritySolutionsAnalyticsRecommendations. - * - * @return Resource collection API of IotSecuritySolutionsAnalyticsRecommendations. - */ - public IotSecuritySolutionsAnalyticsRecommendations iotSecuritySolutionsAnalyticsRecommendations() { - if (this.iotSecuritySolutionsAnalyticsRecommendations == null) { - this.iotSecuritySolutionsAnalyticsRecommendations = - new IotSecuritySolutionsAnalyticsRecommendationsImpl( - clientObject.getIotSecuritySolutionsAnalyticsRecommendations(), this); - } - return iotSecuritySolutionsAnalyticsRecommendations; - } - /** * Gets the resource collection API of Locations. - * + * * @return Resource collection API of Locations. */ public Locations locations() { @@ -654,7 +533,7 @@ public Locations locations() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -666,7 +545,7 @@ public Operations operations() { /** * Gets the resource collection API of Tasks. - * + * * @return Resource collection API of Tasks. */ public Tasks tasks() { @@ -678,20 +557,20 @@ public Tasks tasks() { /** * Gets the resource collection API of AutoProvisioningSettings. It manages AutoProvisioningSetting. - * + * * @return Resource collection API of AutoProvisioningSettings. */ public AutoProvisioningSettings autoProvisioningSettings() { if (this.autoProvisioningSettings == null) { - this.autoProvisioningSettings = - new AutoProvisioningSettingsImpl(clientObject.getAutoProvisioningSettings(), this); + this.autoProvisioningSettings + = new AutoProvisioningSettingsImpl(clientObject.getAutoProvisioningSettings(), this); } return autoProvisioningSettings; } /** * Gets the resource collection API of Compliances. - * + * * @return Resource collection API of Compliances. */ public Compliances compliances() { @@ -703,32 +582,20 @@ public Compliances compliances() { /** * Gets the resource collection API of InformationProtectionPolicies. It manages InformationProtectionPolicy. - * + * * @return Resource collection API of InformationProtectionPolicies. */ public InformationProtectionPolicies informationProtectionPolicies() { if (this.informationProtectionPolicies == null) { - this.informationProtectionPolicies = - new InformationProtectionPoliciesImpl(clientObject.getInformationProtectionPolicies(), this); + this.informationProtectionPolicies + = new InformationProtectionPoliciesImpl(clientObject.getInformationProtectionPolicies(), this); } return informationProtectionPolicies; } - /** - * Gets the resource collection API of SecurityContacts. It manages SecurityContact. - * - * @return Resource collection API of SecurityContacts. - */ - public SecurityContacts securityContacts() { - if (this.securityContacts == null) { - this.securityContacts = new SecurityContactsImpl(clientObject.getSecurityContacts(), this); - } - return securityContacts; - } - /** * Gets the resource collection API of WorkspaceSettings. It manages WorkspaceSetting. - * + * * @return Resource collection API of WorkspaceSettings. */ public WorkspaceSettings workspaceSettings() { @@ -739,47 +606,72 @@ public WorkspaceSettings workspaceSettings() { } /** - * Gets the resource collection API of RegulatoryComplianceStandards. - * - * @return Resource collection API of RegulatoryComplianceStandards. - */ + * Gets the resource collection API of AlertsSuppressionRules. + * + * @return Resource collection API of AlertsSuppressionRules. + */ + public AlertsSuppressionRules alertsSuppressionRules() { + if (this.alertsSuppressionRules == null) { + this.alertsSuppressionRules + = new AlertsSuppressionRulesImpl(clientObject.getAlertsSuppressionRules(), this); + } + return alertsSuppressionRules; + } + + /** + * Gets the resource collection API of Automations. It manages Automation. + * + * @return Resource collection API of Automations. + */ + public Automations automations() { + if (this.automations == null) { + this.automations = new AutomationsImpl(clientObject.getAutomations(), this); + } + return automations; + } + + /** + * Gets the resource collection API of RegulatoryComplianceStandards. + * + * @return Resource collection API of RegulatoryComplianceStandards. + */ public RegulatoryComplianceStandards regulatoryComplianceStandards() { if (this.regulatoryComplianceStandards == null) { - this.regulatoryComplianceStandards = - new RegulatoryComplianceStandardsImpl(clientObject.getRegulatoryComplianceStandards(), this); + this.regulatoryComplianceStandards + = new RegulatoryComplianceStandardsImpl(clientObject.getRegulatoryComplianceStandards(), this); } return regulatoryComplianceStandards; } /** * Gets the resource collection API of RegulatoryComplianceControls. - * + * * @return Resource collection API of RegulatoryComplianceControls. */ public RegulatoryComplianceControls regulatoryComplianceControls() { if (this.regulatoryComplianceControls == null) { - this.regulatoryComplianceControls = - new RegulatoryComplianceControlsImpl(clientObject.getRegulatoryComplianceControls(), this); + this.regulatoryComplianceControls + = new RegulatoryComplianceControlsImpl(clientObject.getRegulatoryComplianceControls(), this); } return regulatoryComplianceControls; } /** * Gets the resource collection API of RegulatoryComplianceAssessments. - * + * * @return Resource collection API of RegulatoryComplianceAssessments. */ public RegulatoryComplianceAssessments regulatoryComplianceAssessments() { if (this.regulatoryComplianceAssessments == null) { - this.regulatoryComplianceAssessments = - new RegulatoryComplianceAssessmentsImpl(clientObject.getRegulatoryComplianceAssessments(), this); + this.regulatoryComplianceAssessments + = new RegulatoryComplianceAssessmentsImpl(clientObject.getRegulatoryComplianceAssessments(), this); } return regulatoryComplianceAssessments; } /** * Gets the resource collection API of SubAssessments. - * + * * @return Resource collection API of SubAssessments. */ public SubAssessments subAssessments() { @@ -790,484 +682,727 @@ public SubAssessments subAssessments() { } /** - * Gets the resource collection API of Automations. It manages Automation. - * - * @return Resource collection API of Automations. + * Gets the resource collection API of Connectors. It manages ConnectorSetting. + * + * @return Resource collection API of Connectors. */ - public Automations automations() { - if (this.automations == null) { - this.automations = new AutomationsImpl(clientObject.getAutomations(), this); + public Connectors connectors() { + if (this.connectors == null) { + this.connectors = new ConnectorsImpl(clientObject.getConnectors(), this); } - return automations; + return connectors; } /** - * Gets the resource collection API of AlertsSuppressionRules. - * - * @return Resource collection API of AlertsSuppressionRules. + * Gets the resource collection API of SecurityContacts. It manages SecurityContact. + * + * @return Resource collection API of SecurityContacts. */ - public AlertsSuppressionRules alertsSuppressionRules() { - if (this.alertsSuppressionRules == null) { - this.alertsSuppressionRules = - new AlertsSuppressionRulesImpl(clientObject.getAlertsSuppressionRules(), this); + public SecurityContacts securityContacts() { + if (this.securityContacts == null) { + this.securityContacts = new SecurityContactsImpl(clientObject.getSecurityContacts(), this); } - return alertsSuppressionRules; + return securityContacts; } /** - * Gets the resource collection API of ServerVulnerabilityAssessments. - * - * @return Resource collection API of ServerVulnerabilityAssessments. + * Gets the resource collection API of SoftwareInventories. + * + * @return Resource collection API of SoftwareInventories. */ - public ServerVulnerabilityAssessments serverVulnerabilityAssessments() { - if (this.serverVulnerabilityAssessments == null) { - this.serverVulnerabilityAssessments = - new ServerVulnerabilityAssessmentsImpl(clientObject.getServerVulnerabilityAssessments(), this); + public SoftwareInventories softwareInventories() { + if (this.softwareInventories == null) { + this.softwareInventories = new SoftwareInventoriesImpl(clientObject.getSoftwareInventories(), this); } - return serverVulnerabilityAssessments; + return softwareInventories; } /** - * Gets the resource collection API of AssessmentsMetadatas. It manages SecurityAssessmentMetadataResponse. - * - * @return Resource collection API of AssessmentsMetadatas. + * Gets the resource collection API of CustomAssessmentAutomations. It manages CustomAssessmentAutomation. + * + * @return Resource collection API of CustomAssessmentAutomations. */ - public AssessmentsMetadatas assessmentsMetadatas() { - if (this.assessmentsMetadatas == null) { - this.assessmentsMetadatas = new AssessmentsMetadatasImpl(clientObject.getAssessmentsMetadatas(), this); + public CustomAssessmentAutomations customAssessmentAutomations() { + if (this.customAssessmentAutomations == null) { + this.customAssessmentAutomations + = new CustomAssessmentAutomationsImpl(clientObject.getCustomAssessmentAutomations(), this); } - return assessmentsMetadatas; + return customAssessmentAutomations; } /** - * Gets the resource collection API of Assessments. It manages SecurityAssessmentResponse. - * - * @return Resource collection API of Assessments. + * Gets the resource collection API of CustomEntityStoreAssignments. It manages CustomEntityStoreAssignment. + * + * @return Resource collection API of CustomEntityStoreAssignments. */ - public Assessments assessments() { - if (this.assessments == null) { - this.assessments = new AssessmentsImpl(clientObject.getAssessments(), this); + public CustomEntityStoreAssignments customEntityStoreAssignments() { + if (this.customEntityStoreAssignments == null) { + this.customEntityStoreAssignments + = new CustomEntityStoreAssignmentsImpl(clientObject.getCustomEntityStoreAssignments(), this); } - return assessments; + return customEntityStoreAssignments; } /** - * Gets the resource collection API of AdaptiveApplicationControls. It manages AdaptiveApplicationControlGroup. - * - * @return Resource collection API of AdaptiveApplicationControls. + * Gets the resource collection API of MdeOnboardings. + * + * @return Resource collection API of MdeOnboardings. */ - public AdaptiveApplicationControls adaptiveApplicationControls() { - if (this.adaptiveApplicationControls == null) { - this.adaptiveApplicationControls = - new AdaptiveApplicationControlsImpl(clientObject.getAdaptiveApplicationControls(), this); + public MdeOnboardings mdeOnboardings() { + if (this.mdeOnboardings == null) { + this.mdeOnboardings = new MdeOnboardingsImpl(clientObject.getMdeOnboardings(), this); } - return adaptiveApplicationControls; + return mdeOnboardings; } /** - * Gets the resource collection API of AdaptiveNetworkHardenings. - * - * @return Resource collection API of AdaptiveNetworkHardenings. + * Gets the resource collection API of GovernanceAssignments. It manages GovernanceAssignment. + * + * @return Resource collection API of GovernanceAssignments. */ - public AdaptiveNetworkHardenings adaptiveNetworkHardenings() { - if (this.adaptiveNetworkHardenings == null) { - this.adaptiveNetworkHardenings = - new AdaptiveNetworkHardeningsImpl(clientObject.getAdaptiveNetworkHardenings(), this); + public GovernanceAssignments governanceAssignments() { + if (this.governanceAssignments == null) { + this.governanceAssignments = new GovernanceAssignmentsImpl(clientObject.getGovernanceAssignments(), this); } - return adaptiveNetworkHardenings; + return governanceAssignments; } /** - * Gets the resource collection API of AllowedConnections. - * - * @return Resource collection API of AllowedConnections. + * Gets the resource collection API of GovernanceRules. It manages GovernanceRule. + * + * @return Resource collection API of GovernanceRules. */ - public AllowedConnections allowedConnections() { - if (this.allowedConnections == null) { - this.allowedConnections = new AllowedConnectionsImpl(clientObject.getAllowedConnections(), this); + public GovernanceRules governanceRules() { + if (this.governanceRules == null) { + this.governanceRules = new GovernanceRulesImpl(clientObject.getGovernanceRules(), this); } - return allowedConnections; + return governanceRules; } /** - * Gets the resource collection API of Topologies. - * - * @return Resource collection API of Topologies. + * Gets the resource collection API of Applications. + * + * @return Resource collection API of Applications. */ - public Topologies topologies() { - if (this.topologies == null) { - this.topologies = new TopologiesImpl(clientObject.getTopologies(), this); + public Applications applications() { + if (this.applications == null) { + this.applications = new ApplicationsImpl(clientObject.getApplications(), this); } - return topologies; + return applications; } /** - * Gets the resource collection API of JitNetworkAccessPolicies. It manages JitNetworkAccessPolicy. - * - * @return Resource collection API of JitNetworkAccessPolicies. + * Gets the resource collection API of ApplicationOperations. It manages Application. + * + * @return Resource collection API of ApplicationOperations. */ - public JitNetworkAccessPolicies jitNetworkAccessPolicies() { - if (this.jitNetworkAccessPolicies == null) { - this.jitNetworkAccessPolicies = - new JitNetworkAccessPoliciesImpl(clientObject.getJitNetworkAccessPolicies(), this); + public ApplicationOperations applicationOperations() { + if (this.applicationOperations == null) { + this.applicationOperations = new ApplicationOperationsImpl(clientObject.getApplicationOperations(), this); } - return jitNetworkAccessPolicies; + return applicationOperations; } /** - * Gets the resource collection API of DiscoveredSecuritySolutions. - * - * @return Resource collection API of DiscoveredSecuritySolutions. + * Gets the resource collection API of SecurityConnectorApplications. + * + * @return Resource collection API of SecurityConnectorApplications. */ - public DiscoveredSecuritySolutions discoveredSecuritySolutions() { - if (this.discoveredSecuritySolutions == null) { - this.discoveredSecuritySolutions = - new DiscoveredSecuritySolutionsImpl(clientObject.getDiscoveredSecuritySolutions(), this); + public SecurityConnectorApplications securityConnectorApplications() { + if (this.securityConnectorApplications == null) { + this.securityConnectorApplications + = new SecurityConnectorApplicationsImpl(clientObject.getSecurityConnectorApplications(), this); } - return discoveredSecuritySolutions; + return securityConnectorApplications; } /** - * Gets the resource collection API of SecuritySolutionsReferenceDatas. - * - * @return Resource collection API of SecuritySolutionsReferenceDatas. + * Gets the resource collection API of SecurityConnectorApplicationOperations. + * + * @return Resource collection API of SecurityConnectorApplicationOperations. */ - public SecuritySolutionsReferenceDatas securitySolutionsReferenceDatas() { - if (this.securitySolutionsReferenceDatas == null) { - this.securitySolutionsReferenceDatas = - new SecuritySolutionsReferenceDatasImpl(clientObject.getSecuritySolutionsReferenceDatas(), this); + public SecurityConnectorApplicationOperations securityConnectorApplicationOperations() { + if (this.securityConnectorApplicationOperations == null) { + this.securityConnectorApplicationOperations = new SecurityConnectorApplicationOperationsImpl( + clientObject.getSecurityConnectorApplicationOperations(), this); } - return securitySolutionsReferenceDatas; + return securityConnectorApplicationOperations; } /** - * Gets the resource collection API of ExternalSecuritySolutions. - * - * @return Resource collection API of ExternalSecuritySolutions. + * Gets the resource collection API of DefenderForStorages. It manages DefenderForStorageSetting. + * + * @return Resource collection API of DefenderForStorages. */ - public ExternalSecuritySolutions externalSecuritySolutions() { - if (this.externalSecuritySolutions == null) { - this.externalSecuritySolutions = - new ExternalSecuritySolutionsImpl(clientObject.getExternalSecuritySolutions(), this); + public DefenderForStorages defenderForStorages() { + if (this.defenderForStorages == null) { + this.defenderForStorages = new DefenderForStoragesImpl(clientObject.getDefenderForStorages(), this); } - return externalSecuritySolutions; + return defenderForStorages; } /** - * Gets the resource collection API of SecureScores. - * - * @return Resource collection API of SecureScores. + * Gets the resource collection API of SecurityOperators. + * + * @return Resource collection API of SecurityOperators. */ - public SecureScores secureScores() { - if (this.secureScores == null) { - this.secureScores = new SecureScoresImpl(clientObject.getSecureScores(), this); + public SecurityOperators securityOperators() { + if (this.securityOperators == null) { + this.securityOperators = new SecurityOperatorsImpl(clientObject.getSecurityOperators(), this); } - return secureScores; + return securityOperators; } /** - * Gets the resource collection API of SecureScoreControls. - * - * @return Resource collection API of SecureScoreControls. + * Gets the resource collection API of SqlVulnerabilityAssessmentBaselineRules. It manages RuleResults. + * + * @return Resource collection API of SqlVulnerabilityAssessmentBaselineRules. */ - public SecureScoreControls secureScoreControls() { - if (this.secureScoreControls == null) { - this.secureScoreControls = new SecureScoreControlsImpl(clientObject.getSecureScoreControls(), this); + public SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules() { + if (this.sqlVulnerabilityAssessmentBaselineRules == null) { + this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesImpl( + clientObject.getSqlVulnerabilityAssessmentBaselineRules(), this); } - return secureScoreControls; + return sqlVulnerabilityAssessmentBaselineRules; } /** - * Gets the resource collection API of SecureScoreControlDefinitions. - * - * @return Resource collection API of SecureScoreControlDefinitions. + * Gets the resource collection API of SqlVulnerabilityAssessmentScans. + * + * @return Resource collection API of SqlVulnerabilityAssessmentScans. */ - public SecureScoreControlDefinitions secureScoreControlDefinitions() { - if (this.secureScoreControlDefinitions == null) { - this.secureScoreControlDefinitions = - new SecureScoreControlDefinitionsImpl(clientObject.getSecureScoreControlDefinitions(), this); + public SqlVulnerabilityAssessmentScans sqlVulnerabilityAssessmentScans() { + if (this.sqlVulnerabilityAssessmentScans == null) { + this.sqlVulnerabilityAssessmentScans + = new SqlVulnerabilityAssessmentScansImpl(clientObject.getSqlVulnerabilityAssessmentScans(), this); } - return secureScoreControlDefinitions; + return sqlVulnerabilityAssessmentScans; } /** - * Gets the resource collection API of SecuritySolutions. - * - * @return Resource collection API of SecuritySolutions. + * Gets the resource collection API of SqlVulnerabilityAssessmentScanResults. + * + * @return Resource collection API of SqlVulnerabilityAssessmentScanResults. */ - public SecuritySolutions securitySolutions() { - if (this.securitySolutions == null) { - this.securitySolutions = new SecuritySolutionsImpl(clientObject.getSecuritySolutions(), this); + public SqlVulnerabilityAssessmentScanResults sqlVulnerabilityAssessmentScanResults() { + if (this.sqlVulnerabilityAssessmentScanResults == null) { + this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsImpl( + clientObject.getSqlVulnerabilityAssessmentScanResults(), this); } - return securitySolutions; + return sqlVulnerabilityAssessmentScanResults; } /** - * Gets the resource collection API of Connectors. It manages ConnectorSetting. - * - * @return Resource collection API of Connectors. + * Gets the resource collection API of ResourceProviders. + * + * @return Resource collection API of ResourceProviders. */ - public Connectors connectors() { - if (this.connectors == null) { - this.connectors = new ConnectorsImpl(clientObject.getConnectors(), this); + public ResourceProviders resourceProviders() { + if (this.resourceProviders == null) { + this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); } - return connectors; + return resourceProviders; } /** - * Gets the resource collection API of Alerts. - * - * @return Resource collection API of Alerts. + * Gets the resource collection API of SensitivitySettings. + * + * @return Resource collection API of SensitivitySettings. */ - public Alerts alerts() { - if (this.alerts == null) { - this.alerts = new AlertsImpl(clientObject.getAlerts(), this); + public SensitivitySettings sensitivitySettings() { + if (this.sensitivitySettings == null) { + this.sensitivitySettings = new SensitivitySettingsImpl(clientObject.getSensitivitySettings(), this); } - return alerts; + return sensitivitySettings; } /** - * Gets the resource collection API of Settings. - * - * @return Resource collection API of Settings. + * Gets the resource collection API of HealthReports. + * + * @return Resource collection API of HealthReports. */ - public Settings settings() { - if (this.settings == null) { - this.settings = new SettingsImpl(clientObject.getSettings(), this); + public HealthReports healthReports() { + if (this.healthReports == null) { + this.healthReports = new HealthReportsImpl(clientObject.getHealthReports(), this); } - return settings; + return healthReports; } /** - * Gets the resource collection API of IngestionSettings. It manages IngestionSetting. - * - * @return Resource collection API of IngestionSettings. + * Gets the resource collection API of AzureDevOpsOrgs. It manages AzureDevOpsOrg. + * + * @return Resource collection API of AzureDevOpsOrgs. */ - public IngestionSettings ingestionSettings() { - if (this.ingestionSettings == null) { - this.ingestionSettings = new IngestionSettingsImpl(clientObject.getIngestionSettings(), this); + public AzureDevOpsOrgs azureDevOpsOrgs() { + if (this.azureDevOpsOrgs == null) { + this.azureDevOpsOrgs = new AzureDevOpsOrgsImpl(clientObject.getAzureDevOpsOrgs(), this); } - return ingestionSettings; + return azureDevOpsOrgs; } /** - * Gets the resource collection API of SoftwareInventories. - * - * @return Resource collection API of SoftwareInventories. + * Gets the resource collection API of AzureDevOpsProjects. It manages AzureDevOpsProject. + * + * @return Resource collection API of AzureDevOpsProjects. */ - public SoftwareInventories softwareInventories() { - if (this.softwareInventories == null) { - this.softwareInventories = new SoftwareInventoriesImpl(clientObject.getSoftwareInventories(), this); + public AzureDevOpsProjects azureDevOpsProjects() { + if (this.azureDevOpsProjects == null) { + this.azureDevOpsProjects = new AzureDevOpsProjectsImpl(clientObject.getAzureDevOpsProjects(), this); } - return softwareInventories; + return azureDevOpsProjects; } /** - * Gets the resource collection API of GovernanceRules. It manages GovernanceRule. - * - * @return Resource collection API of GovernanceRules. + * Gets the resource collection API of AzureDevOpsRepos. It manages AzureDevOpsRepository. + * + * @return Resource collection API of AzureDevOpsRepos. */ - public GovernanceRules governanceRules() { - if (this.governanceRules == null) { - this.governanceRules = new GovernanceRulesImpl(clientObject.getGovernanceRules(), this); + public AzureDevOpsRepos azureDevOpsRepos() { + if (this.azureDevOpsRepos == null) { + this.azureDevOpsRepos = new AzureDevOpsReposImpl(clientObject.getAzureDevOpsRepos(), this); } - return governanceRules; + return azureDevOpsRepos; } /** - * Gets the resource collection API of GovernanceAssignments. It manages GovernanceAssignment. - * - * @return Resource collection API of GovernanceAssignments. + * Gets the resource collection API of DevOpsConfigurations. + * + * @return Resource collection API of DevOpsConfigurations. */ - public GovernanceAssignments governanceAssignments() { - if (this.governanceAssignments == null) { - this.governanceAssignments = new GovernanceAssignmentsImpl(clientObject.getGovernanceAssignments(), this); + public DevOpsConfigurations devOpsConfigurations() { + if (this.devOpsConfigurations == null) { + this.devOpsConfigurations = new DevOpsConfigurationsImpl(clientObject.getDevOpsConfigurations(), this); } - return governanceAssignments; + return devOpsConfigurations; } /** - * Gets the resource collection API of Applications. - * - * @return Resource collection API of Applications. + * Gets the resource collection API of GitHubOwners. + * + * @return Resource collection API of GitHubOwners. */ - public Applications applications() { - if (this.applications == null) { - this.applications = new ApplicationsImpl(clientObject.getApplications(), this); + public GitHubOwners gitHubOwners() { + if (this.gitHubOwners == null) { + this.gitHubOwners = new GitHubOwnersImpl(clientObject.getGitHubOwners(), this); } - return applications; + return gitHubOwners; } /** - * Gets the resource collection API of ApplicationOperations. It manages Application. - * - * @return Resource collection API of ApplicationOperations. + * Gets the resource collection API of GitHubRepos. + * + * @return Resource collection API of GitHubRepos. */ - public ApplicationOperations applicationOperations() { - if (this.applicationOperations == null) { - this.applicationOperations = new ApplicationOperationsImpl(clientObject.getApplicationOperations(), this); + public GitHubRepos gitHubRepos() { + if (this.gitHubRepos == null) { + this.gitHubRepos = new GitHubReposImpl(clientObject.getGitHubRepos(), this); } - return applicationOperations; + return gitHubRepos; } /** - * Gets the resource collection API of SecurityConnectorApplications. - * - * @return Resource collection API of SecurityConnectorApplications. + * Gets the resource collection API of GitLabGroups. + * + * @return Resource collection API of GitLabGroups. */ - public SecurityConnectorApplications securityConnectorApplications() { - if (this.securityConnectorApplications == null) { - this.securityConnectorApplications = - new SecurityConnectorApplicationsImpl(clientObject.getSecurityConnectorApplications(), this); + public GitLabGroups gitLabGroups() { + if (this.gitLabGroups == null) { + this.gitLabGroups = new GitLabGroupsImpl(clientObject.getGitLabGroups(), this); } - return securityConnectorApplications; + return gitLabGroups; } /** - * Gets the resource collection API of SecurityConnectorApplicationOperations. - * - * @return Resource collection API of SecurityConnectorApplicationOperations. + * Gets the resource collection API of GitLabSubgroups. + * + * @return Resource collection API of GitLabSubgroups. */ - public SecurityConnectorApplicationOperations securityConnectorApplicationOperations() { - if (this.securityConnectorApplicationOperations == null) { - this.securityConnectorApplicationOperations = - new SecurityConnectorApplicationOperationsImpl( - clientObject.getSecurityConnectorApplicationOperations(), this); + public GitLabSubgroups gitLabSubgroups() { + if (this.gitLabSubgroups == null) { + this.gitLabSubgroups = new GitLabSubgroupsImpl(clientObject.getGitLabSubgroups(), this); } - return securityConnectorApplicationOperations; + return gitLabSubgroups; } /** - * Gets the resource collection API of ApiCollections. - * - * @return Resource collection API of ApiCollections. + * Gets the resource collection API of GitLabProjects. + * + * @return Resource collection API of GitLabProjects. */ - public ApiCollections apiCollections() { - if (this.apiCollections == null) { - this.apiCollections = new ApiCollectionsImpl(clientObject.getApiCollections(), this); + public GitLabProjects gitLabProjects() { + if (this.gitLabProjects == null) { + this.gitLabProjects = new GitLabProjectsImpl(clientObject.getGitLabProjects(), this); } - return apiCollections; + return gitLabProjects; } /** - * Gets the resource collection API of ApiCollectionOnboardings. - * - * @return Resource collection API of ApiCollectionOnboardings. + * Gets the resource collection API of DevOpsOperationResults. + * + * @return Resource collection API of DevOpsOperationResults. */ - public ApiCollectionOnboardings apiCollectionOnboardings() { - if (this.apiCollectionOnboardings == null) { - this.apiCollectionOnboardings = - new ApiCollectionOnboardingsImpl(clientObject.getApiCollectionOnboardings(), this); + public DevOpsOperationResults devOpsOperationResults() { + if (this.devOpsOperationResults == null) { + this.devOpsOperationResults + = new DevOpsOperationResultsImpl(clientObject.getDevOpsOperationResults(), this); } - return apiCollectionOnboardings; + return devOpsOperationResults; } /** - * Gets the resource collection API of ApiCollectionOffboardings. - * - * @return Resource collection API of ApiCollectionOffboardings. + * Gets the resource collection API of SecurityConnectors. It manages SecurityConnector. + * + * @return Resource collection API of SecurityConnectors. */ - public ApiCollectionOffboardings apiCollectionOffboardings() { - if (this.apiCollectionOffboardings == null) { - this.apiCollectionOffboardings = - new ApiCollectionOffboardingsImpl(clientObject.getApiCollectionOffboardings(), this); + public SecurityConnectors securityConnectors() { + if (this.securityConnectors == null) { + this.securityConnectors = new SecurityConnectorsImpl(clientObject.getSecurityConnectors(), this); } - return apiCollectionOffboardings; + return securityConnectors; } /** - * Gets the resource collection API of HealthReports. - * - * @return Resource collection API of HealthReports. + * Gets the resource collection API of ComplianceResults. + * + * @return Resource collection API of ComplianceResults. */ - public HealthReports healthReports() { - if (this.healthReports == null) { - this.healthReports = new HealthReportsImpl(clientObject.getHealthReports(), this); + public ComplianceResults complianceResults() { + if (this.complianceResults == null) { + this.complianceResults = new ComplianceResultsImpl(clientObject.getComplianceResults(), this); } - return healthReports; + return complianceResults; } /** - * Gets the resource collection API of HealthReportOperations. - * - * @return Resource collection API of HealthReportOperations. + * Gets the resource collection API of AdvancedThreatProtections. It manages AdvancedThreatProtectionSetting. + * + * @return Resource collection API of AdvancedThreatProtections. */ - public HealthReportOperations healthReportOperations() { - if (this.healthReportOperations == null) { - this.healthReportOperations = - new HealthReportOperationsImpl(clientObject.getHealthReportOperations(), this); + public AdvancedThreatProtections advancedThreatProtections() { + if (this.advancedThreatProtections == null) { + this.advancedThreatProtections + = new AdvancedThreatProtectionsImpl(clientObject.getAdvancedThreatProtections(), this); } - return healthReportOperations; + return advancedThreatProtections; } /** - * Gets the resource collection API of SqlVulnerabilityAssessmentScans. - * - * @return Resource collection API of SqlVulnerabilityAssessmentScans. + * Gets the resource collection API of DeviceSecurityGroups. It manages DeviceSecurityGroup. + * + * @return Resource collection API of DeviceSecurityGroups. */ - public SqlVulnerabilityAssessmentScans sqlVulnerabilityAssessmentScans() { - if (this.sqlVulnerabilityAssessmentScans == null) { - this.sqlVulnerabilityAssessmentScans = - new SqlVulnerabilityAssessmentScansImpl(clientObject.getSqlVulnerabilityAssessmentScans(), this); + public DeviceSecurityGroups deviceSecurityGroups() { + if (this.deviceSecurityGroups == null) { + this.deviceSecurityGroups = new DeviceSecurityGroupsImpl(clientObject.getDeviceSecurityGroups(), this); } - return sqlVulnerabilityAssessmentScans; + return deviceSecurityGroups; } /** - * Gets the resource collection API of SqlVulnerabilityAssessmentScanResults. - * - * @return Resource collection API of SqlVulnerabilityAssessmentScanResults. + * Gets the resource collection API of IotSecuritySolutionAnalytics. + * + * @return Resource collection API of IotSecuritySolutionAnalytics. */ - public SqlVulnerabilityAssessmentScanResults sqlVulnerabilityAssessmentScanResults() { - if (this.sqlVulnerabilityAssessmentScanResults == null) { - this.sqlVulnerabilityAssessmentScanResults = - new SqlVulnerabilityAssessmentScanResultsImpl( - clientObject.getSqlVulnerabilityAssessmentScanResults(), this); + public IotSecuritySolutionAnalytics iotSecuritySolutionAnalytics() { + if (this.iotSecuritySolutionAnalytics == null) { + this.iotSecuritySolutionAnalytics + = new IotSecuritySolutionAnalyticsImpl(clientObject.getIotSecuritySolutionAnalytics(), this); } - return sqlVulnerabilityAssessmentScanResults; + return iotSecuritySolutionAnalytics; } /** - * Gets the resource collection API of SqlVulnerabilityAssessmentBaselineRules. It manages RuleResults. - * - * @return Resource collection API of SqlVulnerabilityAssessmentBaselineRules. + * Gets the resource collection API of IotSecuritySolutionsAnalyticsAggregatedAlerts. + * + * @return Resource collection API of IotSecuritySolutionsAnalyticsAggregatedAlerts. */ - public SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules() { - if (this.sqlVulnerabilityAssessmentBaselineRules == null) { - this.sqlVulnerabilityAssessmentBaselineRules = - new SqlVulnerabilityAssessmentBaselineRulesImpl( - clientObject.getSqlVulnerabilityAssessmentBaselineRules(), this); + public IotSecuritySolutionsAnalyticsAggregatedAlerts iotSecuritySolutionsAnalyticsAggregatedAlerts() { + if (this.iotSecuritySolutionsAnalyticsAggregatedAlerts == null) { + this.iotSecuritySolutionsAnalyticsAggregatedAlerts = new IotSecuritySolutionsAnalyticsAggregatedAlertsImpl( + clientObject.getIotSecuritySolutionsAnalyticsAggregatedAlerts(), this); } - return sqlVulnerabilityAssessmentBaselineRules; + return iotSecuritySolutionsAnalyticsAggregatedAlerts; } /** - * Gets the resource collection API of SecurityConnectors. It manages SecurityConnector. - * - * @return Resource collection API of SecurityConnectors. + * Gets the resource collection API of IotSecuritySolutionsAnalyticsRecommendations. + * + * @return Resource collection API of IotSecuritySolutionsAnalyticsRecommendations. */ - public SecurityConnectors securityConnectors() { - if (this.securityConnectors == null) { - this.securityConnectors = new SecurityConnectorsImpl(clientObject.getSecurityConnectors(), this); + public IotSecuritySolutionsAnalyticsRecommendations iotSecuritySolutionsAnalyticsRecommendations() { + if (this.iotSecuritySolutionsAnalyticsRecommendations == null) { + this.iotSecuritySolutionsAnalyticsRecommendations = new IotSecuritySolutionsAnalyticsRecommendationsImpl( + clientObject.getIotSecuritySolutionsAnalyticsRecommendations(), this); } - return securityConnectors; + return iotSecuritySolutionsAnalyticsRecommendations; } /** - * Gets the resource collection API of SecurityOperators. - * - * @return Resource collection API of SecurityOperators. + * Gets the resource collection API of IotSecuritySolutions. It manages IoTSecuritySolutionModel. + * + * @return Resource collection API of IotSecuritySolutions. */ - public SecurityOperators securityOperators() { - if (this.securityOperators == null) { - this.securityOperators = new SecurityOperatorsImpl(clientObject.getSecurityOperators(), this); + public IotSecuritySolutions iotSecuritySolutions() { + if (this.iotSecuritySolutions == null) { + this.iotSecuritySolutions = new IotSecuritySolutionsImpl(clientObject.getIotSecuritySolutions(), this); } - return securityOperators; + return iotSecuritySolutions; + } + + /** + * Gets the resource collection API of AdaptiveNetworkHardenings. + * + * @return Resource collection API of AdaptiveNetworkHardenings. + */ + public AdaptiveNetworkHardenings adaptiveNetworkHardenings() { + if (this.adaptiveNetworkHardenings == null) { + this.adaptiveNetworkHardenings + = new AdaptiveNetworkHardeningsImpl(clientObject.getAdaptiveNetworkHardenings(), this); + } + return adaptiveNetworkHardenings; + } + + /** + * Gets the resource collection API of AllowedConnections. + * + * @return Resource collection API of AllowedConnections. + */ + public AllowedConnections allowedConnections() { + if (this.allowedConnections == null) { + this.allowedConnections = new AllowedConnectionsImpl(clientObject.getAllowedConnections(), this); + } + return allowedConnections; + } + + /** + * Gets the resource collection API of AdaptiveApplicationControls. It manages AdaptiveApplicationControlGroup. + * + * @return Resource collection API of AdaptiveApplicationControls. + */ + public AdaptiveApplicationControls adaptiveApplicationControls() { + if (this.adaptiveApplicationControls == null) { + this.adaptiveApplicationControls + = new AdaptiveApplicationControlsImpl(clientObject.getAdaptiveApplicationControls(), this); + } + return adaptiveApplicationControls; + } + + /** + * Gets the resource collection API of DiscoveredSecuritySolutions. + * + * @return Resource collection API of DiscoveredSecuritySolutions. + */ + public DiscoveredSecuritySolutions discoveredSecuritySolutions() { + if (this.discoveredSecuritySolutions == null) { + this.discoveredSecuritySolutions + = new DiscoveredSecuritySolutionsImpl(clientObject.getDiscoveredSecuritySolutions(), this); + } + return discoveredSecuritySolutions; + } + + /** + * Gets the resource collection API of ExternalSecuritySolutions. + * + * @return Resource collection API of ExternalSecuritySolutions. + */ + public ExternalSecuritySolutions externalSecuritySolutions() { + if (this.externalSecuritySolutions == null) { + this.externalSecuritySolutions + = new ExternalSecuritySolutionsImpl(clientObject.getExternalSecuritySolutions(), this); + } + return externalSecuritySolutions; + } + + /** + * Gets the resource collection API of JitNetworkAccessPolicies. It manages JitNetworkAccessPolicy. + * + * @return Resource collection API of JitNetworkAccessPolicies. + */ + public JitNetworkAccessPolicies jitNetworkAccessPolicies() { + if (this.jitNetworkAccessPolicies == null) { + this.jitNetworkAccessPolicies + = new JitNetworkAccessPoliciesImpl(clientObject.getJitNetworkAccessPolicies(), this); + } + return jitNetworkAccessPolicies; + } + + /** + * Gets the resource collection API of SecureScores. + * + * @return Resource collection API of SecureScores. + */ + public SecureScores secureScores() { + if (this.secureScores == null) { + this.secureScores = new SecureScoresImpl(clientObject.getSecureScores(), this); + } + return secureScores; + } + + /** + * Gets the resource collection API of SecureScoreControls. + * + * @return Resource collection API of SecureScoreControls. + */ + public SecureScoreControls secureScoreControls() { + if (this.secureScoreControls == null) { + this.secureScoreControls = new SecureScoreControlsImpl(clientObject.getSecureScoreControls(), this); + } + return secureScoreControls; + } + + /** + * Gets the resource collection API of SecureScoreControlDefinitions. + * + * @return Resource collection API of SecureScoreControlDefinitions. + */ + public SecureScoreControlDefinitions secureScoreControlDefinitions() { + if (this.secureScoreControlDefinitions == null) { + this.secureScoreControlDefinitions + = new SecureScoreControlDefinitionsImpl(clientObject.getSecureScoreControlDefinitions(), this); + } + return secureScoreControlDefinitions; + } + + /** + * Gets the resource collection API of SecuritySolutions. + * + * @return Resource collection API of SecuritySolutions. + */ + public SecuritySolutions securitySolutions() { + if (this.securitySolutions == null) { + this.securitySolutions = new SecuritySolutionsImpl(clientObject.getSecuritySolutions(), this); + } + return securitySolutions; + } + + /** + * Gets the resource collection API of SecuritySolutionsReferenceDatas. + * + * @return Resource collection API of SecuritySolutionsReferenceDatas. + */ + public SecuritySolutionsReferenceDatas securitySolutionsReferenceDatas() { + if (this.securitySolutionsReferenceDatas == null) { + this.securitySolutionsReferenceDatas + = new SecuritySolutionsReferenceDatasImpl(clientObject.getSecuritySolutionsReferenceDatas(), this); + } + return securitySolutionsReferenceDatas; + } + + /** + * Gets the resource collection API of ServerVulnerabilityAssessments. + * + * @return Resource collection API of ServerVulnerabilityAssessments. + */ + public ServerVulnerabilityAssessments serverVulnerabilityAssessments() { + if (this.serverVulnerabilityAssessments == null) { + this.serverVulnerabilityAssessments + = new ServerVulnerabilityAssessmentsImpl(clientObject.getServerVulnerabilityAssessments(), this); + } + return serverVulnerabilityAssessments; + } + + /** + * Gets the resource collection API of Topologies. + * + * @return Resource collection API of Topologies. + */ + public Topologies topologies() { + if (this.topologies == null) { + this.topologies = new TopologiesImpl(clientObject.getTopologies(), this); + } + return topologies; + } + + /** + * Gets the resource collection API of AssessmentsMetadatas. It manages SecurityAssessmentMetadataResponse. + * + * @return Resource collection API of AssessmentsMetadatas. + */ + public AssessmentsMetadatas assessmentsMetadatas() { + if (this.assessmentsMetadatas == null) { + this.assessmentsMetadatas = new AssessmentsMetadatasImpl(clientObject.getAssessmentsMetadatas(), this); + } + return assessmentsMetadatas; + } + + /** + * Gets the resource collection API of Assessments. It manages SecurityAssessmentResponse. + * + * @return Resource collection API of Assessments. + */ + public Assessments assessments() { + if (this.assessments == null) { + this.assessments = new AssessmentsImpl(clientObject.getAssessments(), this); + } + return assessments; + } + + /** + * Gets the resource collection API of Alerts. + * + * @return Resource collection API of Alerts. + */ + public Alerts alerts() { + if (this.alerts == null) { + this.alerts = new AlertsImpl(clientObject.getAlerts(), this); + } + return alerts; + } + + /** + * Gets the resource collection API of Settings. + * + * @return Resource collection API of Settings. + */ + public Settings settings() { + if (this.settings == null) { + this.settings = new SettingsImpl(clientObject.getSettings(), this); + } + return settings; + } + + /** + * Gets the resource collection API of ServerVulnerabilityAssessmentsSettings. + * + * @return Resource collection API of ServerVulnerabilityAssessmentsSettings. + */ + public ServerVulnerabilityAssessmentsSettings serverVulnerabilityAssessmentsSettings() { + if (this.serverVulnerabilityAssessmentsSettings == null) { + this.serverVulnerabilityAssessmentsSettings = new ServerVulnerabilityAssessmentsSettingsImpl( + clientObject.getServerVulnerabilityAssessmentsSettings(), this); + } + return serverVulnerabilityAssessmentsSettings; + } + + /** + * Gets the resource collection API of ApiCollections. + * + * @return Resource collection API of ApiCollections. + */ + public ApiCollections apiCollections() { + if (this.apiCollections == null) { + this.apiCollections = new ApiCollectionsImpl(clientObject.getApiCollections(), this); + } + return apiCollections; + } + + /** + * Gets the resource collection API of Pricings. + * + * @return Resource collection API of Pricings. + */ + public Pricings pricings() { + if (this.pricings == null) { + this.pricings = new PricingsImpl(clientObject.getPricings(), this); + } + return pricings; } /** - * @return Wrapped service client SecurityCenter providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client SecurityCenter providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client SecurityCenter. */ public SecurityCenter serviceClient() { return this.clientObject; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveApplicationControlsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveApplicationControlsClient.java index 26e579af6d38..413920bdc12c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveApplicationControlsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveApplicationControlsClient.java @@ -11,11 +11,13 @@ import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupInner; import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupsInner; -/** An instance of this class provides access to all the operations defined in AdaptiveApplicationControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in AdaptiveApplicationControlsClient. + */ public interface AdaptiveApplicationControlsClient { /** * Gets a list of application control machine groups for the subscription. - * + * * @param includePathRecommendations Include the policy rules. * @param summary Return output in a summarized form. * @param context The context to associate with this operation. @@ -25,12 +27,12 @@ public interface AdaptiveApplicationControlsClient { * @return a list of application control machine groups for the subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - Boolean includePathRecommendations, Boolean summary, Context context); + Response listWithResponse(Boolean includePathRecommendations, + Boolean summary, Context context); /** * Gets a list of application control machine groups for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of application control machine groups for the subscription. @@ -40,9 +42,9 @@ Response listWithResponse( /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -51,14 +53,14 @@ Response listWithResponse( * @return an application control VM/server group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String ascLocation, String groupName, Context context); + Response getWithResponse(String ascLocation, String groupName, + Context context); /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -70,9 +72,9 @@ Response getWithResponse( /** * Update an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param body The body parameter. * @param context The context to associate with this operation. @@ -82,14 +84,14 @@ Response getWithResponse( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse( - String ascLocation, String groupName, AdaptiveApplicationControlGroupInner body, Context context); + Response putWithResponse(String ascLocation, String groupName, + AdaptiveApplicationControlGroupInner body, Context context); /** * Update an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,14 +100,14 @@ Response putWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdaptiveApplicationControlGroupInner put( - String ascLocation, String groupName, AdaptiveApplicationControlGroupInner body); + AdaptiveApplicationControlGroupInner put(String ascLocation, String groupName, + AdaptiveApplicationControlGroupInner body); /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,9 +120,9 @@ AdaptiveApplicationControlGroupInner put( /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveNetworkHardeningsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveNetworkHardeningsClient.java index 9a39539b447e..a9d60aff4c1c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveNetworkHardeningsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveNetworkHardeningsClient.java @@ -14,13 +14,15 @@ import com.azure.resourcemanager.security.fluent.models.AdaptiveNetworkHardeningInner; import com.azure.resourcemanager.security.models.AdaptiveNetworkHardeningEnforceRequest; -/** An instance of this class provides access to all the operations defined in AdaptiveNetworkHardeningsClient. */ +/** + * An instance of this class provides access to all the operations defined in AdaptiveNetworkHardeningsClient. + */ public interface AdaptiveNetworkHardeningsClient { /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -28,17 +30,17 @@ public interface AdaptiveNetworkHardeningsClient { * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName); + PagedIterable listByExtendedResource(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName); /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -47,17 +49,17 @@ PagedIterable listByExtendedResource( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + PagedIterable listByExtendedResource(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context); /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -69,19 +71,14 @@ PagedIterable listByExtendedResource( * @return a single Adaptive Network Hardening resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - Context context); + Response getWithResponse(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, Context context); /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -92,18 +89,14 @@ Response getWithResponse( * @return a single Adaptive Network Hardening resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdaptiveNetworkHardeningInner get( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName); + AdaptiveNetworkHardeningInner get(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String adaptiveNetworkHardeningResourceName); /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -115,19 +108,15 @@ AdaptiveNetworkHardeningInner get( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginEnforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, + SyncPoller, Void> beginEnforce(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body); /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -140,20 +129,15 @@ SyncPoller, Void> beginEnforce( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginEnforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context); + SyncPoller, Void> beginEnforce(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, + AdaptiveNetworkHardeningEnforceRequest body, Context context); /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -164,19 +148,14 @@ SyncPoller, Void> beginEnforce( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body); + void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body); /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -188,12 +167,6 @@ void enforce( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context); + void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body, Context context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdvancedThreatProtectionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdvancedThreatProtectionsClient.java index df0146bcab8f..923759f73f94 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdvancedThreatProtectionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdvancedThreatProtectionsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AdvancedThreatProtectionSettingInner; -/** An instance of this class provides access to all the operations defined in AdvancedThreatProtectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionsClient. + */ public interface AdvancedThreatProtectionsClient { /** * Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,7 +29,7 @@ public interface AdvancedThreatProtectionsClient { /** * Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -39,7 +41,7 @@ public interface AdvancedThreatProtectionsClient { /** * Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param resourceId The identifier of the resource. * @param advancedThreatProtectionSetting Advanced Threat Protection Settings. * @param context The context to associate with this operation. @@ -49,12 +51,12 @@ public interface AdvancedThreatProtectionsClient { * @return the Advanced Threat Protection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceId, AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting, Context context); + Response createWithResponse(String resourceId, + AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting, Context context); /** * Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param resourceId The identifier of the resource. * @param advancedThreatProtectionSetting Advanced Threat Protection Settings. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,6 +65,6 @@ Response createWithResponse( * @return the Advanced Threat Protection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdvancedThreatProtectionSettingInner create( - String resourceId, AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting); + AdvancedThreatProtectionSettingInner create(String resourceId, + AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsClient.java index 6a8b01d63a82..198c8dcd1e90 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.security.fluent.models.AlertInner; import com.azure.resourcemanager.security.models.AlertSimulatorRequestBody; -/** An instance of this class provides access to all the operations defined in AlertsClient. */ +/** + * An instance of this class provides access to all the operations defined in AlertsClient. + */ public interface AlertsClient { /** * List all the alerts that are associated with the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security alerts as paginated response with {@link PagedIterable}. @@ -28,7 +30,7 @@ public interface AlertsClient { /** * List all the alerts that are associated with the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,9 +42,9 @@ public interface AlertsClient { /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -53,9 +55,9 @@ public interface AlertsClient { /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -67,9 +69,9 @@ public interface AlertsClient { /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -80,9 +82,9 @@ public interface AlertsClient { /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -94,11 +96,11 @@ public interface AlertsClient { /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -109,11 +111,11 @@ public interface AlertsClient { /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -121,14 +123,14 @@ public interface AlertsClient { * @return list of security alerts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listResourceGroupLevelByRegion( - String ascLocation, String resourceGroupName, Context context); + PagedIterable listResourceGroupLevelByRegion(String ascLocation, String resourceGroupName, + Context context); /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,9 +143,9 @@ PagedIterable listResourceGroupLevelByRegion( /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -155,30 +157,30 @@ PagedIterable listResourceGroupLevelByRegion( /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an alert that is associated a resource group or a resource in a resource group along with {@link - * Response}. + * @return an alert that is associated a resource group or a resource in a resource group along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getResourceGroupLevelWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response getResourceGroupLevelWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -190,9 +192,9 @@ Response getResourceGroupLevelWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,14 +203,14 @@ Response getResourceGroupLevelWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateSubscriptionLevelStateToDismissWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToDismissWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -219,9 +221,9 @@ Response updateSubscriptionLevelStateToDismissWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -230,14 +232,14 @@ Response updateSubscriptionLevelStateToDismissWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateSubscriptionLevelStateToResolveWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToResolveWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -248,9 +250,9 @@ Response updateSubscriptionLevelStateToResolveWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -259,14 +261,14 @@ Response updateSubscriptionLevelStateToResolveWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateSubscriptionLevelStateToActivateWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToActivateWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -277,9 +279,9 @@ Response updateSubscriptionLevelStateToActivateWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,14 +290,14 @@ Response updateSubscriptionLevelStateToActivateWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateSubscriptionLevelStateToInProgressWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToInProgressWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -306,11 +308,11 @@ Response updateSubscriptionLevelStateToInProgressWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,16 +321,16 @@ Response updateSubscriptionLevelStateToInProgressWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateResourceGroupLevelStateToResolveWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToResolveWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -339,11 +341,11 @@ Response updateResourceGroupLevelStateToResolveWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -352,16 +354,16 @@ Response updateResourceGroupLevelStateToResolveWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateResourceGroupLevelStateToDismissWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToDismissWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -372,11 +374,11 @@ Response updateResourceGroupLevelStateToDismissWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -385,16 +387,16 @@ Response updateResourceGroupLevelStateToDismissWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateResourceGroupLevelStateToActivateWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToActivateWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -405,11 +407,11 @@ Response updateResourceGroupLevelStateToActivateWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -418,16 +420,16 @@ Response updateResourceGroupLevelStateToActivateWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateResourceGroupLevelStateToInProgressWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToInProgressWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -438,9 +440,9 @@ Response updateResourceGroupLevelStateToInProgressWithResponse( /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -448,14 +450,14 @@ Response updateResourceGroupLevelStateToInProgressWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginSimulate( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody); + SyncPoller, Void> beginSimulate(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody); /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,14 +466,14 @@ SyncPoller, Void> beginSimulate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginSimulate( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody, Context context); + SyncPoller, Void> beginSimulate(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody, Context context); /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -482,9 +484,9 @@ SyncPoller, Void> beginSimulate( /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsSuppressionRulesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsSuppressionRulesClient.java index 64f7db01f3ce..4536de8753de 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsSuppressionRulesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AlertsSuppressionRulesClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleInner; -/** An instance of this class provides access to all the operations defined in AlertsSuppressionRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in AlertsSuppressionRulesClient. + */ public interface AlertsSuppressionRulesClient { /** * List of all the dismiss rules for the given subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription as paginated response with {@link PagedIterable}. @@ -25,7 +27,7 @@ public interface AlertsSuppressionRulesClient { /** * List of all the dismiss rules for the given subscription. - * + * * @param alertType Type of the alert to get rules for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,21 +40,21 @@ public interface AlertsSuppressionRulesClient { /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with {@link - * Response}. + * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String alertsSuppressionRuleName, Context context); /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -64,7 +66,7 @@ public interface AlertsSuppressionRulesClient { /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @param context The context to associate with this operation. @@ -74,12 +76,12 @@ public interface AlertsSuppressionRulesClient { * @return describes the suppression rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule, Context context); + Response updateWithResponse(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule, Context context); /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,12 +90,12 @@ Response updateWithResponse( * @return describes the suppression rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertsSuppressionRuleInner update( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule); + AlertsSuppressionRuleInner update(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule); /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -106,7 +108,7 @@ AlertsSuppressionRuleInner update( /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AllowedConnectionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AllowedConnectionsClient.java index 021776947464..2f0fa1c92398 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AllowedConnectionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AllowedConnectionsClient.java @@ -12,57 +12,59 @@ import com.azure.resourcemanager.security.fluent.models.AllowedConnectionsResourceInner; import com.azure.resourcemanager.security.models.ConnectionType; -/** An instance of this class provides access to all the operations defined in AllowedConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in AllowedConnectionsClient. + */ public interface AllowedConnectionsClient { /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedIterable}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedIterable}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation); /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation, Context context); @@ -70,37 +72,37 @@ public interface AllowedConnectionsClient { /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type along with {@link Response}. + * type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String ascLocation, ConnectionType connectionType, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + ConnectionType connectionType, Context context); /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type. + * type. */ @ServiceMethod(returns = ReturnType.SINGLE) AllowedConnectionsResourceInner get(String resourceGroupName, String ascLocation, ConnectionType connectionType); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOffboardingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOffboardingsClient.java deleted file mode 100644 index 01617030ae54..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOffboardingsClient.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** An instance of this class provides access to all the operations defined in ApiCollectionOffboardingsClient. */ -public interface ApiCollectionOffboardingsClient { - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context); - - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serviceName, String apiCollectionId); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOnboardingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOnboardingsClient.java deleted file mode 100644 index 2dd341d3c7e1..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionOnboardingsClient.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; - -/** An instance of this class provides access to all the operations defined in ApiCollectionOnboardingsClient. */ -public interface ApiCollectionOnboardingsClient { - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context); - - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApiCollectionResponseInner create(String resourceGroupName, String serviceName, String apiCollectionId); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionsClient.java index 6eded28ea973..be7da87c723d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApiCollectionsClient.java @@ -8,85 +8,268 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.models.ApiCollectionInner; -/** An instance of this class provides access to all the operations defined in ApiCollectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ApiCollectionsClient. + */ public interface ApiCollectionsClient { /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedIterable}. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serviceName); + PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName); /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedIterable}. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serviceName, Context context); + PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName, + Context context); + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByAzureApiManagementServiceWithResponse(String resourceGroupName, + String serviceName, String apiId, Context context); + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiCollectionInner getByAzureApiManagementService(String resourceGroupName, String serviceName, String apiId); + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ApiCollectionInner> + beginOnboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId); + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ApiCollectionInner> + beginOnboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId, Context context); + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiCollectionInner onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId); + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiCollectionInner onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId, + Context context); /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context); + Response offboardAzureApiManagementApiWithResponse(String resourceGroupName, String serviceName, String apiId, + Context context); /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApiCollectionResponseInner get(String resourceGroupName, String serviceName, String apiCollectionId); + void offboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationOperationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationOperationsClient.java index 1454ded26234..19482d743f36 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationOperationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationOperationsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ApplicationInner; -/** An instance of this class provides access to all the operations defined in ApplicationOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ApplicationOperationsClient. + */ public interface ApplicationOperationsClient { /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,7 +29,7 @@ public interface ApplicationOperationsClient { /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -39,7 +41,7 @@ public interface ApplicationOperationsClient { /** * Creates or update a security application on the given subscription. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @param context The context to associate with this operation. @@ -49,12 +51,12 @@ public interface ApplicationOperationsClient { * @return security Application over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String applicationId, ApplicationInner application, Context context); + Response createOrUpdateWithResponse(String applicationId, ApplicationInner application, + Context context); /** * Creates or update a security application on the given subscription. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,7 +69,7 @@ Response createOrUpdateWithResponse( /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,7 +82,7 @@ Response createOrUpdateWithResponse( /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationsClient.java index 1f8851380eb8..a35f403f9bd8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ApplicationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ApplicationInner; -/** An instance of this class provides access to all the operations defined in ApplicationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ApplicationsClient. + */ public interface ApplicationsClient { /** * Get a list of all relevant applications over a subscription level scope. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedIterable}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Get a list of all relevant applications over a subscription level scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedIterable}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsClient.java index ea903c0cc61a..5c702d11ef8b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsClient.java @@ -13,40 +13,42 @@ import com.azure.resourcemanager.security.models.ExpandEnum; import com.azure.resourcemanager.security.models.SecurityAssessment; -/** An instance of this class provides access to all the operations defined in AssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in AssessmentsClient. + */ public interface AssessmentsClient { /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope); /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope, Context context); /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param expand OData expand. Optional. @@ -57,12 +59,12 @@ public interface AssessmentsClient { * @return a security assessment on your scanned resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceId, String assessmentName, ExpandEnum expand, Context context); + Response getWithResponse(String resourceId, String assessmentName, + ExpandEnum expand, Context context); /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -76,7 +78,7 @@ Response getWithResponse( /** * Create a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param assessment Calculated assessment on a pre-defined assessment metadata. @@ -87,13 +89,13 @@ Response getWithResponse( * @return security assessment on a resource - response format along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceId, String assessmentName, SecurityAssessment assessment, Context context); + Response createOrUpdateWithResponse(String resourceId, String assessmentName, + SecurityAssessment assessment, Context context); /** * Create a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param assessment Calculated assessment on a pre-defined assessment metadata. @@ -103,13 +105,13 @@ Response createOrUpdateWithResponse( * @return security assessment on a resource - response format. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityAssessmentResponseInner createOrUpdate( - String resourceId, String assessmentName, SecurityAssessment assessment); + SecurityAssessmentResponseInner createOrUpdate(String resourceId, String assessmentName, + SecurityAssessment assessment); /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. @@ -124,7 +126,7 @@ SecurityAssessmentResponseInner createOrUpdate( /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsMetadatasClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsMetadatasClient.java index d2d08e0c5684..112d254fa3fb 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsMetadatasClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AssessmentsMetadatasClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecurityAssessmentMetadataResponseInner; -/** An instance of this class provides access to all the operations defined in AssessmentsMetadatasClient. */ +/** + * An instance of this class provides access to all the operations defined in AssessmentsMetadatasClient. + */ public interface AssessmentsMetadatasClient { /** * Get metadata information on all assessment types. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types as paginated response with {@link PagedIterable}. @@ -25,7 +27,7 @@ public interface AssessmentsMetadatasClient { /** * Get metadata information on all assessment types. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,7 +39,7 @@ public interface AssessmentsMetadatasClient { /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,7 +52,7 @@ public interface AssessmentsMetadatasClient { /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -62,31 +64,31 @@ public interface AssessmentsMetadatasClient { /** * Get metadata information on all assessment types in a specific subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedIterable}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySubscription(); /** * Get metadata information on all assessment types in a specific subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedIterable}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySubscription(Context context); /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,12 +97,12 @@ public interface AssessmentsMetadatasClient { * @return metadata information on an assessment type in a specific subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getInSubscriptionWithResponse( - String assessmentMetadataName, Context context); + Response getInSubscriptionWithResponse(String assessmentMetadataName, + Context context); /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,7 +114,7 @@ Response getInSubscriptionWithResponse( /** * Create metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param assessmentMetadata AssessmentMetadata object. * @param context The context to associate with this operation. @@ -122,12 +124,12 @@ Response getInSubscriptionWithResponse( * @return security assessment metadata response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createInSubscriptionWithResponse( - String assessmentMetadataName, SecurityAssessmentMetadataResponseInner assessmentMetadata, Context context); + Response createInSubscriptionWithResponse(String assessmentMetadataName, + SecurityAssessmentMetadataResponseInner assessmentMetadata, Context context); /** * Create metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param assessmentMetadata AssessmentMetadata object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,13 +138,13 @@ Response createInSubscriptionWithRespon * @return security assessment metadata response. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityAssessmentMetadataResponseInner createInSubscription( - String assessmentMetadataName, SecurityAssessmentMetadataResponseInner assessmentMetadata); + SecurityAssessmentMetadataResponseInner createInSubscription(String assessmentMetadataName, + SecurityAssessmentMetadataResponseInner assessmentMetadata); /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,7 +158,7 @@ SecurityAssessmentMetadataResponseInner createInSubscription( /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutoProvisioningSettingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutoProvisioningSettingsClient.java index 7d93098d7d09..385c41b9a00c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutoProvisioningSettingsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutoProvisioningSettingsClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AutoProvisioningSettingInner; -/** An instance of this class provides access to all the operations defined in AutoProvisioningSettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in AutoProvisioningSettingsClient. + */ public interface AutoProvisioningSettingsClient { /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response as paginated response with {@link PagedIterable}. @@ -25,7 +27,7 @@ public interface AutoProvisioningSettingsClient { /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,7 +39,7 @@ public interface AutoProvisioningSettingsClient { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,7 +52,7 @@ public interface AutoProvisioningSettingsClient { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -62,7 +64,7 @@ public interface AutoProvisioningSettingsClient { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param setting Auto provisioning setting key. * @param context The context to associate with this operation. @@ -72,12 +74,12 @@ public interface AutoProvisioningSettingsClient { * @return auto provisioning setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String settingName, AutoProvisioningSettingInner setting, Context context); + Response createWithResponse(String settingName, AutoProvisioningSettingInner setting, + Context context); /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param setting Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutomationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutomationsClient.java index cfbcb6c5613d..7d18996b5d26 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutomationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AutomationsClient.java @@ -11,13 +11,16 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AutomationInner; import com.azure.resourcemanager.security.fluent.models.AutomationValidationStatusInner; +import com.azure.resourcemanager.security.models.AutomationUpdateModel; -/** An instance of this class provides access to all the operations defined in AutomationsClient. */ +/** + * An instance of this class provides access to all the operations defined in AutomationsClient. + */ public interface AutomationsClient { /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security automations response as paginated response with {@link PagedIterable}. @@ -28,7 +31,7 @@ public interface AutomationsClient { /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,9 +44,9 @@ public interface AutomationsClient { /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -55,9 +58,9 @@ public interface AutomationsClient { /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -69,9 +72,9 @@ public interface AutomationsClient { /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,14 +83,14 @@ public interface AutomationsClient { * @return the security automation resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String automationName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String automationName, + Context context); /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -100,9 +103,9 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a security automation. If a security automation is already created and a subsequent request is * issued for the same automation id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @param context The context to associate with this operation. @@ -112,15 +115,15 @@ Response getByResourceGroupWithResponse( * @return the security automation resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String automationName, AutomationInner automation, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String automationName, + AutomationInner automation, Context context); /** * Creates or updates a security automation. If a security automation is already created and a subsequent request is * issued for the same automation id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,11 +134,43 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) AutomationInner createOrUpdate(String resourceGroupName, String automationName, AutomationInner automation); + /** + * Updates a security automation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case + * insensitive. + * @param automationName The security automation name. + * @param automation The update model of security automation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the security automation resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String automationName, + AutomationUpdateModel automation, Context context); + + /** + * Updates a security automation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case + * insensitive. + * @param automationName The security automation name. + * @param automation The update model of security automation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the security automation resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutomationInner update(String resourceGroupName, String automationName, AutomationUpdateModel automation); + /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,9 +183,9 @@ Response createOrUpdateWithResponse( /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -162,9 +197,9 @@ Response createOrUpdateWithResponse( /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @param context The context to associate with this operation. @@ -174,15 +209,15 @@ Response createOrUpdateWithResponse( * @return the security automation model state property bag along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response validateWithResponse( - String resourceGroupName, String automationName, AutomationInner automation, Context context); + Response validateWithResponse(String resourceGroupName, String automationName, + AutomationInner automation, Context context); /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -191,6 +226,6 @@ Response validateWithResponse( * @return the security automation model state property bag. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutomationValidationStatusInner validate( - String resourceGroupName, String automationName, AutomationInner automation); + AutomationValidationStatusInner validate(String resourceGroupName, String automationName, + AutomationInner automation); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsOrgsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsOrgsClient.java new file mode 100644 index 000000000000..566832c05a50 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsOrgsClient.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgListResponseInner; + +/** + * An instance of this class provides access to all the operations defined in AzureDevOpsOrgsClient. + */ +public interface AzureDevOpsOrgsClient { + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context); + + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsOrgListResponseInner listAvailable(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, Context context); + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, Context context); + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsOrgInner get(String resourceGroupName, String securityConnectorName, String orgName); + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsOrgInner> beginCreateOrUpdate(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg); + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsOrgInner> beginCreateOrUpdate(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context); + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsOrgInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg); + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsOrgInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg, Context context); + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsOrgInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg); + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsOrgInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context); + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsOrgInner update(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg); + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsOrgInner update(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg, Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsProjectsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsProjectsClient.java new file mode 100644 index 000000000000..8f0c62b56735 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsProjectsClient.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsProjectInner; + +/** + * An instance of this class provides access to all the operations defined in AzureDevOpsProjectsClient. + */ +public interface AzureDevOpsProjectsClient { + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, String orgName); + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, String orgName, + Context context); + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, Context context); + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsProjectInner get(String resourceGroupName, String securityConnectorName, String orgName, + String projectName); + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsProjectInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject); + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsProjectInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject, Context context); + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsProjectInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, AzureDevOpsProjectInner azureDevOpsProject); + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsProjectInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, AzureDevOpsProjectInner azureDevOpsProject, Context context); + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsProjectInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject); + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsProjectInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject, + Context context); + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsProjectInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, AzureDevOpsProjectInner azureDevOpsProject); + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsProjectInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, AzureDevOpsProjectInner azureDevOpsProject, Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsReposClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsReposClient.java new file mode 100644 index 000000000000..0c8ef8061ae1 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AzureDevOpsReposClient.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsRepositoryInner; + +/** + * An instance of this class provides access to all the operations defined in AzureDevOpsReposClient. + */ +public interface AzureDevOpsReposClient { + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, String projectName); + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, Context context); + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, Context context); + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsRepositoryInner get(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName); + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsRepositoryInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository); + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsRepositoryInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context); + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsRepositoryInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository); + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsRepositoryInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository, Context context); + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsRepositoryInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository); + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AzureDevOpsRepositoryInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context); + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsRepositoryInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository); + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureDevOpsRepositoryInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository, Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ComplianceResultsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ComplianceResultsClient.java index 834cf0990b35..2f3bb8e37c72 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ComplianceResultsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ComplianceResultsClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ComplianceResultInner; -/** An instance of this class provides access to all the operations defined in ComplianceResultsClient. */ +/** + * An instance of this class provides access to all the operations defined in ComplianceResultsClient. + */ public interface ComplianceResultsClient { /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -28,9 +30,9 @@ public interface ComplianceResultsClient { /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,7 +44,7 @@ public interface ComplianceResultsClient { /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @param context The context to associate with this operation. @@ -56,7 +58,7 @@ public interface ComplianceResultsClient { /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CompliancesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CompliancesClient.java index 7914ab6d4293..a592b826901c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CompliancesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CompliancesClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ComplianceInner; -/** An instance of this class provides access to all the operations defined in CompliancesClient. */ +/** + * An instance of this class provides access to all the operations defined in CompliancesClient. + */ public interface CompliancesClient { /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -28,9 +30,9 @@ public interface CompliancesClient { /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,9 +44,9 @@ public interface CompliancesClient { /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,9 +59,9 @@ public interface CompliancesClient { /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ConnectorsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ConnectorsClient.java index fc3073c4ec5a..7f2e36613828 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ConnectorsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ConnectorsClient.java @@ -11,35 +11,37 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ConnectorSettingInner; -/** An instance of this class provides access to all the operations defined in ConnectorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ConnectorsClient. + */ public interface ConnectorsClient { /** * Cloud accounts connectors of a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Cloud accounts connectors of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,7 +54,7 @@ public interface ConnectorsClient { /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -65,7 +67,7 @@ public interface ConnectorsClient { /** * Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either * account credentials or role-based authentication. For GCP, use account organization credentials. - * + * * @param connectorName Name of the cloud account connector. * @param connectorSetting Settings for the cloud account connector. * @param context The context to associate with this operation. @@ -75,13 +77,13 @@ public interface ConnectorsClient { * @return the connector setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String connectorName, ConnectorSettingInner connectorSetting, Context context); + Response createOrUpdateWithResponse(String connectorName, + ConnectorSettingInner connectorSetting, Context context); /** * Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either * account credentials or role-based authentication. For GCP, use account organization credentials. - * + * * @param connectorName Name of the cloud account connector. * @param connectorSetting Settings for the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,7 +96,7 @@ Response createOrUpdateWithResponse( /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -107,7 +109,7 @@ Response createOrUpdateWithResponse( /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomAssessmentAutomationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomAssessmentAutomationsClient.java index cdd6a0b7a94f..d27421608356 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomAssessmentAutomationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomAssessmentAutomationsClient.java @@ -12,34 +12,36 @@ import com.azure.resourcemanager.security.fluent.models.CustomAssessmentAutomationInner; import com.azure.resourcemanager.security.models.CustomAssessmentAutomationRequest; -/** An instance of this class provides access to all the operations defined in CustomAssessmentAutomationsClient. */ +/** + * An instance of this class provides access to all the operations defined in CustomAssessmentAutomationsClient. + */ public interface CustomAssessmentAutomationsClient { /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String customAssessmentAutomationName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String customAssessmentAutomationName, Context context); /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,12 +53,12 @@ Response getByResourceGroupWithResponse( /** * Creates a custom assessment automation - * - *

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an + * + * Creates or updates a custom assessment automation for the provided subscription. Please note that providing an * existing custom assessment automation will replace the existing record. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param customAssessmentAutomationBody Custom Assessment Automation body. * @param context The context to associate with this operation. @@ -66,20 +68,18 @@ Response getByResourceGroupWithResponse( * @return custom Assessment Automation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String customAssessmentAutomationName, - CustomAssessmentAutomationRequest customAssessmentAutomationBody, + Response createWithResponse(String resourceGroupName, + String customAssessmentAutomationName, CustomAssessmentAutomationRequest customAssessmentAutomationBody, Context context); /** * Creates a custom assessment automation - * - *

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an + * + * Creates or updates a custom assessment automation for the provided subscription. Please note that providing an * existing custom assessment automation will replace the existing record. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param customAssessmentAutomationBody Custom Assessment Automation body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,18 +88,16 @@ Response createWithResponse( * @return custom Assessment Automation. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomAssessmentAutomationInner create( - String resourceGroupName, - String customAssessmentAutomationName, + CustomAssessmentAutomationInner create(String resourceGroupName, String customAssessmentAutomationName, CustomAssessmentAutomationRequest customAssessmentAutomationBody); /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -112,11 +110,11 @@ CustomAssessmentAutomationInner create( /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -127,11 +125,11 @@ CustomAssessmentAutomationInner create( /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -142,11 +140,11 @@ CustomAssessmentAutomationInner create( /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -158,9 +156,9 @@ CustomAssessmentAutomationInner create( /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations as paginated response with {@link PagedIterable}. @@ -170,9 +168,9 @@ CustomAssessmentAutomationInner create( /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomEntityStoreAssignmentsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomEntityStoreAssignmentsClient.java index 5f7d062043ad..74a13bec8c99 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomEntityStoreAssignmentsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/CustomEntityStoreAssignmentsClient.java @@ -12,34 +12,36 @@ import com.azure.resourcemanager.security.fluent.models.CustomEntityStoreAssignmentInner; import com.azure.resourcemanager.security.models.CustomEntityStoreAssignmentRequest; -/** An instance of this class provides access to all the operations defined in CustomEntityStoreAssignmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in CustomEntityStoreAssignmentsClient. + */ public interface CustomEntityStoreAssignmentsClient { /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group along - * with {@link Response}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String customEntityStoreAssignmentName, Context context); /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,16 +49,16 @@ Response getByResourceGroupWithResponse( * @return a single custom entity store assignment by name for the provided subscription and resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomEntityStoreAssignmentInner getByResourceGroup( - String resourceGroupName, String customEntityStoreAssignmentName); + CustomEntityStoreAssignmentInner getByResourceGroup(String resourceGroupName, + String customEntityStoreAssignmentName); /** * Creates a custom entity store assignment - * - *

Creates a custom entity store assignment for the provided subscription, if not already exists. - * + * + * Creates a custom entity store assignment for the provided subscription, if not already exists. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param customEntityStoreAssignmentRequestBody Custom entity store assignment body. * @param context The context to associate with this operation. @@ -66,19 +68,17 @@ CustomEntityStoreAssignmentInner getByResourceGroup( * @return custom entity store assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, + Response createWithResponse(String resourceGroupName, String customEntityStoreAssignmentName, - CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody, - Context context); + CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody, Context context); /** * Creates a custom entity store assignment - * - *

Creates a custom entity store assignment for the provided subscription, if not already exists. - * + * + * Creates a custom entity store assignment for the provided subscription, if not already exists. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param customEntityStoreAssignmentRequestBody Custom entity store assignment body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,18 +87,16 @@ Response createWithResponse( * @return custom entity store assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomEntityStoreAssignmentInner create( - String resourceGroupName, - String customEntityStoreAssignmentName, + CustomEntityStoreAssignmentInner create(String resourceGroupName, String customEntityStoreAssignmentName, CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody); /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -107,16 +105,16 @@ CustomEntityStoreAssignmentInner create( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context); + Response deleteWithResponse(String resourceGroupName, String customEntityStoreAssignmentName, + Context context); /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -127,11 +125,11 @@ Response deleteWithResponse( /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -142,11 +140,11 @@ Response deleteWithResponse( /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -158,9 +156,9 @@ Response deleteWithResponse( /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments as paginated response with {@link PagedIterable}. @@ -170,9 +168,9 @@ Response deleteWithResponse( /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DefenderForStoragesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DefenderForStoragesClient.java new file mode 100644 index 000000000000..a703e8d5114d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DefenderForStoragesClient.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.DefenderForStorageSettingInner; +import com.azure.resourcemanager.security.models.SettingName; + +/** + * An instance of this class provides access to all the operations defined in DefenderForStoragesClient. + */ +public interface DefenderForStoragesClient { + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceId, SettingName settingName, + Context context); + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DefenderForStorageSettingInner get(String resourceId, SettingName settingName); + + /** + * Creates or updates the Defender for Storage settings on a specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param defenderForStorageSetting Defender for Storage Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse(String resourceId, SettingName settingName, + DefenderForStorageSettingInner defenderForStorageSetting, Context context); + + /** + * Creates or updates the Defender for Storage settings on a specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param defenderForStorageSetting Defender for Storage Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DefenderForStorageSettingInner create(String resourceId, SettingName settingName, + DefenderForStorageSettingInner defenderForStorageSetting); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsConfigurationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsConfigurationsClient.java new file mode 100644 index 000000000000..072a55b3132f --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsConfigurationsClient.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; + +/** + * An instance of this class provides access to all the operations defined in DevOpsConfigurationsClient. + */ +public interface DevOpsConfigurationsClient { + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName); + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, + Context context); + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + Context context); + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DevOpsConfigurationInner get(String resourceGroupName, String securityConnectorName); + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DevOpsConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration); + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DevOpsConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, + Context context); + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DevOpsConfigurationInner createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration); + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DevOpsConfigurationInner createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context); + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DevOpsConfigurationInner> beginUpdate(String resourceGroupName, + String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration); + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DevOpsConfigurationInner> beginUpdate(String resourceGroupName, + String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, Context context); + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DevOpsConfigurationInner update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration); + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DevOpsConfigurationInner update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context); + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String securityConnectorName); + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String securityConnectorName, + Context context); + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String securityConnectorName); + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String securityConnectorName, Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsOperationResultsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsOperationResultsClient.java new file mode 100644 index 000000000000..104278955f2d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevOpsOperationResultsClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.OperationStatusResultInner; + +/** + * An instance of this class provides access to all the operations defined in DevOpsOperationResultsClient. + */ +public interface DevOpsOperationResultsClient { + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String operationResultId, Context context); + + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner get(String resourceGroupName, String securityConnectorName, String operationResultId); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DeviceSecurityGroupsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DeviceSecurityGroupsClient.java index e03cd1b990c0..72dab9a527ea 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DeviceSecurityGroupsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DeviceSecurityGroupsClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.DeviceSecurityGroupInner; -/** An instance of this class provides access to all the operations defined in DeviceSecurityGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in DeviceSecurityGroupsClient. + */ public interface DeviceSecurityGroupsClient { /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,7 +29,7 @@ public interface DeviceSecurityGroupsClient { /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,10 +42,10 @@ public interface DeviceSecurityGroupsClient { /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,15 +53,15 @@ public interface DeviceSecurityGroupsClient { * @return the device security group resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceId, String deviceSecurityGroupName, Context context); + Response getWithResponse(String resourceId, String deviceSecurityGroupName, + Context context); /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -70,10 +72,10 @@ Response getWithResponse( /** * Use this method to creates or updates the device security group on a specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param deviceSecurityGroup Security group object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -82,18 +84,15 @@ Response getWithResponse( * @return the device security group resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceId, - String deviceSecurityGroupName, - DeviceSecurityGroupInner deviceSecurityGroup, - Context context); + Response createOrUpdateWithResponse(String resourceId, String deviceSecurityGroupName, + DeviceSecurityGroupInner deviceSecurityGroup, Context context); /** * Use this method to creates or updates the device security group on a specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param deviceSecurityGroup Security group object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,15 +100,15 @@ Response createOrUpdateWithResponse( * @return the device security group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeviceSecurityGroupInner createOrUpdate( - String resourceId, String deviceSecurityGroupName, DeviceSecurityGroupInner deviceSecurityGroup); + DeviceSecurityGroupInner createOrUpdate(String resourceId, String deviceSecurityGroupName, + DeviceSecurityGroupInner deviceSecurityGroup); /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -121,10 +120,10 @@ DeviceSecurityGroupInner createOrUpdate( /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DiscoveredSecuritySolutionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DiscoveredSecuritySolutionsClient.java index 692eeaf708cc..47c4eb45a523 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DiscoveredSecuritySolutionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DiscoveredSecuritySolutionsClient.java @@ -11,68 +11,70 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.DiscoveredSecuritySolutionInner; -/** An instance of this class provides access to all the operations defined in DiscoveredSecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in DiscoveredSecuritySolutionsClient. + */ public interface DiscoveredSecuritySolutionsClient { /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of discovered Security Solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of discovered Security Solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation); /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation, Context context); /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,16 +83,16 @@ public interface DiscoveredSecuritySolutionsClient { * @return a specific discovered Security Solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName, Context context); /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,6 +100,6 @@ Response getWithResponse( * @return a specific discovered Security Solution. */ @ServiceMethod(returns = ReturnType.SINGLE) - DiscoveredSecuritySolutionInner get( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName); + DiscoveredSecuritySolutionInner get(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ExternalSecuritySolutionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ExternalSecuritySolutionsClient.java index ace625003ab6..1acdd16924f0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ExternalSecuritySolutionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ExternalSecuritySolutionsClient.java @@ -11,68 +11,70 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ExternalSecuritySolutionInner; -/** An instance of this class provides access to all the operations defined in ExternalSecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExternalSecuritySolutionsClient. + */ public interface ExternalSecuritySolutionsClient { /** * Gets a list of external security solutions for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external security solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of external security solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Gets a list of external security solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external security solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of external security solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedIterable}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation); /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedIterable}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation, Context context); /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,16 +83,16 @@ public interface ExternalSecuritySolutionsClient { * @return a specific external Security Solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName, Context context); /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,6 +100,6 @@ Response getWithResponse( * @return a specific external Security Solution. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExternalSecuritySolutionInner get( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName); + ExternalSecuritySolutionInner get(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubOwnersClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubOwnersClient.java new file mode 100644 index 000000000000..7a4c2cb6a4a4 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubOwnersClient.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerInner; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerListResponseInner; + +/** + * An instance of this class provides access to all the operations defined in GitHubOwnersClient. + */ +public interface GitHubOwnersClient { + /** + * Returns a list of all GitHub owners accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context); + + /** + * Returns a list of all GitHub owners accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GitHubOwnerListResponseInner listAvailable(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, Context context); + + /** + * Returns a monitored GitHub owner. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Owner resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, String ownerName, + Context context); + + /** + * Returns a monitored GitHub owner. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Owner resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GitHubOwnerInner get(String resourceGroupName, String securityConnectorName, String ownerName); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubReposClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubReposClient.java new file mode 100644 index 000000000000..fc4eb380b972 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitHubReposClient.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.GitHubRepositoryInner; + +/** + * An instance of this class provides access to all the operations defined in GitHubReposClient. + */ +public interface GitHubReposClient { + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, String ownerName); + + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, String ownerName, + Context context); + + /** + * Returns a monitored GitHub repository. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param repoName The repository name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Repository resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String ownerName, String repoName, Context context); + + /** + * Returns a monitored GitHub repository. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GitHubRepositoryInner get(String resourceGroupName, String securityConnectorName, String ownerName, + String repoName); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabGroupsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabGroupsClient.java new file mode 100644 index 000000000000..a20ab3e0215d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabGroupsClient.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupInner; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupListResponseInner; + +/** + * An instance of this class provides access to all the operations defined in GitLabGroupsClient. + */ +public interface GitLabGroupsClient { + /** + * Returns a list of all GitLab groups accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context); + + /** + * Returns a list of all GitLab groups accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GitLabGroupListResponseInner listAvailable(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, Context context); + + /** + * Returns a monitored GitLab Group resource for a given fully-qualified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, Context context); + + /** + * Returns a monitored GitLab Group resource for a given fully-qualified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GitLabGroupInner get(String resourceGroupName, String securityConnectorName, String groupFQName); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabProjectsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabProjectsClient.java new file mode 100644 index 000000000000..9faf6c688bcc --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabProjectsClient.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.GitLabProjectInner; + +/** + * An instance of this class provides access to all the operations defined in GitLabProjectsClient. + */ +public interface GitLabProjectsClient { + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, String groupFQName); + + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String securityConnectorName, String groupFQName, + Context context); + + /** + * Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Project resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, String projectName, Context context); + + /** + * Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GitLabProjectInner get(String resourceGroupName, String securityConnectorName, String groupFQName, + String projectName); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabSubgroupsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabSubgroupsClient.java new file mode 100644 index 000000000000..ffcc005c753b --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GitLabSubgroupsClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupListResponseInner; + +/** + * An instance of this class provides access to all the operations defined in GitLabSubgroupsClient. + */ +public interface GitLabSubgroupsClient { + /** + * Gets nested subgroups of given GitLab Group which are onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nested subgroups of given GitLab Group which are onboarded to the connector along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, Context context); + + /** + * Gets nested subgroups of given GitLab Group which are onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nested subgroups of given GitLab Group which are onboarded to the connector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GitLabGroupListResponseInner list(String resourceGroupName, String securityConnectorName, String groupFQName); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceAssignmentsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceAssignmentsClient.java index ab8458ddf09c..bb00ad61eea3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceAssignmentsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceAssignmentsClient.java @@ -11,47 +11,49 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.GovernanceAssignmentInner; -/** An instance of this class provides access to all the operations defined in GovernanceAssignmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in GovernanceAssignmentsClient. + */ public interface GovernanceAssignmentsClient { /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignments on all of your resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return governance assignments on all of your resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope, String assessmentName); /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignments on all of your resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return governance assignments on all of your resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope, String assessmentName, Context context); /** * Get a specific governanceAssignment for the requested scope by AssignmentKey. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param context The context to associate with this operation. @@ -61,15 +63,15 @@ public interface GovernanceAssignmentsClient { * @return a specific governanceAssignment for the requested scope by AssignmentKey along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String scope, String assessmentName, String assignmentKey, Context context); + Response getWithResponse(String scope, String assessmentName, String assignmentKey, + Context context); /** * Get a specific governanceAssignment for the requested scope by AssignmentKey. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -82,10 +84,10 @@ Response getWithResponse( /** * Creates or updates a governance assignment on the given subscription. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param governanceAssignment Governance assignment over a subscription scope. @@ -96,19 +98,15 @@ Response getWithResponse( * @return governance assignment over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String scope, - String assessmentName, - String assignmentKey, - GovernanceAssignmentInner governanceAssignment, - Context context); + Response createOrUpdateWithResponse(String scope, String assessmentName, + String assignmentKey, GovernanceAssignmentInner governanceAssignment, Context context); /** * Creates or updates a governance assignment on the given subscription. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param governanceAssignment Governance assignment over a subscription scope. @@ -118,15 +116,15 @@ Response createOrUpdateWithResponse( * @return governance assignment over a given scope. */ @ServiceMethod(returns = ReturnType.SINGLE) - GovernanceAssignmentInner createOrUpdate( - String scope, String assessmentName, String assignmentKey, GovernanceAssignmentInner governanceAssignment); + GovernanceAssignmentInner createOrUpdate(String scope, String assessmentName, String assignmentKey, + GovernanceAssignmentInner governanceAssignment); /** * Delete a GovernanceAssignment over a given scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param context The context to associate with this operation. @@ -140,10 +138,10 @@ GovernanceAssignmentInner createOrUpdate( /** * Delete a GovernanceAssignment over a given scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceRulesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceRulesClient.java index d6f4ace6458c..a75e3e9290b6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceRulesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/GovernanceRulesClient.java @@ -16,15 +16,17 @@ import com.azure.resourcemanager.security.models.ExecuteGovernanceRuleParams; import com.azure.resourcemanager.security.models.GovernanceRulesOperationResultsResponse; -/** An instance of this class provides access to all the operations defined in GovernanceRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in GovernanceRulesClient. + */ public interface GovernanceRulesClient { /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -35,11 +37,11 @@ public interface GovernanceRulesClient { /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,11 +53,11 @@ public interface GovernanceRulesClient { /** * Get a specific governance rule for the requested scope by ruleId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,11 +70,11 @@ public interface GovernanceRulesClient { /** * Get a specific governance rule for the requested scope by ruleId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,11 +86,11 @@ public interface GovernanceRulesClient { /** * Creates or updates a governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param governanceRule Governance rule over a given scope. * @param context The context to associate with this operation. @@ -98,16 +100,16 @@ public interface GovernanceRulesClient { * @return governance rule over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String scope, String ruleId, GovernanceRuleInner governanceRule, Context context); + Response createOrUpdateWithResponse(String scope, String ruleId, + GovernanceRuleInner governanceRule, Context context); /** * Creates or updates a governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param governanceRule Governance rule over a given scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -120,11 +122,11 @@ Response createOrUpdateWithResponse( /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -136,11 +138,11 @@ Response createOrUpdateWithResponse( /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,11 +155,11 @@ Response createOrUpdateWithResponse( /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -168,11 +170,11 @@ Response createOrUpdateWithResponse( /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,11 +186,11 @@ Response createOrUpdateWithResponse( /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -200,11 +202,11 @@ Response createOrUpdateWithResponse( /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @param context The context to associate with this operation. @@ -214,16 +216,16 @@ Response createOrUpdateWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginExecute( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context); + SyncPoller, Void> beginExecute(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context); /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -234,11 +236,11 @@ SyncPoller, Void> beginExecute( /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @param context The context to associate with this operation. @@ -251,11 +253,11 @@ SyncPoller, Void> beginExecute( /** * Get governance rules long run operation result for the requested scope by ruleId and operationId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param operationId The governance rule long running operation unique key. * @param context The context to associate with this operation. @@ -265,16 +267,16 @@ SyncPoller, Void> beginExecute( * @return governance rules long run operation result for the requested scope by ruleId and operationId. */ @ServiceMethod(returns = ReturnType.SINGLE) - GovernanceRulesOperationResultsResponse operationResultsWithResponse( - String scope, String ruleId, String operationId, Context context); + GovernanceRulesOperationResultsResponse operationResultsWithResponse(String scope, String ruleId, + String operationId, Context context); /** * Get governance rules long run operation result for the requested scope by ruleId and operationId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param operationId The governance rule long running operation unique key. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/HealthReportsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/HealthReportsClient.java index 57ee9785cfd2..2db32bbb22aa 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/HealthReportsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/HealthReportsClient.java @@ -7,16 +7,19 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.HealthReportInner; -/** An instance of this class provides access to all the operations defined in HealthReportsClient. */ +/** + * An instance of this class provides access to all the operations defined in HealthReportsClient. + */ public interface HealthReportsClient { /** * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,7 +33,7 @@ public interface HealthReportsClient { * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,4 +43,31 @@ public interface HealthReportsClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope, Context context); + + /** + * Get health report of resource. + * + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return health report of resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceId, String healthReportName, Context context); + + /** + * Get health report of resource. + * + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return health report of resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HealthReportInner get(String resourceId, String healthReportName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/InformationProtectionPoliciesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/InformationProtectionPoliciesClient.java index a43e048fb2fa..4004e84aa103 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/InformationProtectionPoliciesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/InformationProtectionPoliciesClient.java @@ -12,13 +12,15 @@ import com.azure.resourcemanager.security.fluent.models.InformationProtectionPolicyInner; import com.azure.resourcemanager.security.models.InformationProtectionPolicyName; -/** An instance of this class provides access to all the operations defined in InformationProtectionPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in InformationProtectionPoliciesClient. + */ public interface InformationProtectionPoliciesClient { /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,14 +29,14 @@ public interface InformationProtectionPoliciesClient { * @return information protection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String scope, InformationProtectionPolicyName informationProtectionPolicyName, Context context); + Response getWithResponse(String scope, + InformationProtectionPolicyName informationProtectionPolicyName, Context context); /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,9 +48,9 @@ Response getWithResponse( /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param informationProtectionPolicy Information protection policy. * @param context The context to associate with this operation. @@ -58,17 +60,15 @@ Response getWithResponse( * @return information protection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String scope, + Response createOrUpdateWithResponse(String scope, InformationProtectionPolicyName informationProtectionPolicyName, - InformationProtectionPolicyInner informationProtectionPolicy, - Context context); + InformationProtectionPolicyInner informationProtectionPolicy, Context context); /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param informationProtectionPolicy Information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,16 +77,15 @@ Response createOrUpdateWithResponse( * @return information protection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - InformationProtectionPolicyInner createOrUpdate( - String scope, + InformationProtectionPolicyInner createOrUpdate(String scope, InformationProtectionPolicyName informationProtectionPolicyName, InformationProtectionPolicyInner informationProtectionPolicy); /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -97,9 +96,9 @@ InformationProtectionPolicyInner createOrUpdate( /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IngestionSettingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IngestionSettingsClient.java deleted file mode 100644 index c0765e68586c..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IngestionSettingsClient.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.ConnectionStringsInner; -import com.azure.resourcemanager.security.fluent.models.IngestionSettingInner; -import com.azure.resourcemanager.security.fluent.models.IngestionSettingTokenInner; - -/** An instance of this class provides access to all the operations defined in IngestionSettingsClient. */ -public interface IngestionSettingsClient { - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String ingestionSettingName, Context context); - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IngestionSettingInner get(String ingestionSettingName); - - /** - * Create setting for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param ingestionSetting Ingestion setting object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String ingestionSettingName, IngestionSettingInner ingestionSetting, Context context); - - /** - * Create setting for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param ingestionSetting Ingestion setting object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IngestionSettingInner create(String ingestionSettingName, IngestionSettingInner ingestionSetting); - - /** - * Deletes the ingestion settings for this subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String ingestionSettingName, Context context); - - /** - * Deletes the ingestion settings for this subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String ingestionSettingName); - - /** - * Returns the token that is used for correlating ingested telemetry with the resources in the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listTokensWithResponse(String ingestionSettingName, Context context); - - /** - * Returns the token that is used for correlating ingested telemetry with the resources in the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IngestionSettingTokenInner listTokens(String ingestionSettingName); - - /** - * Connection strings for ingesting security scan logs and data. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return connection string for ingesting security data and logs along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listConnectionStringsWithResponse(String ingestionSettingName, Context context); - - /** - * Connection strings for ingesting security scan logs and data. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return connection string for ingesting security data and logs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectionStringsInner listConnectionStrings(String ingestionSettingName); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionAnalyticsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionAnalyticsClient.java index 25a019f2f016..9805485a48cf 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionAnalyticsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionAnalyticsClient.java @@ -11,13 +11,15 @@ import com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionAnalyticsModelInner; import com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionAnalyticsModelListInner; -/** An instance of this class provides access to all the operations defined in IotSecuritySolutionAnalyticsClient. */ +/** + * An instance of this class provides access to all the operations defined in IotSecuritySolutionAnalyticsClient. + */ public interface IotSecuritySolutionAnalyticsClient { /** * Use this method to get IoT security Analytics metrics in an array. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,14 +28,14 @@ public interface IotSecuritySolutionAnalyticsClient { * @return list of Security analytics of your IoT Security solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String solutionName, Context context); + Response listWithResponse(String resourceGroupName, String solutionName, + Context context); /** * Use this method to get IoT security Analytics metrics in an array. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ Response listWithResponse( /** * Use this method to get IoT Security Analytics metrics. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,14 +58,14 @@ Response listWithResponse( * @return security analytics of your IoT Security solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String solutionName, Context context); + Response getWithResponse(String resourceGroupName, String solutionName, + Context context); /** * Use this method to get IoT Security Analytics metrics. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsAggregatedAlertsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsAggregatedAlertsClient.java index 1ea68d2ece5c..6f022394b02a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsAggregatedAlertsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsAggregatedAlertsClient.java @@ -18,9 +18,9 @@ public interface IotSecuritySolutionsAnalyticsAggregatedAlertsClient { /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,9 +32,9 @@ public interface IotSecuritySolutionsAnalyticsAggregatedAlertsClient { /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. @@ -44,15 +44,15 @@ public interface IotSecuritySolutionsAnalyticsAggregatedAlertsClient { * @return list of IoT Security solution aggregated alert data as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String solutionName, Integer top, Context context); + PagedIterable list(String resourceGroupName, String solutionName, Integer top, + Context context); /** * Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @param context The context to associate with this operation. @@ -62,15 +62,15 @@ PagedIterable list( * @return security Solution Aggregated Alert information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context); + Response getWithResponse(String resourceGroupName, String solutionName, + String aggregatedAlertName, Context context); /** * Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,9 +83,9 @@ Response getWithResponse( /** * Use this method to dismiss an aggregated IoT Security Solution Alert. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @param context The context to associate with this operation. @@ -95,14 +95,14 @@ Response getWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response dismissWithResponse( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context); + Response dismissWithResponse(String resourceGroupName, String solutionName, String aggregatedAlertName, + Context context); /** * Use this method to dismiss an aggregated IoT Security Solution Alert. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsRecommendationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsRecommendationsClient.java index 1e534a2b033e..19cd3bba06d4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsRecommendationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsAnalyticsRecommendationsClient.java @@ -19,9 +19,9 @@ public interface IotSecuritySolutionsAnalyticsRecommendationsClient { /** * Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This * aggregation is performed by recommendation name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. * @param context The context to associate with this operation. @@ -31,15 +31,15 @@ public interface IotSecuritySolutionsAnalyticsRecommendationsClient { * @return ioT Security solution recommendation information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String solutionName, String aggregatedRecommendationName, Context context); + Response getWithResponse(String resourceGroupName, String solutionName, + String aggregatedRecommendationName, Context context); /** * Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This * aggregation is performed by recommendation name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,39 +48,39 @@ Response getWithResponse( * @return ioT Security solution recommendation information. */ @ServiceMethod(returns = ReturnType.SINGLE) - IoTSecurityAggregatedRecommendationInner get( - String resourceGroupName, String solutionName, String aggregatedRecommendationName); + IoTSecurityAggregatedRecommendationInner get(String resourceGroupName, String solutionName, + String aggregatedRecommendationName); /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Security solution aggregated recommendations as paginated response with {@link - * PagedIterable}. + * @return list of IoT Security solution aggregated recommendations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String solutionName); /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Security solution aggregated recommendations as paginated response with {@link - * PagedIterable}. + * @return list of IoT Security solution aggregated recommendations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String solutionName, Integer top, Context context); + PagedIterable list(String resourceGroupName, String solutionName, + Integer top, Context context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsClient.java index 140ffd6f2f62..cdeb1394af30 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSecuritySolutionsClient.java @@ -12,11 +12,13 @@ import com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionModelInner; import com.azure.resourcemanager.security.models.UpdateIotSecuritySolutionData; -/** An instance of this class provides access to all the operations defined in IotSecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in IotSecuritySolutionsClient. + */ public interface IotSecuritySolutionsClient { /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solutions as paginated response with {@link PagedIterable}. @@ -26,7 +28,7 @@ public interface IotSecuritySolutionsClient { /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -39,9 +41,9 @@ public interface IotSecuritySolutionsClient { /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -52,9 +54,9 @@ public interface IotSecuritySolutionsClient { /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,14 +65,14 @@ public interface IotSecuritySolutionsClient { * @return list of IoT Security solutions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, String filter, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Context context); /** * User this method to get details of a specific IoT Security solution based on solution name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,14 +81,14 @@ PagedIterable listByResourceGroup( * @return ioT Security solution configuration and resource information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String solutionName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String solutionName, Context context); /** * User this method to get details of a specific IoT Security solution based on solution name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,9 +100,9 @@ Response getByResourceGroupWithResponse( /** * Use this method to create or update yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param iotSecuritySolutionData The security solution data. * @param context The context to associate with this operation. @@ -110,17 +112,14 @@ Response getByResourceGroupWithResponse( * @return ioT Security solution configuration and resource information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String solutionName, - IoTSecuritySolutionModelInner iotSecuritySolutionData, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String solutionName, + IoTSecuritySolutionModelInner iotSecuritySolutionData, Context context); /** * Use this method to create or update yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param iotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,15 +128,15 @@ Response createOrUpdateWithResponse( * @return ioT Security solution configuration and resource information. */ @ServiceMethod(returns = ReturnType.SINGLE) - IoTSecuritySolutionModelInner createOrUpdate( - String resourceGroupName, String solutionName, IoTSecuritySolutionModelInner iotSecuritySolutionData); + IoTSecuritySolutionModelInner createOrUpdate(String resourceGroupName, String solutionName, + IoTSecuritySolutionModelInner iotSecuritySolutionData); /** * Use this method to update existing IoT Security solution tags or user defined resources. To update other fields * use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param updateIotSecuritySolutionData The security solution data. * @param context The context to associate with this operation. @@ -147,18 +146,15 @@ IoTSecuritySolutionModelInner createOrUpdate( * @return ioT Security solution configuration and resource information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String solutionName, - UpdateIotSecuritySolutionData updateIotSecuritySolutionData, - Context context); + Response updateWithResponse(String resourceGroupName, String solutionName, + UpdateIotSecuritySolutionData updateIotSecuritySolutionData, Context context); /** * Use this method to update existing IoT Security solution tags or user defined resources. To update other fields * use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param updateIotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,14 +163,14 @@ Response updateWithResponse( * @return ioT Security solution configuration and resource information. */ @ServiceMethod(returns = ReturnType.SINGLE) - IoTSecuritySolutionModelInner update( - String resourceGroupName, String solutionName, UpdateIotSecuritySolutionData updateIotSecuritySolutionData); + IoTSecuritySolutionModelInner update(String resourceGroupName, String solutionName, + UpdateIotSecuritySolutionData updateIotSecuritySolutionData); /** * Use this method to delete yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,9 +183,9 @@ IoTSecuritySolutionModelInner update( /** * Use this method to delete yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/JitNetworkAccessPoliciesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/JitNetworkAccessPoliciesClient.java index 3170b606a0ed..9dc4892f7ed9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/JitNetworkAccessPoliciesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/JitNetworkAccessPoliciesClient.java @@ -13,11 +13,13 @@ import com.azure.resourcemanager.security.fluent.models.JitNetworkAccessRequestInner; import com.azure.resourcemanager.security.models.JitNetworkAccessPolicyInitiateRequest; -/** An instance of this class provides access to all the operations defined in JitNetworkAccessPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in JitNetworkAccessPoliciesClient. + */ public interface JitNetworkAccessPoliciesClient { /** * Policies for protecting resources using Just-in-Time access control. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the paginated response with {@link PagedIterable}. @@ -27,7 +29,7 @@ public interface JitNetworkAccessPoliciesClient { /** * Policies for protecting resources using Just-in-Time access control. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -39,9 +41,9 @@ public interface JitNetworkAccessPoliciesClient { /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -52,9 +54,9 @@ public interface JitNetworkAccessPoliciesClient { /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -66,9 +68,9 @@ public interface JitNetworkAccessPoliciesClient { /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -79,9 +81,9 @@ public interface JitNetworkAccessPoliciesClient { /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -93,27 +95,27 @@ public interface JitNetworkAccessPoliciesClient { /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupAndRegion( - String resourceGroupName, String ascLocation); + PagedIterable listByResourceGroupAndRegion(String resourceGroupName, + String ascLocation); /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -121,16 +123,16 @@ PagedIterable listByResourceGroupAndRegion( * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupAndRegion( - String resourceGroupName, String ascLocation, Context context); + PagedIterable listByResourceGroupAndRegion(String resourceGroupName, + String ascLocation, Context context); /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,16 +141,16 @@ PagedIterable listByResourceGroupAndRegion( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, Context context); /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -160,11 +162,11 @@ Response getWithResponse( /** * Create a policy for protecting resources using Just-in-Time access control. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @param context The context to associate with this operation. @@ -174,20 +176,16 @@ Response getWithResponse( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInner body, Context context); /** * Create a policy for protecting resources using Just-in-Time access control. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -196,19 +194,16 @@ Response createOrUpdateWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - JitNetworkAccessPolicyInner createOrUpdate( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInner body); + JitNetworkAccessPolicyInner createOrUpdate(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInner body); /** * Delete a Just-in-Time access control policy. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,16 +212,16 @@ JitNetworkAccessPolicyInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context); + Response deleteWithResponse(String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, + Context context); /** * Delete a Just-in-Time access control policy. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -237,11 +232,11 @@ Response deleteWithResponse( /** * Initiate a JIT access from a specific Just-in-Time policy configuration. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @param context The context to associate with this operation. @@ -251,20 +246,16 @@ Response deleteWithResponse( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response initiateWithResponse( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body, - Context context); + Response initiateWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body, Context context); /** * Initiate a JIT access from a specific Just-in-Time policy configuration. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,9 +264,6 @@ Response initiateWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - JitNetworkAccessRequestInner initiate( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body); + JitNetworkAccessRequestInner initiate(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/LocationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/LocationsClient.java index 9215df998226..3addbc8dafd4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/LocationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/LocationsClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AscLocationInner; -/** An instance of this class provides access to all the operations defined in LocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LocationsClient. + */ public interface LocationsClient { /** * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of locations where ASC saves your data as paginated response with {@link PagedIterable}. @@ -29,7 +31,7 @@ public interface LocationsClient { * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,9 +43,9 @@ public interface LocationsClient { /** * Details of a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,9 +57,9 @@ public interface LocationsClient { /** * Details of a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/MdeOnboardingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/MdeOnboardingsClient.java index f1a31c9a245a..1326b7d829a9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/MdeOnboardingsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/MdeOnboardingsClient.java @@ -11,11 +11,13 @@ import com.azure.resourcemanager.security.fluent.models.MdeOnboardingDataInner; import com.azure.resourcemanager.security.fluent.models.MdeOnboardingDataListInner; -/** An instance of this class provides access to all the operations defined in MdeOnboardingsClient. */ +/** + * An instance of this class provides access to all the operations defined in MdeOnboardingsClient. + */ public interface MdeOnboardingsClient { /** * The configuration or data needed to onboard the machine to MDE. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,7 +29,7 @@ public interface MdeOnboardingsClient { /** * The configuration or data needed to onboard the machine to MDE. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all MDE onboarding data resources. @@ -37,20 +39,20 @@ public interface MdeOnboardingsClient { /** * The default configuration or data needed to onboard the machine to MDE. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource of the configuration or data needed to onboard the machine to MDE along with {@link - * Response}. + * @return the resource of the configuration or data needed to onboard the machine to MDE along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(Context context); /** * The default configuration or data needed to onboard the machine to MDE. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource of the configuration or data needed to onboard the machine to MDE. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OperationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OperationsClient.java index 06e04115fd4b..4c7cab5d704e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OperationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Exposes all available operations for discovery purposes. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of possible operations for Microsoft.Security resource provider as paginated response with {@link - * PagedIterable}. + * @return list of possible operations for Microsoft.Security resource provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Exposes all available operations for discovery purposes. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of possible operations for Microsoft.Security resource provider as paginated response with {@link - * PagedIterable}. + * @return list of possible operations for Microsoft.Security resource provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java index fefcef79c849..5c660d85ed98 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java @@ -11,81 +11,155 @@ import com.azure.resourcemanager.security.fluent.models.PricingInner; import com.azure.resourcemanager.security.fluent.models.PricingListInner; -/** An instance of this class provides access to all the operations defined in PricingsClient. */ +/** + * An instance of this class provides access to all the operations defined in PricingsClient. + */ public interface PricingsClient { /** - * Lists Microsoft Defender for Cloud pricing configurations in the subscription. - * + * Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param pricingName name of the pricing configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of pricing configurations response along with {@link Response}. + * @return the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(Context context); + Response getWithResponse(String scopeId, String pricingName, Context context); /** - * Lists Microsoft Defender for Cloud pricing configurations in the subscription. - * + * Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param pricingName name of the pricing configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of pricing configurations response. + * @return the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). */ @ServiceMethod(returns = ReturnType.SINGLE) - PricingListInner list(); + PricingInner get(String scopeId, String pricingName); /** - * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: + * subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and + * only for plan='VirtualMachines' and subPlan='P1'). + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). * @param pricingName name of the pricing configuration. + * @param pricing Pricing object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a provided Microsoft Defender for Cloud pricing configuration in the subscription along with {@link - * Response}. + * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String pricingName, Context context); + Response updateWithResponse(String scopeId, String pricingName, PricingInner pricing, + Context context); /** - * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: + * subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and + * only for plan='VirtualMachines' and subPlan='P1'). + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). * @param pricingName name of the pricing configuration. + * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a provided Microsoft Defender for Cloud pricing configuration in the subscription. + * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard. */ @ServiceMethod(returns = ReturnType.SINGLE) - PricingInner get(String pricingName); + PricingInner update(String scopeId, String pricingName, PricingInner pricing); /** - * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for + * resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). + * + * @param scopeId The identifier of the resource, (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}). * @param pricingName name of the pricing configuration. - * @param pricing Pricing object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link - * Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String pricingName, PricingInner pricing, Context context); + Response deleteWithResponse(String scopeId, String pricingName, Context context); /** - * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for + * resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). + * + * @param scopeId The identifier of the resource, (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}). * @param pricingName name of the pricing configuration. - * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard. */ @ServiceMethod(returns = ReturnType.SINGLE) - PricingInner update(String pricingName, PricingInner pricing); + void delete(String scopeId, String pricingName); + + /** + * Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. + * Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and + * ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the + * unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list + * includes the pricings set for 'planName1' and 'planName2' only. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param filter OData filter. Optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of pricing configurations response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String scopeId, String filter, Context context); + + /** + * Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. + * Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and + * ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the + * unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list + * includes the pricings set for 'planName1' and 'planName2' only. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of pricing configurations response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PricingListInner list(String scopeId); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceAssessmentsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceAssessmentsClient.java index fb3daa044da5..36f7fb66f1ae 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceAssessmentsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceAssessmentsClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.RegulatoryComplianceAssessmentInner; -/** An instance of this class provides access to all the operations defined in RegulatoryComplianceAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in RegulatoryComplianceAssessmentsClient. + */ public interface RegulatoryComplianceAssessmentsClient { /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,12 +26,12 @@ public interface RegulatoryComplianceAssessmentsClient { * @return list of regulatory compliance assessment response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName); + PagedIterable list(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName); /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param filter OData filter. Optional. @@ -40,15 +42,12 @@ PagedIterable list( * @return list of regulatory compliance assessment response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String filter, - Context context); + PagedIterable list(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String filter, Context context); /** * Supported regulatory compliance details and state for selected assessment. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object. @@ -59,15 +58,12 @@ PagedIterable list( * @return regulatory compliance assessment details and state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName, - Context context); + Response getWithResponse(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName, Context context); /** * Supported regulatory compliance details and state for selected assessment. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object. @@ -77,8 +73,6 @@ Response getWithResponse( * @return regulatory compliance assessment details and state. */ @ServiceMethod(returns = ReturnType.SINGLE) - RegulatoryComplianceAssessmentInner get( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName); + RegulatoryComplianceAssessmentInner get(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceControlsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceControlsClient.java index d7f732d0cdb6..d5da21d07924 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceControlsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceControlsClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.RegulatoryComplianceControlInner; -/** An instance of this class provides access to all the operations defined in RegulatoryComplianceControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in RegulatoryComplianceControlsClient. + */ public interface RegulatoryComplianceControlsClient { /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,7 +29,7 @@ public interface RegulatoryComplianceControlsClient { /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param filter OData filter. Optional. * @param context The context to associate with this operation. @@ -37,12 +39,12 @@ public interface RegulatoryComplianceControlsClient { * @return list of regulatory compliance controls response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String regulatoryComplianceStandardName, String filter, Context context); + PagedIterable list(String regulatoryComplianceStandardName, String filter, + Context context); /** * Selected regulatory compliance control details and state. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param context The context to associate with this operation. @@ -52,12 +54,12 @@ PagedIterable list( * @return regulatory compliance control details and state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName, Context context); + Response getWithResponse(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, Context context); /** * Selected regulatory compliance control details and state. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,6 +68,6 @@ Response getWithResponse( * @return regulatory compliance control details and state. */ @ServiceMethod(returns = ReturnType.SINGLE) - RegulatoryComplianceControlInner get( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName); + RegulatoryComplianceControlInner get(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceStandardsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceStandardsClient.java index 8bb55a3a903c..598e1cdedbd4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceStandardsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/RegulatoryComplianceStandardsClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.RegulatoryComplianceStandardInner; -/** An instance of this class provides access to all the operations defined in RegulatoryComplianceStandardsClient. */ +/** + * An instance of this class provides access to all the operations defined in RegulatoryComplianceStandardsClient. + */ public interface RegulatoryComplianceStandardsClient { /** * Supported regulatory compliance standards details and state. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance standards response as paginated response with {@link PagedIterable}. @@ -25,7 +27,7 @@ public interface RegulatoryComplianceStandardsClient { /** * Supported regulatory compliance standards details and state. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ public interface RegulatoryComplianceStandardsClient { /** * Supported regulatory compliance details state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,12 +49,12 @@ public interface RegulatoryComplianceStandardsClient { * @return regulatory compliance standard details and state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String regulatoryComplianceStandardName, Context context); + Response getWithResponse(String regulatoryComplianceStandardName, + Context context); /** * Supported regulatory compliance details state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ResourceProvidersClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ResourceProvidersClient.java new file mode 100644 index 000000000000..ee02cca57a35 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ResourceProvidersClient.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner; +import com.azure.resourcemanager.security.models.UpdateSensitivitySettingsRequest; + +/** + * An instance of this class provides access to all the operations defined in ResourceProvidersClient. + */ +public interface ResourceProvidersClient { + /** + * Updates data sensitivity settings for sensitive data discovery. + * + * @param sensitivitySettings The data sensitivity settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + updateSensitivitySettingsWithResponse(UpdateSensitivitySettingsRequest sensitivitySettings, Context context); + + /** + * Updates data sensitivity settings for sensitive data discovery. + * + * @param sensitivitySettings The data sensitivity settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GetSensitivitySettingsResponseInner updateSensitivitySettings(UpdateSensitivitySettingsRequest sensitivitySettings); + + /** + * Gets data sensitivity settings for sensitive data discovery. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSensitivitySettingsWithResponse(Context context); + + /** + * Gets data sensitivity settings for sensitive data discovery. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GetSensitivitySettingsResponseInner getSensitivitySettings(); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlDefinitionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlDefinitionsClient.java index 8b27a45f14e1..3997565dc2f1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlDefinitionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlDefinitionsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecureScoreControlDefinitionItemInner; -/** An instance of this class provides access to all the operations defined in SecureScoreControlDefinitionsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecureScoreControlDefinitionsClient. + */ public interface SecureScoreControlDefinitionsClient { /** * List the available security controls, their assessments, and the max score. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security controls definition as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface SecureScoreControlDefinitionsClient { /** * List the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,7 +38,7 @@ public interface SecureScoreControlDefinitionsClient { /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security controls definition as paginated response with {@link PagedIterable}. @@ -46,7 +48,7 @@ public interface SecureScoreControlDefinitionsClient { /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlsClient.java index 43be2302b12d..feb333230160 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlsClient.java @@ -11,42 +11,44 @@ import com.azure.resourcemanager.security.fluent.models.SecureScoreControlDetailsInner; import com.azure.resourcemanager.security.models.ExpandControlsEnum; -/** An instance of this class provides access to all the operations defined in SecureScoreControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecureScoreControlsClient. + */ public interface SecureScoreControlsClient { /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls for a specific initiative within a scope as paginated response with {@link - * PagedIterable}. + * @return all security controls for a specific initiative within a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySecureScore(String secureScoreName); /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls for a specific initiative within a scope as paginated response with {@link - * PagedIterable}. + * @return all security controls for a specific initiative within a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySecureScore( - String secureScoreName, ExpandControlsEnum expand, Context context); + PagedIterable listBySecureScore(String secureScoreName, ExpandControlsEnum expand, + Context context); /** * Get all security controls within a scope. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all security controls within a scope as paginated response with {@link PagedIterable}. @@ -56,7 +58,7 @@ PagedIterable listBySecureScore( /** * Get all security controls within a scope. - * + * * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoresClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoresClient.java index 777ef62405f0..6ae5d40458ad 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoresClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoresClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecureScoreItemInner; -/** An instance of this class provides access to all the operations defined in SecureScoresClient. */ +/** + * An instance of this class provides access to all the operations defined in SecureScoresClient. + */ public interface SecureScoresClient { /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of secure scores as paginated response with {@link PagedIterable}. @@ -25,7 +27,7 @@ public interface SecureScoresClient { /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,15 +40,15 @@ public interface SecureScoresClient { /** * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC * Default initiative, use 'ascScore'. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return secure score for a specific Microsoft Defender for Cloud initiative within your current scope along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String secureScoreName, Context context); @@ -54,9 +56,9 @@ public interface SecureScoresClient { /** * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC * Default initiative, use 'ascScore'. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java index 3632a9b91815..e559f60d43ec 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java @@ -7,460 +7,532 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for SecurityCenter class. */ +/** + * The interface for SecurityCenter class. + */ public interface SecurityCenter { /** * Gets Azure subscription ID. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** - * Gets the MdeOnboardingsClient object to access its operations. - * - * @return the MdeOnboardingsClient object. + * Gets the LocationsClient object to access its operations. + * + * @return the LocationsClient object. */ - MdeOnboardingsClient getMdeOnboardings(); + LocationsClient getLocations(); /** - * Gets the CustomAssessmentAutomationsClient object to access its operations. - * - * @return the CustomAssessmentAutomationsClient object. + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. */ - CustomAssessmentAutomationsClient getCustomAssessmentAutomations(); + OperationsClient getOperations(); /** - * Gets the CustomEntityStoreAssignmentsClient object to access its operations. - * - * @return the CustomEntityStoreAssignmentsClient object. + * Gets the TasksClient object to access its operations. + * + * @return the TasksClient object. */ - CustomEntityStoreAssignmentsClient getCustomEntityStoreAssignments(); + TasksClient getTasks(); /** - * Gets the ComplianceResultsClient object to access its operations. - * - * @return the ComplianceResultsClient object. + * Gets the AutoProvisioningSettingsClient object to access its operations. + * + * @return the AutoProvisioningSettingsClient object. */ - ComplianceResultsClient getComplianceResults(); + AutoProvisioningSettingsClient getAutoProvisioningSettings(); /** - * Gets the PricingsClient object to access its operations. - * - * @return the PricingsClient object. + * Gets the CompliancesClient object to access its operations. + * + * @return the CompliancesClient object. */ - PricingsClient getPricings(); + CompliancesClient getCompliances(); /** - * Gets the AdvancedThreatProtectionsClient object to access its operations. - * - * @return the AdvancedThreatProtectionsClient object. + * Gets the InformationProtectionPoliciesClient object to access its operations. + * + * @return the InformationProtectionPoliciesClient object. */ - AdvancedThreatProtectionsClient getAdvancedThreatProtections(); + InformationProtectionPoliciesClient getInformationProtectionPolicies(); /** - * Gets the DeviceSecurityGroupsClient object to access its operations. - * - * @return the DeviceSecurityGroupsClient object. + * Gets the WorkspaceSettingsClient object to access its operations. + * + * @return the WorkspaceSettingsClient object. */ - DeviceSecurityGroupsClient getDeviceSecurityGroups(); + WorkspaceSettingsClient getWorkspaceSettings(); /** - * Gets the IotSecuritySolutionsClient object to access its operations. - * - * @return the IotSecuritySolutionsClient object. + * Gets the AlertsSuppressionRulesClient object to access its operations. + * + * @return the AlertsSuppressionRulesClient object. */ - IotSecuritySolutionsClient getIotSecuritySolutions(); + AlertsSuppressionRulesClient getAlertsSuppressionRules(); /** - * Gets the IotSecuritySolutionAnalyticsClient object to access its operations. - * - * @return the IotSecuritySolutionAnalyticsClient object. + * Gets the AutomationsClient object to access its operations. + * + * @return the AutomationsClient object. */ - IotSecuritySolutionAnalyticsClient getIotSecuritySolutionAnalytics(); + AutomationsClient getAutomations(); /** - * Gets the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object to access its operations. - * - * @return the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object. + * Gets the RegulatoryComplianceStandardsClient object to access its operations. + * + * @return the RegulatoryComplianceStandardsClient object. */ - IotSecuritySolutionsAnalyticsAggregatedAlertsClient getIotSecuritySolutionsAnalyticsAggregatedAlerts(); + RegulatoryComplianceStandardsClient getRegulatoryComplianceStandards(); /** - * Gets the IotSecuritySolutionsAnalyticsRecommendationsClient object to access its operations. - * - * @return the IotSecuritySolutionsAnalyticsRecommendationsClient object. + * Gets the RegulatoryComplianceControlsClient object to access its operations. + * + * @return the RegulatoryComplianceControlsClient object. */ - IotSecuritySolutionsAnalyticsRecommendationsClient getIotSecuritySolutionsAnalyticsRecommendations(); + RegulatoryComplianceControlsClient getRegulatoryComplianceControls(); /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. + * Gets the RegulatoryComplianceAssessmentsClient object to access its operations. + * + * @return the RegulatoryComplianceAssessmentsClient object. */ - LocationsClient getLocations(); + RegulatoryComplianceAssessmentsClient getRegulatoryComplianceAssessments(); /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. + * Gets the SubAssessmentsClient object to access its operations. + * + * @return the SubAssessmentsClient object. */ - OperationsClient getOperations(); + SubAssessmentsClient getSubAssessments(); /** - * Gets the TasksClient object to access its operations. - * - * @return the TasksClient object. + * Gets the ConnectorsClient object to access its operations. + * + * @return the ConnectorsClient object. */ - TasksClient getTasks(); + ConnectorsClient getConnectors(); /** - * Gets the AutoProvisioningSettingsClient object to access its operations. - * - * @return the AutoProvisioningSettingsClient object. + * Gets the SecurityContactsClient object to access its operations. + * + * @return the SecurityContactsClient object. */ - AutoProvisioningSettingsClient getAutoProvisioningSettings(); + SecurityContactsClient getSecurityContacts(); /** - * Gets the CompliancesClient object to access its operations. - * - * @return the CompliancesClient object. + * Gets the SoftwareInventoriesClient object to access its operations. + * + * @return the SoftwareInventoriesClient object. */ - CompliancesClient getCompliances(); + SoftwareInventoriesClient getSoftwareInventories(); /** - * Gets the InformationProtectionPoliciesClient object to access its operations. - * - * @return the InformationProtectionPoliciesClient object. + * Gets the CustomAssessmentAutomationsClient object to access its operations. + * + * @return the CustomAssessmentAutomationsClient object. */ - InformationProtectionPoliciesClient getInformationProtectionPolicies(); + CustomAssessmentAutomationsClient getCustomAssessmentAutomations(); /** - * Gets the SecurityContactsClient object to access its operations. - * - * @return the SecurityContactsClient object. + * Gets the CustomEntityStoreAssignmentsClient object to access its operations. + * + * @return the CustomEntityStoreAssignmentsClient object. */ - SecurityContactsClient getSecurityContacts(); + CustomEntityStoreAssignmentsClient getCustomEntityStoreAssignments(); /** - * Gets the WorkspaceSettingsClient object to access its operations. - * - * @return the WorkspaceSettingsClient object. + * Gets the MdeOnboardingsClient object to access its operations. + * + * @return the MdeOnboardingsClient object. */ - WorkspaceSettingsClient getWorkspaceSettings(); + MdeOnboardingsClient getMdeOnboardings(); /** - * Gets the RegulatoryComplianceStandardsClient object to access its operations. - * - * @return the RegulatoryComplianceStandardsClient object. + * Gets the GovernanceAssignmentsClient object to access its operations. + * + * @return the GovernanceAssignmentsClient object. */ - RegulatoryComplianceStandardsClient getRegulatoryComplianceStandards(); + GovernanceAssignmentsClient getGovernanceAssignments(); /** - * Gets the RegulatoryComplianceControlsClient object to access its operations. - * - * @return the RegulatoryComplianceControlsClient object. + * Gets the GovernanceRulesClient object to access its operations. + * + * @return the GovernanceRulesClient object. */ - RegulatoryComplianceControlsClient getRegulatoryComplianceControls(); + GovernanceRulesClient getGovernanceRules(); /** - * Gets the RegulatoryComplianceAssessmentsClient object to access its operations. - * - * @return the RegulatoryComplianceAssessmentsClient object. + * Gets the ApplicationsClient object to access its operations. + * + * @return the ApplicationsClient object. */ - RegulatoryComplianceAssessmentsClient getRegulatoryComplianceAssessments(); + ApplicationsClient getApplications(); /** - * Gets the SubAssessmentsClient object to access its operations. - * - * @return the SubAssessmentsClient object. + * Gets the ApplicationOperationsClient object to access its operations. + * + * @return the ApplicationOperationsClient object. */ - SubAssessmentsClient getSubAssessments(); + ApplicationOperationsClient getApplicationOperations(); /** - * Gets the AutomationsClient object to access its operations. - * - * @return the AutomationsClient object. + * Gets the SecurityConnectorApplicationsClient object to access its operations. + * + * @return the SecurityConnectorApplicationsClient object. */ - AutomationsClient getAutomations(); + SecurityConnectorApplicationsClient getSecurityConnectorApplications(); /** - * Gets the AlertsSuppressionRulesClient object to access its operations. - * - * @return the AlertsSuppressionRulesClient object. + * Gets the SecurityConnectorApplicationOperationsClient object to access its operations. + * + * @return the SecurityConnectorApplicationOperationsClient object. */ - AlertsSuppressionRulesClient getAlertsSuppressionRules(); + SecurityConnectorApplicationOperationsClient getSecurityConnectorApplicationOperations(); /** - * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. - * - * @return the ServerVulnerabilityAssessmentsClient object. + * Gets the DefenderForStoragesClient object to access its operations. + * + * @return the DefenderForStoragesClient object. */ - ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments(); + DefenderForStoragesClient getDefenderForStorages(); /** - * Gets the AssessmentsMetadatasClient object to access its operations. - * - * @return the AssessmentsMetadatasClient object. + * Gets the SecurityOperatorsClient object to access its operations. + * + * @return the SecurityOperatorsClient object. */ - AssessmentsMetadatasClient getAssessmentsMetadatas(); + SecurityOperatorsClient getSecurityOperators(); /** - * Gets the AssessmentsClient object to access its operations. - * - * @return the AssessmentsClient object. + * Gets the SqlVulnerabilityAssessmentBaselineRulesClient object to access its operations. + * + * @return the SqlVulnerabilityAssessmentBaselineRulesClient object. */ - AssessmentsClient getAssessments(); + SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessmentBaselineRules(); /** - * Gets the AdaptiveApplicationControlsClient object to access its operations. - * - * @return the AdaptiveApplicationControlsClient object. + * Gets the SqlVulnerabilityAssessmentScansClient object to access its operations. + * + * @return the SqlVulnerabilityAssessmentScansClient object. */ - AdaptiveApplicationControlsClient getAdaptiveApplicationControls(); + SqlVulnerabilityAssessmentScansClient getSqlVulnerabilityAssessmentScans(); /** - * Gets the AdaptiveNetworkHardeningsClient object to access its operations. - * - * @return the AdaptiveNetworkHardeningsClient object. + * Gets the SqlVulnerabilityAssessmentScanResultsClient object to access its operations. + * + * @return the SqlVulnerabilityAssessmentScanResultsClient object. */ - AdaptiveNetworkHardeningsClient getAdaptiveNetworkHardenings(); + SqlVulnerabilityAssessmentScanResultsClient getSqlVulnerabilityAssessmentScanResults(); /** - * Gets the AllowedConnectionsClient object to access its operations. - * - * @return the AllowedConnectionsClient object. + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. */ - AllowedConnectionsClient getAllowedConnections(); + ResourceProvidersClient getResourceProviders(); /** - * Gets the TopologiesClient object to access its operations. - * - * @return the TopologiesClient object. + * Gets the SensitivitySettingsClient object to access its operations. + * + * @return the SensitivitySettingsClient object. */ - TopologiesClient getTopologies(); + SensitivitySettingsClient getSensitivitySettings(); /** - * Gets the JitNetworkAccessPoliciesClient object to access its operations. - * - * @return the JitNetworkAccessPoliciesClient object. + * Gets the HealthReportsClient object to access its operations. + * + * @return the HealthReportsClient object. */ - JitNetworkAccessPoliciesClient getJitNetworkAccessPolicies(); + HealthReportsClient getHealthReports(); /** - * Gets the DiscoveredSecuritySolutionsClient object to access its operations. - * - * @return the DiscoveredSecuritySolutionsClient object. + * Gets the AzureDevOpsOrgsClient object to access its operations. + * + * @return the AzureDevOpsOrgsClient object. */ - DiscoveredSecuritySolutionsClient getDiscoveredSecuritySolutions(); + AzureDevOpsOrgsClient getAzureDevOpsOrgs(); /** - * Gets the SecuritySolutionsReferenceDatasClient object to access its operations. - * - * @return the SecuritySolutionsReferenceDatasClient object. + * Gets the AzureDevOpsProjectsClient object to access its operations. + * + * @return the AzureDevOpsProjectsClient object. */ - SecuritySolutionsReferenceDatasClient getSecuritySolutionsReferenceDatas(); + AzureDevOpsProjectsClient getAzureDevOpsProjects(); /** - * Gets the ExternalSecuritySolutionsClient object to access its operations. - * - * @return the ExternalSecuritySolutionsClient object. + * Gets the AzureDevOpsReposClient object to access its operations. + * + * @return the AzureDevOpsReposClient object. */ - ExternalSecuritySolutionsClient getExternalSecuritySolutions(); + AzureDevOpsReposClient getAzureDevOpsRepos(); /** - * Gets the SecureScoresClient object to access its operations. - * - * @return the SecureScoresClient object. + * Gets the DevOpsConfigurationsClient object to access its operations. + * + * @return the DevOpsConfigurationsClient object. */ - SecureScoresClient getSecureScores(); + DevOpsConfigurationsClient getDevOpsConfigurations(); /** - * Gets the SecureScoreControlsClient object to access its operations. - * - * @return the SecureScoreControlsClient object. + * Gets the GitHubOwnersClient object to access its operations. + * + * @return the GitHubOwnersClient object. */ - SecureScoreControlsClient getSecureScoreControls(); + GitHubOwnersClient getGitHubOwners(); /** - * Gets the SecureScoreControlDefinitionsClient object to access its operations. - * - * @return the SecureScoreControlDefinitionsClient object. + * Gets the GitHubReposClient object to access its operations. + * + * @return the GitHubReposClient object. */ - SecureScoreControlDefinitionsClient getSecureScoreControlDefinitions(); + GitHubReposClient getGitHubRepos(); /** - * Gets the SecuritySolutionsClient object to access its operations. - * - * @return the SecuritySolutionsClient object. + * Gets the GitLabGroupsClient object to access its operations. + * + * @return the GitLabGroupsClient object. */ - SecuritySolutionsClient getSecuritySolutions(); + GitLabGroupsClient getGitLabGroups(); /** - * Gets the ConnectorsClient object to access its operations. - * - * @return the ConnectorsClient object. + * Gets the GitLabSubgroupsClient object to access its operations. + * + * @return the GitLabSubgroupsClient object. */ - ConnectorsClient getConnectors(); + GitLabSubgroupsClient getGitLabSubgroups(); /** - * Gets the AlertsClient object to access its operations. - * - * @return the AlertsClient object. + * Gets the GitLabProjectsClient object to access its operations. + * + * @return the GitLabProjectsClient object. */ - AlertsClient getAlerts(); + GitLabProjectsClient getGitLabProjects(); /** - * Gets the SettingsClient object to access its operations. - * - * @return the SettingsClient object. + * Gets the DevOpsOperationResultsClient object to access its operations. + * + * @return the DevOpsOperationResultsClient object. */ - SettingsClient getSettings(); + DevOpsOperationResultsClient getDevOpsOperationResults(); /** - * Gets the IngestionSettingsClient object to access its operations. - * - * @return the IngestionSettingsClient object. + * Gets the SecurityConnectorsClient object to access its operations. + * + * @return the SecurityConnectorsClient object. */ - IngestionSettingsClient getIngestionSettings(); + SecurityConnectorsClient getSecurityConnectors(); /** - * Gets the SoftwareInventoriesClient object to access its operations. - * - * @return the SoftwareInventoriesClient object. + * Gets the ComplianceResultsClient object to access its operations. + * + * @return the ComplianceResultsClient object. */ - SoftwareInventoriesClient getSoftwareInventories(); + ComplianceResultsClient getComplianceResults(); /** - * Gets the GovernanceRulesClient object to access its operations. - * - * @return the GovernanceRulesClient object. + * Gets the AdvancedThreatProtectionsClient object to access its operations. + * + * @return the AdvancedThreatProtectionsClient object. */ - GovernanceRulesClient getGovernanceRules(); + AdvancedThreatProtectionsClient getAdvancedThreatProtections(); /** - * Gets the GovernanceAssignmentsClient object to access its operations. - * - * @return the GovernanceAssignmentsClient object. + * Gets the DeviceSecurityGroupsClient object to access its operations. + * + * @return the DeviceSecurityGroupsClient object. */ - GovernanceAssignmentsClient getGovernanceAssignments(); + DeviceSecurityGroupsClient getDeviceSecurityGroups(); /** - * Gets the ApplicationsClient object to access its operations. - * - * @return the ApplicationsClient object. + * Gets the IotSecuritySolutionAnalyticsClient object to access its operations. + * + * @return the IotSecuritySolutionAnalyticsClient object. */ - ApplicationsClient getApplications(); + IotSecuritySolutionAnalyticsClient getIotSecuritySolutionAnalytics(); /** - * Gets the ApplicationOperationsClient object to access its operations. - * - * @return the ApplicationOperationsClient object. + * Gets the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object to access its operations. + * + * @return the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object. */ - ApplicationOperationsClient getApplicationOperations(); + IotSecuritySolutionsAnalyticsAggregatedAlertsClient getIotSecuritySolutionsAnalyticsAggregatedAlerts(); /** - * Gets the SecurityConnectorApplicationsClient object to access its operations. - * - * @return the SecurityConnectorApplicationsClient object. + * Gets the IotSecuritySolutionsAnalyticsRecommendationsClient object to access its operations. + * + * @return the IotSecuritySolutionsAnalyticsRecommendationsClient object. */ - SecurityConnectorApplicationsClient getSecurityConnectorApplications(); + IotSecuritySolutionsAnalyticsRecommendationsClient getIotSecuritySolutionsAnalyticsRecommendations(); /** - * Gets the SecurityConnectorApplicationOperationsClient object to access its operations. - * - * @return the SecurityConnectorApplicationOperationsClient object. + * Gets the IotSecuritySolutionsClient object to access its operations. + * + * @return the IotSecuritySolutionsClient object. */ - SecurityConnectorApplicationOperationsClient getSecurityConnectorApplicationOperations(); + IotSecuritySolutionsClient getIotSecuritySolutions(); /** - * Gets the ApiCollectionsClient object to access its operations. - * - * @return the ApiCollectionsClient object. + * Gets the AdaptiveNetworkHardeningsClient object to access its operations. + * + * @return the AdaptiveNetworkHardeningsClient object. */ - ApiCollectionsClient getApiCollections(); + AdaptiveNetworkHardeningsClient getAdaptiveNetworkHardenings(); /** - * Gets the ApiCollectionOnboardingsClient object to access its operations. - * - * @return the ApiCollectionOnboardingsClient object. + * Gets the AllowedConnectionsClient object to access its operations. + * + * @return the AllowedConnectionsClient object. */ - ApiCollectionOnboardingsClient getApiCollectionOnboardings(); + AllowedConnectionsClient getAllowedConnections(); /** - * Gets the ApiCollectionOffboardingsClient object to access its operations. - * - * @return the ApiCollectionOffboardingsClient object. + * Gets the AdaptiveApplicationControlsClient object to access its operations. + * + * @return the AdaptiveApplicationControlsClient object. */ - ApiCollectionOffboardingsClient getApiCollectionOffboardings(); + AdaptiveApplicationControlsClient getAdaptiveApplicationControls(); /** - * Gets the HealthReportsClient object to access its operations. - * - * @return the HealthReportsClient object. + * Gets the DiscoveredSecuritySolutionsClient object to access its operations. + * + * @return the DiscoveredSecuritySolutionsClient object. */ - HealthReportsClient getHealthReports(); + DiscoveredSecuritySolutionsClient getDiscoveredSecuritySolutions(); /** - * Gets the HealthReportOperationsClient object to access its operations. - * - * @return the HealthReportOperationsClient object. + * Gets the ExternalSecuritySolutionsClient object to access its operations. + * + * @return the ExternalSecuritySolutionsClient object. */ - HealthReportOperationsClient getHealthReportOperations(); + ExternalSecuritySolutionsClient getExternalSecuritySolutions(); /** - * Gets the SqlVulnerabilityAssessmentScansClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentScansClient object. + * Gets the JitNetworkAccessPoliciesClient object to access its operations. + * + * @return the JitNetworkAccessPoliciesClient object. */ - SqlVulnerabilityAssessmentScansClient getSqlVulnerabilityAssessmentScans(); + JitNetworkAccessPoliciesClient getJitNetworkAccessPolicies(); /** - * Gets the SqlVulnerabilityAssessmentScanResultsClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentScanResultsClient object. + * Gets the SecureScoresClient object to access its operations. + * + * @return the SecureScoresClient object. */ - SqlVulnerabilityAssessmentScanResultsClient getSqlVulnerabilityAssessmentScanResults(); + SecureScoresClient getSecureScores(); /** - * Gets the SqlVulnerabilityAssessmentBaselineRulesClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentBaselineRulesClient object. + * Gets the SecureScoreControlsClient object to access its operations. + * + * @return the SecureScoreControlsClient object. */ - SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessmentBaselineRules(); + SecureScoreControlsClient getSecureScoreControls(); /** - * Gets the SecurityConnectorsClient object to access its operations. - * - * @return the SecurityConnectorsClient object. + * Gets the SecureScoreControlDefinitionsClient object to access its operations. + * + * @return the SecureScoreControlDefinitionsClient object. */ - SecurityConnectorsClient getSecurityConnectors(); + SecureScoreControlDefinitionsClient getSecureScoreControlDefinitions(); /** - * Gets the SecurityOperatorsClient object to access its operations. - * - * @return the SecurityOperatorsClient object. + * Gets the SecuritySolutionsClient object to access its operations. + * + * @return the SecuritySolutionsClient object. */ - SecurityOperatorsClient getSecurityOperators(); + SecuritySolutionsClient getSecuritySolutions(); + + /** + * Gets the SecuritySolutionsReferenceDatasClient object to access its operations. + * + * @return the SecuritySolutionsReferenceDatasClient object. + */ + SecuritySolutionsReferenceDatasClient getSecuritySolutionsReferenceDatas(); + + /** + * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. + * + * @return the ServerVulnerabilityAssessmentsClient object. + */ + ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments(); + + /** + * Gets the TopologiesClient object to access its operations. + * + * @return the TopologiesClient object. + */ + TopologiesClient getTopologies(); + + /** + * Gets the AssessmentsMetadatasClient object to access its operations. + * + * @return the AssessmentsMetadatasClient object. + */ + AssessmentsMetadatasClient getAssessmentsMetadatas(); + + /** + * Gets the AssessmentsClient object to access its operations. + * + * @return the AssessmentsClient object. + */ + AssessmentsClient getAssessments(); + + /** + * Gets the AlertsClient object to access its operations. + * + * @return the AlertsClient object. + */ + AlertsClient getAlerts(); + + /** + * Gets the SettingsClient object to access its operations. + * + * @return the SettingsClient object. + */ + SettingsClient getSettings(); + + /** + * Gets the ServerVulnerabilityAssessmentsSettingsClient object to access its operations. + * + * @return the ServerVulnerabilityAssessmentsSettingsClient object. + */ + ServerVulnerabilityAssessmentsSettingsClient getServerVulnerabilityAssessmentsSettings(); + + /** + * Gets the ApiCollectionsClient object to access its operations. + * + * @return the ApiCollectionsClient object. + */ + ApiCollectionsClient getApiCollections(); + + /** + * Gets the PricingsClient object to access its operations. + * + * @return the PricingsClient object. + */ + PricingsClient getPricings(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationOperationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationOperationsClient.java index 019e8eefacc0..8a5151b95281 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationOperationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationOperationsClient.java @@ -17,9 +17,9 @@ public interface SecurityConnectorApplicationOperationsClient { /** * Get a specific application for the requested scope by applicationId. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. @@ -29,14 +29,14 @@ public interface SecurityConnectorApplicationOperationsClient { * @return a specific application for the requested scope by applicationId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String securityConnectorName, String applicationId, Context context); + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, Context context); /** * Get a specific application for the requested scope by applicationId. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,9 +49,9 @@ Response getWithResponse( /** * Creates or update a security Application on the given security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. @@ -62,18 +62,14 @@ Response getWithResponse( * @return security Application over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String securityConnectorName, - String applicationId, - ApplicationInner application, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, ApplicationInner application, Context context); /** * Creates or update a security Application on the given security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. @@ -83,14 +79,14 @@ Response createOrUpdateWithResponse( * @return security Application over a given scope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner createOrUpdate( - String resourceGroupName, String securityConnectorName, String applicationId, ApplicationInner application); + ApplicationInner createOrUpdate(String resourceGroupName, String securityConnectorName, String applicationId, + ApplicationInner application); /** * Delete an Application over a given scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. @@ -100,14 +96,14 @@ ApplicationInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String securityConnectorName, String applicationId, Context context); + Response deleteWithResponse(String resourceGroupName, String securityConnectorName, String applicationId, + Context context); /** * Delete an Application over a given scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationsClient.java index bafeb6ef94d4..fd9ab063f4d8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorApplicationsClient.java @@ -10,35 +10,37 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ApplicationInner; -/** An instance of this class provides access to all the operations defined in SecurityConnectorApplicationsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityConnectorApplicationsClient. + */ public interface SecurityConnectorApplicationsClient { /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a security connector level scope as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String securityConnectorName); /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a security connector level scope as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String securityConnectorName, Context context); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorsClient.java index a1a51a3fcf9c..c213bebdc82b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityConnectorsClient.java @@ -11,12 +11,14 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecurityConnectorInner; -/** An instance of this class provides access to all the operations defined in SecurityConnectorsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityConnectorsClient. + */ public interface SecurityConnectorsClient { /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security connectors response as paginated response with {@link PagedIterable}. @@ -27,7 +29,7 @@ public interface SecurityConnectorsClient { /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,9 +42,9 @@ public interface SecurityConnectorsClient { /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -54,9 +56,9 @@ public interface SecurityConnectorsClient { /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -68,9 +70,9 @@ public interface SecurityConnectorsClient { /** * Retrieves details of a specific security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,14 +81,14 @@ public interface SecurityConnectorsClient { * @return the security connector resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String securityConnectorName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String securityConnectorName, Context context); /** * Retrieves details of a specific security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -99,9 +101,9 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a security connector. If a security connector is already created and a subsequent request is * issued for the same security connector id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @param context The context to associate with this operation. @@ -111,18 +113,15 @@ Response getByResourceGroupWithResponse( * @return the security connector resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String securityConnectorName, - SecurityConnectorInner securityConnector, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector, Context context); /** * Creates or updates a security connector. If a security connector is already created and a subsequent request is * issued for the same security connector id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,14 +130,14 @@ Response createOrUpdateWithResponse( * @return the security connector resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityConnectorInner createOrUpdate( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector); + SecurityConnectorInner createOrUpdate(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector); /** * Updates a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @param context The context to associate with this operation. @@ -148,17 +147,14 @@ SecurityConnectorInner createOrUpdate( * @return the security connector resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String securityConnectorName, - SecurityConnectorInner securityConnector, - Context context); + Response updateWithResponse(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector, Context context); /** * Updates a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,14 +163,14 @@ Response updateWithResponse( * @return the security connector resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityConnectorInner update( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector); + SecurityConnectorInner update(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector); /** * Deletes a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,9 +183,9 @@ SecurityConnectorInner update( /** * Deletes a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityContactsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityContactsClient.java index ab1c6851f948..ed6a348f7243 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityContactsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityContactsClient.java @@ -10,12 +10,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecurityContactInner; +import com.azure.resourcemanager.security.models.SecurityContactName; -/** An instance of this class provides access to all the operations defined in SecurityContactsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityContactsClient. + */ public interface SecurityContactsClient { /** * List all security contact configurations for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security contacts response as paginated response with {@link PagedIterable}. @@ -25,7 +28,7 @@ public interface SecurityContactsClient { /** * List all security contact configurations for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,7 +40,7 @@ public interface SecurityContactsClient { /** * Get Default Security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -46,11 +49,11 @@ public interface SecurityContactsClient { * @return default Security contact configurations for the subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String securityContactName, Context context); + Response getWithResponse(SecurityContactName securityContactName, Context context); /** * Get Default Security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,11 +61,11 @@ public interface SecurityContactsClient { * @return default Security contact configurations for the subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityContactInner get(String securityContactName); + SecurityContactInner get(SecurityContactName securityContactName); /** * Create security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param securityContact Security contact object. * @param context The context to associate with this operation. @@ -70,15 +73,15 @@ public interface SecurityContactsClient { * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return contact details and configurations for notifications coming from Microsoft Defender for Cloud along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String securityContactName, SecurityContactInner securityContact, Context context); + Response createWithResponse(SecurityContactName securityContactName, + SecurityContactInner securityContact, Context context); /** * Create security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param securityContact Security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,11 +90,11 @@ Response createWithResponse( * @return contact details and configurations for notifications coming from Microsoft Defender for Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityContactInner create(String securityContactName, SecurityContactInner securityContact); + SecurityContactInner create(SecurityContactName securityContactName, SecurityContactInner securityContact); /** * Delete security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,16 +103,16 @@ Response createWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String securityContactName, Context context); + Response deleteWithResponse(SecurityContactName securityContactName, Context context); /** * Delete security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String securityContactName); + void delete(SecurityContactName securityContactName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityOperatorsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityOperatorsClient.java index bd785ec861db..1971f46dd42e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityOperatorsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityOperatorsClient.java @@ -11,11 +11,13 @@ import com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner; import com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner; -/** An instance of this class provides access to all the operations defined in SecurityOperatorsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityOperatorsClient. + */ public interface SecurityOperatorsClient { /** * Lists Microsoft Defender for Cloud securityOperators in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,7 +30,7 @@ public interface SecurityOperatorsClient { /** * Lists Microsoft Defender for Cloud securityOperators in the subscription. - * + * * @param pricingName name of the pricing configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,7 +42,7 @@ public interface SecurityOperatorsClient { /** * Get a specific security operator for the requested scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -54,7 +56,7 @@ public interface SecurityOperatorsClient { /** * Get a specific security operator for the requested scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,7 +69,7 @@ public interface SecurityOperatorsClient { /** * Creates Microsoft Defender for Cloud security operator on the given scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -77,12 +79,12 @@ public interface SecurityOperatorsClient { * @return security operator under a given subscription and pricing along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String pricingName, String securityOperatorName, Context context); + Response createOrUpdateWithResponse(String pricingName, String securityOperatorName, + Context context); /** * Creates Microsoft Defender for Cloud security operator on the given scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,7 +97,7 @@ Response createOrUpdateWithResponse( /** * Delete Microsoft Defender for Cloud securityOperator in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -109,7 +111,7 @@ Response createOrUpdateWithResponse( /** * Delete Microsoft Defender for Cloud securityOperator in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsClient.java index 172a35c22dd1..f922c9711f74 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecuritySolutionInner; -/** An instance of this class provides access to all the operations defined in SecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecuritySolutionsClient. + */ public interface SecuritySolutionsClient { /** * Gets a list of Security Solutions for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Security Solutions for the subscription as paginated response with {@link PagedIterable}. @@ -25,7 +27,7 @@ public interface SecuritySolutionsClient { /** * Gets a list of Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,11 +39,11 @@ public interface SecuritySolutionsClient { /** * Gets a specific Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param securitySolutionName Name of security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,16 +52,16 @@ public interface SecuritySolutionsClient { * @return a specific Security Solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String ascLocation, String securitySolutionName, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + String securitySolutionName, Context context); /** * Gets a specific Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param securitySolutionName Name of security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsReferenceDatasClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsReferenceDatasClient.java index 2e07125883e6..a9a8c60b23a6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsReferenceDatasClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecuritySolutionsReferenceDatasClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecuritySolutionsReferenceDataListInner; -/** An instance of this class provides access to all the operations defined in SecuritySolutionsReferenceDatasClient. */ +/** + * An instance of this class provides access to all the operations defined in SecuritySolutionsReferenceDatasClient. + */ public interface SecuritySolutionsReferenceDatasClient { /** * Gets a list of all supported Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -26,7 +28,7 @@ public interface SecuritySolutionsReferenceDatasClient { /** * Gets a list of all supported Security Solutions for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all supported Security Solutions for the subscription. @@ -36,9 +38,9 @@ public interface SecuritySolutionsReferenceDatasClient { /** * Gets list of all supported Security Solutions for subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface SecuritySolutionsReferenceDatasClient { /** * Gets list of all supported Security Solutions for subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/HealthReportOperationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SensitivitySettingsClient.java similarity index 52% rename from sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/HealthReportOperationsClient.java rename to sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SensitivitySettingsClient.java index 9127fc7b309b..b8884846a989 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/HealthReportOperationsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SensitivitySettingsClient.java @@ -8,34 +8,31 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.HealthReportInner; +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner; -/** An instance of this class provides access to all the operations defined in HealthReportOperationsClient. */ -public interface HealthReportOperationsClient { +/** + * An instance of this class provides access to all the operations defined in SensitivitySettingsClient. + */ +public interface SensitivitySettingsClient { /** - * Get health report of resource. - * - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type. + * Gets a list with a single sensitivity settings resource. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return health report of resource along with {@link Response}. + * @return a list with a single sensitivity settings resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceId, String healthReportName, Context context); + Response listWithResponse(Context context); /** - * Get health report of resource. - * - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Gets a list with a single sensitivity settings resource. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return health report of resource. + * @return a list with a single sensitivity settings resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - HealthReportInner get(String resourceId, String healthReportName); + GetSensitivitySettingsListResponseInner list(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsClient.java index 26e9c4152c35..375d8f3879e3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentInner; import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentsListInner; -/** An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. + */ public interface ServerVulnerabilityAssessmentsClient { /** * Gets a list of server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -27,18 +29,18 @@ public interface ServerVulnerabilityAssessmentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server vulnerability assessment onboarding statuses on a given resource along with {@link - * Response}. + * @return a list of server vulnerability assessment onboarding statuses on a given resource along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listByExtendedResourceWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + Response listByExtendedResourceWithResponse(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context); /** * Gets a list of server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -48,14 +50,14 @@ Response listByExtendedResourceWithResp * @return a list of server vulnerability assessment onboarding statuses on a given resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerVulnerabilityAssessmentsListInner listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName); + ServerVulnerabilityAssessmentsListInner listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName); /** * Gets a server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -66,14 +68,14 @@ ServerVulnerabilityAssessmentsListInner listByExtendedResource( * @return a server vulnerability assessment onboarding statuses on a given resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + Response getWithResponse(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context); /** * Gets a server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -83,15 +85,15 @@ Response getWithResponse( * @return a server vulnerability assessment onboarding statuses on a given resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerVulnerabilityAssessmentInner get( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName); + ServerVulnerabilityAssessmentInner get(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName); /** * Creating a server vulnerability assessment on a resource, which will onboard a resource for having a * vulnerability assessment on it. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -102,15 +104,15 @@ ServerVulnerabilityAssessmentInner get( * @return describes the server vulnerability assessment details on a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context); /** * Creating a server vulnerability assessment on a resource, which will onboard a resource for having a * vulnerability assessment on it. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -120,14 +122,14 @@ Response createOrUpdateWithResponse( * @return describes the server vulnerability assessment details on a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName); + ServerVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName); /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -137,14 +139,14 @@ ServerVulnerabilityAssessmentInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName); + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName); /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -155,14 +157,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context); /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -175,9 +177,9 @@ SyncPoller, Void> beginDelete( /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -187,6 +189,6 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + void delete(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + Context context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsSettingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsSettingsClient.java new file mode 100644 index 000000000000..10e3f00b359f --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/ServerVulnerabilityAssessmentsSettingsClient.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentsSettingInner; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettingKindName; + +/** + * An instance of this class provides access to all the operations defined in + * ServerVulnerabilityAssessmentsSettingsClient. + */ +public interface ServerVulnerabilityAssessmentsSettingsClient { + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a server vulnerability assessments setting of the requested kind, that is set on the subscription along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + getWithResponse(ServerVulnerabilityAssessmentsSettingKindName settingKind, Context context); + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a server vulnerability assessments setting of the requested kind, that is set on the subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerVulnerabilityAssessmentsSettingInner get(ServerVulnerabilityAssessmentsSettingKindName settingKind); + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a predefined scope. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a base vulnerability assessments setting on servers in the defined scope along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting, Context context); + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a predefined scope. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a base vulnerability assessments setting on servers in the defined scope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerVulnerabilityAssessmentsSettingInner createOrUpdate(ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting); + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(ServerVulnerabilityAssessmentsSettingKindName settingKind, Context context); + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(ServerVulnerabilityAssessmentsSettingKindName settingKind); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SettingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SettingsClient.java index 1d2ca46fd4b9..18ef6bb2b741 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SettingsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SettingsClient.java @@ -10,13 +10,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SettingInner; -import com.azure.resourcemanager.security.models.SettingName; +import com.azure.resourcemanager.security.models.SettingNameAutoGenerated; -/** An instance of this class provides access to all the operations defined in SettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in SettingsClient. + */ public interface SettingsClient { /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription settings list as paginated response with {@link PagedIterable}. @@ -26,7 +28,7 @@ public interface SettingsClient { /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,7 +40,7 @@ public interface SettingsClient { /** * Settings of different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,11 +49,11 @@ public interface SettingsClient { * @return the kind of the security setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(SettingName settingName, Context context); + Response getWithResponse(SettingNameAutoGenerated settingName, Context context); /** * Settings of different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,11 +61,11 @@ public interface SettingsClient { * @return the kind of the security setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingInner get(SettingName settingName); + SettingInner get(SettingNameAutoGenerated settingName); /** * updating settings about different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param setting Setting object. * @param context The context to associate with this operation. @@ -73,11 +75,12 @@ public interface SettingsClient { * @return the kind of the security setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(SettingName settingName, SettingInner setting, Context context); + Response updateWithResponse(SettingNameAutoGenerated settingName, SettingInner setting, + Context context); /** * updating settings about different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param setting Setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,5 +89,5 @@ public interface SettingsClient { * @return the kind of the security setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingInner update(SettingName settingName, SettingInner setting); + SettingInner update(SettingNameAutoGenerated settingName, SettingInner setting); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SoftwareInventoriesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SoftwareInventoriesClient.java index 68430027e194..44c87aa6b343 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SoftwareInventoriesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SoftwareInventoriesClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SoftwareInner; -/** An instance of this class provides access to all the operations defined in SoftwareInventoriesClient. */ +/** + * An instance of this class provides access to all the operations defined in SoftwareInventoriesClient. + */ public interface SoftwareInventoriesClient { /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -27,14 +29,14 @@ public interface SoftwareInventoriesClient { * @return the software inventory of the virtual machine as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName); + PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName); /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -45,38 +47,38 @@ PagedIterable listByExtendedResource( * @return the software inventory of the virtual machine as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context); /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the software inventory of all virtual machines in the subscriptions as paginated response with {@link - * PagedIterable}. + * @return the software inventory of all virtual machines in the subscriptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the software inventory of all virtual machines in the subscriptions as paginated response with {@link - * PagedIterable}. + * @return the software inventory of all virtual machines in the subscriptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Gets a single software data of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -88,19 +90,14 @@ PagedIterable listByExtendedResource( * @return a single software data of the virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String softwareName, - Context context); + Response getWithResponse(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String softwareName, Context context); /** * Gets a single software data of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -111,10 +108,6 @@ Response getWithResponse( * @return a single software data of the virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - SoftwareInner get( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, + SoftwareInner get(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, String softwareName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentBaselineRulesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentBaselineRulesClient.java index 01e57856a5c6..4ddb2758ac86 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentBaselineRulesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentBaselineRulesClient.java @@ -20,7 +20,7 @@ public interface SqlVulnerabilityAssessmentBaselineRulesClient { /** * Creates a Baseline for a rule in a database. Will overwrite any previously existing results. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -32,12 +32,12 @@ public interface SqlVulnerabilityAssessmentBaselineRulesClient { * @return rule results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String ruleId, String workspaceId, String resourceId, RuleResultsInput body, Context context); + Response createOrUpdateWithResponse(String ruleId, String workspaceId, String resourceId, + RuleResultsInput body, Context context); /** * Creates a Baseline for a rule in a database. Will overwrite any previously existing results. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -51,7 +51,7 @@ Response createOrUpdateWithResponse( /** * Gets the results for a given rule in the Baseline. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -66,7 +66,7 @@ Response createOrUpdateWithResponse( /** * Gets the results for a given rule in the Baseline. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -80,7 +80,7 @@ Response createOrUpdateWithResponse( /** * Deletes a rule from the Baseline of a given database. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -95,7 +95,7 @@ Response createOrUpdateWithResponse( /** * Deletes a rule from the Baseline of a given database. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -108,7 +108,7 @@ Response createOrUpdateWithResponse( /** * Gets the results for all rules in the Baseline. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. @@ -122,7 +122,7 @@ Response createOrUpdateWithResponse( /** * Gets the results for all rules in the Baseline. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,7 +135,7 @@ Response createOrUpdateWithResponse( /** * Add a list of baseline rules. Will overwrite any previously existing results (for all rules). - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param body The baseline rules. @@ -146,12 +146,12 @@ Response createOrUpdateWithResponse( * @return a list of rules results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response addWithResponse( - String workspaceId, String resourceId, RulesResultsInput body, Context context); + Response addWithResponse(String workspaceId, String resourceId, RulesResultsInput body, + Context context); /** * Add a list of baseline rules. Will overwrite any previously existing results (for all rules). - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScanResultsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScanResultsClient.java index 9ab7d96a286f..c669c0462cd7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScanResultsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScanResultsClient.java @@ -18,7 +18,7 @@ public interface SqlVulnerabilityAssessmentScanResultsClient { /** * Gets the scan results of a single rule in a scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param scanResultId The rule Id of the results. * @param workspaceId The workspace Id. @@ -30,12 +30,12 @@ public interface SqlVulnerabilityAssessmentScanResultsClient { * @return the scan results of a single rule in a scan record along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String scanId, String scanResultId, String workspaceId, String resourceId, Context context); + Response getWithResponse(String scanId, String scanResultId, String workspaceId, String resourceId, + Context context); /** * Gets the scan results of a single rule in a scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param scanResultId The rule Id of the results. * @param workspaceId The workspace Id. @@ -50,7 +50,7 @@ Response getWithResponse( /** * Gets a list of scan results for a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -65,7 +65,7 @@ Response getWithResponse( /** * Gets a list of scan results for a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScansClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScansClient.java index c586949d0f77..d87cdc9a5583 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScansClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SqlVulnerabilityAssessmentScansClient.java @@ -11,11 +11,13 @@ import com.azure.resourcemanager.security.fluent.models.ScanInner; import com.azure.resourcemanager.security.fluent.models.ScansInner; -/** An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentScansClient. */ +/** + * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentScansClient. + */ public interface SqlVulnerabilityAssessmentScansClient { /** * Gets the scan details of a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -30,7 +32,7 @@ public interface SqlVulnerabilityAssessmentScansClient { /** * Gets the scan details of a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -44,7 +46,7 @@ public interface SqlVulnerabilityAssessmentScansClient { /** * Gets a list of scan records. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. @@ -58,7 +60,7 @@ public interface SqlVulnerabilityAssessmentScansClient { /** * Gets a list of scan records. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SubAssessmentsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SubAssessmentsClient.java index 84dfe1f4ca07..4c3cc7e17d9d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SubAssessmentsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SubAssessmentsClient.java @@ -11,73 +11,75 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecuritySubAssessmentInner; -/** An instance of this class provides access to all the operations defined in SubAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in SubAssessmentsClient. + */ public interface SubAssessmentsClient { /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a subscription scope as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listAll(String scope); /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a subscription scope as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listAll(String scope, Context context); /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security sub-assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope, String assessmentName); /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security sub-assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String scope, String assessmentName, Context context); /** * Get a security sub-assessment on your scanned resource. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type. * @param context The context to associate with this operation. @@ -87,14 +89,14 @@ public interface SubAssessmentsClient { * @return a security sub-assessment on your scanned resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String scope, String assessmentName, String subAssessmentName, Context context); + Response getWithResponse(String scope, String assessmentName, String subAssessmentName, + Context context); /** * Get a security sub-assessment on your scanned resource. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TasksClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TasksClient.java index a2c5a01a49be..5e45193f7e01 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TasksClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TasksClient.java @@ -12,11 +12,13 @@ import com.azure.resourcemanager.security.fluent.models.SecurityTaskInner; import com.azure.resourcemanager.security.models.TaskUpdateActionType; -/** An instance of this class provides access to all the operations defined in TasksClient. */ +/** + * An instance of this class provides access to all the operations defined in TasksClient. + */ public interface TasksClient { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security task recommendations as paginated response with {@link PagedIterable}. @@ -26,7 +28,7 @@ public interface TasksClient { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -39,9 +41,9 @@ public interface TasksClient { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -52,9 +54,9 @@ public interface TasksClient { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,9 +69,9 @@ public interface TasksClient { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,14 +80,14 @@ public interface TasksClient { * @return security task that we recommend to do in order to strengthen security along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getSubscriptionLevelTaskWithResponse( - String ascLocation, String taskName, Context context); + Response getSubscriptionLevelTaskWithResponse(String ascLocation, String taskName, + Context context); /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -97,9 +99,9 @@ Response getSubscriptionLevelTaskWithResponse( /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @param context The context to associate with this operation. @@ -109,14 +111,14 @@ Response getSubscriptionLevelTaskWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateSubscriptionLevelTaskStateWithResponse( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType, Context context); + Response updateSubscriptionLevelTaskStateWithResponse(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType, Context context); /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,16 +126,16 @@ Response updateSubscriptionLevelTaskStateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateSubscriptionLevelTaskState( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType); + void updateSubscriptionLevelTaskState(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType); /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -144,11 +146,11 @@ void updateSubscriptionLevelTaskState( /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,16 +159,16 @@ void updateSubscriptionLevelTaskState( * @return list of security task recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, String ascLocation, String filter, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String ascLocation, String filter, + Context context); /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,16 +177,16 @@ PagedIterable listByResourceGroup( * @return security task that we recommend to do in order to strengthen security along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getResourceGroupLevelTaskWithResponse( - String resourceGroupName, String ascLocation, String taskName, Context context); + Response getResourceGroupLevelTaskWithResponse(String resourceGroupName, String ascLocation, + String taskName, Context context); /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -196,11 +198,11 @@ Response getResourceGroupLevelTaskWithResponse( /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @param context The context to associate with this operation. @@ -210,20 +212,16 @@ Response getResourceGroupLevelTaskWithResponse( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateResourceGroupLevelTaskStateWithResponse( - String resourceGroupName, - String ascLocation, - String taskName, - TaskUpdateActionType taskUpdateActionType, - Context context); + Response updateResourceGroupLevelTaskStateWithResponse(String resourceGroupName, String ascLocation, + String taskName, TaskUpdateActionType taskUpdateActionType, Context context); /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,6 +229,6 @@ Response updateResourceGroupLevelTaskStateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateResourceGroupLevelTaskState( - String resourceGroupName, String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType); + void updateResourceGroupLevelTaskState(String resourceGroupName, String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TopologiesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TopologiesClient.java index 2af153a9fd5d..b0568bbfcf13 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TopologiesClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/TopologiesClient.java @@ -11,68 +11,70 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.TopologyResourceInner; -/** An instance of this class provides access to all the operations defined in TopologiesClient. */ +/** + * An instance of this class provides access to all the operations defined in TopologiesClient. + */ public interface TopologiesClient { /** * Gets a list that allows to build a topology view of a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription as paginated response with {@link - * PagedIterable}. + * @return a list that allows to build a topology view of a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Gets a list that allows to build a topology view of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription as paginated response with {@link - * PagedIterable}. + * @return a list that allows to build a topology view of a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation); /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHomeRegion(String ascLocation, Context context); /** * Gets a specific topology component. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param topologyResourceName Name of a topology resources collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,16 +83,16 @@ public interface TopologiesClient { * @return a specific topology component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String ascLocation, String topologyResourceName, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + String topologyResourceName, Context context); /** * Gets a specific topology component. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param topologyResourceName Name of a topology resources collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/WorkspaceSettingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/WorkspaceSettingsClient.java index 4aeb55188476..246993e8efde 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/WorkspaceSettingsClient.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/WorkspaceSettingsClient.java @@ -11,12 +11,14 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.WorkspaceSettingInner; -/** An instance of this class provides access to all the operations defined in WorkspaceSettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceSettingsClient. + */ public interface WorkspaceSettingsClient { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of workspace settings response as paginated response with {@link PagedIterable}. @@ -27,7 +29,7 @@ public interface WorkspaceSettingsClient { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,7 +42,7 @@ public interface WorkspaceSettingsClient { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param workspaceSettingName Name of the security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +56,7 @@ public interface WorkspaceSettingsClient { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -66,7 +68,7 @@ public interface WorkspaceSettingsClient { /** * creating settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @param context The context to associate with this operation. @@ -76,12 +78,12 @@ public interface WorkspaceSettingsClient { * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting, Context context); + Response createWithResponse(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting, Context context); /** * creating settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,7 +96,7 @@ Response createWithResponse( /** * Settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @param context The context to associate with this operation. @@ -104,12 +106,12 @@ Response createWithResponse( * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting, Context context); + Response updateWithResponse(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting, Context context); /** * Settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,7 +124,7 @@ Response updateWithResponse( /** * Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace. - * + * * @param workspaceSettingName Name of the security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,7 +137,7 @@ Response updateWithResponse( /** * Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveApplicationControlGroupData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveApplicationControlGroupData.java index de1ccc31bb95..3385d4ff5529 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveApplicationControlGroupData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveApplicationControlGroupData.java @@ -16,7 +16,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Represents a machines group and set of rules to be allowed running on a machine. */ +/** + * Represents a machines group and set of rules to be allowed running on a machine. + */ @Fluent public final class AdaptiveApplicationControlGroupData { /* @@ -68,14 +70,16 @@ public final class AdaptiveApplicationControlGroupData { @JsonProperty(value = "pathRecommendations") private List pathRecommendations; - /** Creates an instance of AdaptiveApplicationControlGroupData class. */ + /** + * Creates an instance of AdaptiveApplicationControlGroupData class. + */ public AdaptiveApplicationControlGroupData() { } /** * Get the enforcementMode property: The application control policy enforcement/protection mode of the machine * group. - * + * * @return the enforcementMode value. */ public EnforcementMode enforcementMode() { @@ -85,7 +89,7 @@ public EnforcementMode enforcementMode() { /** * Set the enforcementMode property: The application control policy enforcement/protection mode of the machine * group. - * + * * @param enforcementMode the enforcementMode value to set. * @return the AdaptiveApplicationControlGroupData object itself. */ @@ -97,7 +101,7 @@ public AdaptiveApplicationControlGroupData withEnforcementMode(EnforcementMode e /** * Get the protectionMode property: The protection mode of the collection/file types. Exe/Msi/Script are used for * Windows, Executable is used for Linux. - * + * * @return the protectionMode value. */ public ProtectionMode protectionMode() { @@ -107,7 +111,7 @@ public ProtectionMode protectionMode() { /** * Set the protectionMode property: The protection mode of the collection/file types. Exe/Msi/Script are used for * Windows, Executable is used for Linux. - * + * * @param protectionMode the protectionMode value to set. * @return the AdaptiveApplicationControlGroupData object itself. */ @@ -118,7 +122,7 @@ public AdaptiveApplicationControlGroupData withProtectionMode(ProtectionMode pro /** * Get the configurationStatus property: The configuration status of the machines group or machine or rule. - * + * * @return the configurationStatus value. */ public ConfigurationStatus configurationStatus() { @@ -127,7 +131,7 @@ public ConfigurationStatus configurationStatus() { /** * Get the recommendationStatus property: The initial recommendation status of the machine group or machine. - * + * * @return the recommendationStatus value. */ public RecommendationStatus recommendationStatus() { @@ -136,7 +140,7 @@ public RecommendationStatus recommendationStatus() { /** * Get the issues property: The issues property. - * + * * @return the issues value. */ public List issues() { @@ -145,7 +149,7 @@ public List issues() { /** * Get the sourceSystem property: The source type of the machine group. - * + * * @return the sourceSystem value. */ public SourceSystem sourceSystem() { @@ -154,7 +158,7 @@ public SourceSystem sourceSystem() { /** * Get the vmRecommendations property: The vmRecommendations property. - * + * * @return the vmRecommendations value. */ public List vmRecommendations() { @@ -163,7 +167,7 @@ public List vmRecommendations() { /** * Set the vmRecommendations property: The vmRecommendations property. - * + * * @param vmRecommendations the vmRecommendations value to set. * @return the AdaptiveApplicationControlGroupData object itself. */ @@ -174,7 +178,7 @@ public AdaptiveApplicationControlGroupData withVmRecommendations(List pathRecommendations() { @@ -183,7 +187,7 @@ public List pathRecommendations() { /** * Set the pathRecommendations property: The pathRecommendations property. - * + * * @param pathRecommendations the pathRecommendations value to set. * @return the AdaptiveApplicationControlGroupData object itself. */ @@ -194,7 +198,7 @@ public AdaptiveApplicationControlGroupData withPathRecommendations(List issues() { @@ -135,7 +139,7 @@ public List issues() { /** * Get the sourceSystem property: The source type of the machine group. - * + * * @return the sourceSystem value. */ public SourceSystem sourceSystem() { @@ -144,7 +148,7 @@ public SourceSystem sourceSystem() { /** * Get the vmRecommendations property: The vmRecommendations property. - * + * * @return the vmRecommendations value. */ public List vmRecommendations() { @@ -153,7 +157,7 @@ public List vmRecommendations() { /** * Set the vmRecommendations property: The vmRecommendations property. - * + * * @param vmRecommendations the vmRecommendations value to set. * @return the AdaptiveApplicationControlGroupInner object itself. */ @@ -167,7 +171,7 @@ public AdaptiveApplicationControlGroupInner withVmRecommendations(List pathRecommendations() { @@ -176,7 +180,7 @@ public List pathRecommendations() { /** * Set the pathRecommendations property: The pathRecommendations property. - * + * * @param pathRecommendations the pathRecommendations value to set. * @return the AdaptiveApplicationControlGroupInner object itself. */ @@ -190,15 +194,13 @@ public AdaptiveApplicationControlGroupInner withPathRecommendations(List value; - /** Creates an instance of AdaptiveApplicationControlGroupsInner class. */ + /** + * Creates an instance of AdaptiveApplicationControlGroupsInner class. + */ public AdaptiveApplicationControlGroupsInner() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -35,7 +37,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the AdaptiveApplicationControlGroupsInner object itself. */ @@ -46,7 +48,7 @@ public AdaptiveApplicationControlGroupsInner withValue(List rules() { @@ -45,7 +49,7 @@ public List rules() { /** * Set the rules property: The security rules which are recommended to be effective on the VM. - * + * * @param rules the rules value to set. * @return the AdaptiveNetworkHardeningInner object itself. */ @@ -59,7 +63,7 @@ public AdaptiveNetworkHardeningInner withRules(List rules) { /** * Get the rulesCalculationTime property: The UTC time on which the rules were calculated. - * + * * @return the rulesCalculationTime value. */ public OffsetDateTime rulesCalculationTime() { @@ -68,7 +72,7 @@ public OffsetDateTime rulesCalculationTime() { /** * Set the rulesCalculationTime property: The UTC time on which the rules were calculated. - * + * * @param rulesCalculationTime the rulesCalculationTime value to set. * @return the AdaptiveNetworkHardeningInner object itself. */ @@ -83,7 +87,7 @@ public AdaptiveNetworkHardeningInner withRulesCalculationTime(OffsetDateTime rul /** * Get the effectiveNetworkSecurityGroups property: The Network Security Groups effective on the network interfaces * of the protected resource. - * + * * @return the effectiveNetworkSecurityGroups value. */ public List effectiveNetworkSecurityGroups() { @@ -93,12 +97,12 @@ public List effectiveNetworkSecurityGroups() { /** * Set the effectiveNetworkSecurityGroups property: The Network Security Groups effective on the network interfaces * of the protected resource. - * + * * @param effectiveNetworkSecurityGroups the effectiveNetworkSecurityGroups value to set. * @return the AdaptiveNetworkHardeningInner object itself. */ - public AdaptiveNetworkHardeningInner withEffectiveNetworkSecurityGroups( - List effectiveNetworkSecurityGroups) { + public AdaptiveNetworkHardeningInner + withEffectiveNetworkSecurityGroups(List effectiveNetworkSecurityGroups) { if (this.innerProperties() == null) { this.innerProperties = new AdaptiveNetworkHardeningProperties(); } @@ -108,7 +112,7 @@ public AdaptiveNetworkHardeningInner withEffectiveNetworkSecurityGroups( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveNetworkHardeningProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveNetworkHardeningProperties.java index d674845c0492..c17319b56de3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveNetworkHardeningProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdaptiveNetworkHardeningProperties.java @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Adaptive Network Hardening resource properties. */ +/** + * Adaptive Network Hardening resource properties. + */ @Fluent public final class AdaptiveNetworkHardeningProperties { /* @@ -32,13 +34,15 @@ public final class AdaptiveNetworkHardeningProperties { @JsonProperty(value = "effectiveNetworkSecurityGroups") private List effectiveNetworkSecurityGroups; - /** Creates an instance of AdaptiveNetworkHardeningProperties class. */ + /** + * Creates an instance of AdaptiveNetworkHardeningProperties class. + */ public AdaptiveNetworkHardeningProperties() { } /** * Get the rules property: The security rules which are recommended to be effective on the VM. - * + * * @return the rules value. */ public List rules() { @@ -47,7 +51,7 @@ public List rules() { /** * Set the rules property: The security rules which are recommended to be effective on the VM. - * + * * @param rules the rules value to set. * @return the AdaptiveNetworkHardeningProperties object itself. */ @@ -58,7 +62,7 @@ public AdaptiveNetworkHardeningProperties withRules(List rules) { /** * Get the rulesCalculationTime property: The UTC time on which the rules were calculated. - * + * * @return the rulesCalculationTime value. */ public OffsetDateTime rulesCalculationTime() { @@ -67,7 +71,7 @@ public OffsetDateTime rulesCalculationTime() { /** * Set the rulesCalculationTime property: The UTC time on which the rules were calculated. - * + * * @param rulesCalculationTime the rulesCalculationTime value to set. * @return the AdaptiveNetworkHardeningProperties object itself. */ @@ -79,7 +83,7 @@ public AdaptiveNetworkHardeningProperties withRulesCalculationTime(OffsetDateTim /** * Get the effectiveNetworkSecurityGroups property: The Network Security Groups effective on the network interfaces * of the protected resource. - * + * * @return the effectiveNetworkSecurityGroups value. */ public List effectiveNetworkSecurityGroups() { @@ -89,19 +93,19 @@ public List effectiveNetworkSecurityGroups() { /** * Set the effectiveNetworkSecurityGroups property: The Network Security Groups effective on the network interfaces * of the protected resource. - * + * * @param effectiveNetworkSecurityGroups the effectiveNetworkSecurityGroups value to set. * @return the AdaptiveNetworkHardeningProperties object itself. */ - public AdaptiveNetworkHardeningProperties withEffectiveNetworkSecurityGroups( - List effectiveNetworkSecurityGroups) { + public AdaptiveNetworkHardeningProperties + withEffectiveNetworkSecurityGroups(List effectiveNetworkSecurityGroups) { this.effectiveNetworkSecurityGroups = effectiveNetworkSecurityGroups; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionProperties.java index 3255fbeb3048..76167c2ac2c9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Advanced Threat Protection settings. */ +/** + * The Advanced Threat Protection settings. + */ @Fluent public final class AdvancedThreatProtectionProperties { /* @@ -16,13 +18,15 @@ public final class AdvancedThreatProtectionProperties { @JsonProperty(value = "isEnabled") private Boolean isEnabled; - /** Creates an instance of AdvancedThreatProtectionProperties class. */ + /** + * Creates an instance of AdvancedThreatProtectionProperties class. + */ public AdvancedThreatProtectionProperties() { } /** * Get the isEnabled property: Indicates whether Advanced Threat Protection is enabled. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -31,7 +35,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Indicates whether Advanced Threat Protection is enabled. - * + * * @param isEnabled the isEnabled value to set. * @return the AdvancedThreatProtectionProperties object itself. */ @@ -42,7 +46,7 @@ public AdvancedThreatProtectionProperties withIsEnabled(Boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionSettingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionSettingInner.java index fb63249f6d37..54ca2c870ac1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionSettingInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AdvancedThreatProtectionSettingInner.java @@ -8,7 +8,9 @@ import com.azure.core.management.ProxyResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Advanced Threat Protection resource. */ +/** + * The Advanced Threat Protection resource. + */ @Fluent public final class AdvancedThreatProtectionSettingInner extends ProxyResource { /* @@ -17,13 +19,15 @@ public final class AdvancedThreatProtectionSettingInner extends ProxyResource { @JsonProperty(value = "properties") private AdvancedThreatProtectionProperties innerProperties; - /** Creates an instance of AdvancedThreatProtectionSettingInner class. */ + /** + * Creates an instance of AdvancedThreatProtectionSettingInner class. + */ public AdvancedThreatProtectionSettingInner() { } /** * Get the innerProperties property: The Advanced Threat Protection settings. - * + * * @return the innerProperties value. */ private AdvancedThreatProtectionProperties innerProperties() { @@ -32,7 +36,7 @@ private AdvancedThreatProtectionProperties innerProperties() { /** * Get the isEnabled property: Indicates whether Advanced Threat Protection is enabled. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -41,7 +45,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Indicates whether Advanced Threat Protection is enabled. - * + * * @param isEnabled the isEnabled value to set. * @return the AdvancedThreatProtectionSettingInner object itself. */ @@ -55,7 +59,7 @@ public AdvancedThreatProtectionSettingInner withIsEnabled(Boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java index ac8fd6624bd4..1280f5d3ce19 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java @@ -17,7 +17,9 @@ import java.util.List; import java.util.Map; -/** Security alert. */ +/** + * Security alert. + */ @Fluent public final class AlertInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class AlertInner extends ProxyResource { @JsonProperty(value = "properties") private AlertProperties innerProperties; - /** Creates an instance of AlertInner class. */ + /** + * Creates an instance of AlertInner class. + */ public AlertInner() { } /** * Get the innerProperties property: describes security alert properties. - * + * * @return the innerProperties value. */ private AlertProperties innerProperties() { @@ -41,7 +45,7 @@ private AlertProperties innerProperties() { /** * Get the version property: Schema version. - * + * * @return the version value. */ public String version() { @@ -51,7 +55,7 @@ public String version() { /** * Get the alertType property: Unique identifier for the detection logic (all alert instances from the same * detection logic will have the same alertType). - * + * * @return the alertType value. */ public String alertType() { @@ -60,7 +64,7 @@ public String alertType() { /** * Get the systemAlertId property: Unique identifier for the alert. - * + * * @return the systemAlertId value. */ public String systemAlertId() { @@ -70,7 +74,7 @@ public String systemAlertId() { /** * Get the productComponentName property: The name of Azure Security Center pricing tier which powering this alert. * Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing. - * + * * @return the productComponentName value. */ public String productComponentName() { @@ -79,7 +83,7 @@ public String productComponentName() { /** * Get the alertDisplayName property: The display name of the alert. - * + * * @return the alertDisplayName value. */ public String alertDisplayName() { @@ -88,7 +92,7 @@ public String alertDisplayName() { /** * Get the description property: Description of the suspicious activity that was detected. - * + * * @return the description value. */ public String description() { @@ -98,7 +102,7 @@ public String description() { /** * Get the severity property: The risk level of the threat that was detected. Learn more: * https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified. - * + * * @return the severity value. */ public AlertSeverity severity() { @@ -108,7 +112,7 @@ public AlertSeverity severity() { /** * Get the intent property: The kill chain related intent behind the alert. For list of supported values, and * explanations of Azure Security Center's supported kill chain intents. - * + * * @return the intent value. */ public Intent intent() { @@ -118,7 +122,7 @@ public Intent intent() { /** * Get the startTimeUtc property: The UTC time of the first event or activity included in the alert in ISO8601 * format. - * + * * @return the startTimeUtc value. */ public OffsetDateTime startTimeUtc() { @@ -127,7 +131,7 @@ public OffsetDateTime startTimeUtc() { /** * Get the endTimeUtc property: The UTC time of the last event or activity included in the alert in ISO8601 format. - * + * * @return the endTimeUtc value. */ public OffsetDateTime endTimeUtc() { @@ -138,7 +142,7 @@ public OffsetDateTime endTimeUtc() { * Get the resourceIdentifiers property: The resource identifiers that can be used to direct the alert to the right * product exposure group (tenant, workspace, subscription etc.). There can be multiple identifiers of different * type per alert. - * + * * @return the resourceIdentifiers value. */ public List resourceIdentifiers() { @@ -147,7 +151,7 @@ public List resourceIdentifiers() { /** * Get the remediationSteps property: Manual action items to take to remediate the alert. - * + * * @return the remediationSteps value. */ public List remediationSteps() { @@ -156,7 +160,7 @@ public List remediationSteps() { /** * Get the vendorName property: The name of the vendor that raises the alert. - * + * * @return the vendorName value. */ public String vendorName() { @@ -165,7 +169,7 @@ public String vendorName() { /** * Get the status property: The life cycle status of the alert. - * + * * @return the status value. */ public AlertStatus status() { @@ -174,7 +178,7 @@ public AlertStatus status() { /** * Get the extendedLinks property: Links related to the alert. - * + * * @return the extendedLinks value. */ public List> extendedLinks() { @@ -183,7 +187,7 @@ public List> extendedLinks() { /** * Get the alertUri property: A direct link to the alert page in Azure Portal. - * + * * @return the alertUri value. */ public String alertUri() { @@ -192,7 +196,7 @@ public String alertUri() { /** * Get the timeGeneratedUtc property: The UTC time the alert was generated in ISO8601 format. - * + * * @return the timeGeneratedUtc value. */ public OffsetDateTime timeGeneratedUtc() { @@ -203,7 +207,7 @@ public OffsetDateTime timeGeneratedUtc() { * Get the productName property: The name of the product which published this alert (Microsoft Sentinel, Microsoft * Defender for Identity, Microsoft Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender for * Cloud Apps, and so on). - * + * * @return the productName value. */ public String productName() { @@ -212,7 +216,7 @@ public String productName() { /** * Get the processingEndTimeUtc property: The UTC processing end time of the alert in ISO8601 format. - * + * * @return the processingEndTimeUtc value. */ public OffsetDateTime processingEndTimeUtc() { @@ -221,7 +225,7 @@ public OffsetDateTime processingEndTimeUtc() { /** * Get the entities property: A list of entities related to the alert. - * + * * @return the entities value. */ public List entities() { @@ -231,7 +235,7 @@ public List entities() { /** * Get the isIncident property: This field determines whether the alert is an incident (a compound grouping of * several alerts) or a single alert. - * + * * @return the isIncident value. */ public Boolean isIncident() { @@ -241,7 +245,7 @@ public Boolean isIncident() { /** * Get the correlationKey property: Key for corelating related alerts. Alerts with the same correlation key * considered to be related. - * + * * @return the correlationKey value. */ public String correlationKey() { @@ -250,7 +254,7 @@ public String correlationKey() { /** * Get the extendedProperties property: Custom properties for the alert. - * + * * @return the extendedProperties value. */ public Map extendedProperties() { @@ -259,7 +263,7 @@ public Map extendedProperties() { /** * Set the extendedProperties property: Custom properties for the alert. - * + * * @param extendedProperties the extendedProperties value to set. * @return the AlertInner object itself. */ @@ -273,7 +277,7 @@ public AlertInner withExtendedProperties(Map extendedProperties) /** * Get the compromisedEntity property: The display name of the resource most related to this alert. - * + * * @return the compromisedEntity value. */ public String compromisedEntity() { @@ -282,7 +286,7 @@ public String compromisedEntity() { /** * Get the techniques property: kill chain related techniques behind the alert. - * + * * @return the techniques value. */ public List techniques() { @@ -291,7 +295,7 @@ public List techniques() { /** * Get the subTechniques property: Kill chain related sub-techniques behind the alert. - * + * * @return the subTechniques value. */ public List subTechniques() { @@ -300,7 +304,7 @@ public List subTechniques() { /** * Get the supportingEvidence property: Changing set of properties depending on the supportingEvidence type. - * + * * @return the supportingEvidence value. */ public AlertPropertiesSupportingEvidence supportingEvidence() { @@ -309,7 +313,7 @@ public AlertPropertiesSupportingEvidence supportingEvidence() { /** * Set the supportingEvidence property: Changing set of properties depending on the supportingEvidence type. - * + * * @param supportingEvidence the supportingEvidence value to set. * @return the AlertInner object itself. */ @@ -323,7 +327,7 @@ public AlertInner withSupportingEvidence(AlertPropertiesSupportingEvidence suppo /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertProperties.java index 5a65af987b50..5c3d6c4e3949 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertProperties.java @@ -17,7 +17,9 @@ import java.util.List; import java.util.Map; -/** describes security alert properties. */ +/** + * describes security alert properties. + */ @Fluent public final class AlertProperties { /* @@ -190,13 +192,15 @@ public final class AlertProperties { @JsonProperty(value = "supportingEvidence") private AlertPropertiesSupportingEvidence supportingEvidence; - /** Creates an instance of AlertProperties class. */ + /** + * Creates an instance of AlertProperties class. + */ public AlertProperties() { } /** * Get the version property: Schema version. - * + * * @return the version value. */ public String version() { @@ -206,7 +210,7 @@ public String version() { /** * Get the alertType property: Unique identifier for the detection logic (all alert instances from the same * detection logic will have the same alertType). - * + * * @return the alertType value. */ public String alertType() { @@ -215,7 +219,7 @@ public String alertType() { /** * Get the systemAlertId property: Unique identifier for the alert. - * + * * @return the systemAlertId value. */ public String systemAlertId() { @@ -225,7 +229,7 @@ public String systemAlertId() { /** * Get the productComponentName property: The name of Azure Security Center pricing tier which powering this alert. * Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing. - * + * * @return the productComponentName value. */ public String productComponentName() { @@ -234,7 +238,7 @@ public String productComponentName() { /** * Get the alertDisplayName property: The display name of the alert. - * + * * @return the alertDisplayName value. */ public String alertDisplayName() { @@ -243,7 +247,7 @@ public String alertDisplayName() { /** * Get the description property: Description of the suspicious activity that was detected. - * + * * @return the description value. */ public String description() { @@ -253,7 +257,7 @@ public String description() { /** * Get the severity property: The risk level of the threat that was detected. Learn more: * https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified. - * + * * @return the severity value. */ public AlertSeverity severity() { @@ -263,7 +267,7 @@ public AlertSeverity severity() { /** * Get the intent property: The kill chain related intent behind the alert. For list of supported values, and * explanations of Azure Security Center's supported kill chain intents. - * + * * @return the intent value. */ public Intent intent() { @@ -273,7 +277,7 @@ public Intent intent() { /** * Get the startTimeUtc property: The UTC time of the first event or activity included in the alert in ISO8601 * format. - * + * * @return the startTimeUtc value. */ public OffsetDateTime startTimeUtc() { @@ -282,7 +286,7 @@ public OffsetDateTime startTimeUtc() { /** * Get the endTimeUtc property: The UTC time of the last event or activity included in the alert in ISO8601 format. - * + * * @return the endTimeUtc value. */ public OffsetDateTime endTimeUtc() { @@ -293,7 +297,7 @@ public OffsetDateTime endTimeUtc() { * Get the resourceIdentifiers property: The resource identifiers that can be used to direct the alert to the right * product exposure group (tenant, workspace, subscription etc.). There can be multiple identifiers of different * type per alert. - * + * * @return the resourceIdentifiers value. */ public List resourceIdentifiers() { @@ -302,7 +306,7 @@ public List resourceIdentifiers() { /** * Get the remediationSteps property: Manual action items to take to remediate the alert. - * + * * @return the remediationSteps value. */ public List remediationSteps() { @@ -311,7 +315,7 @@ public List remediationSteps() { /** * Get the vendorName property: The name of the vendor that raises the alert. - * + * * @return the vendorName value. */ public String vendorName() { @@ -320,7 +324,7 @@ public String vendorName() { /** * Get the status property: The life cycle status of the alert. - * + * * @return the status value. */ public AlertStatus status() { @@ -329,7 +333,7 @@ public AlertStatus status() { /** * Get the extendedLinks property: Links related to the alert. - * + * * @return the extendedLinks value. */ public List> extendedLinks() { @@ -338,7 +342,7 @@ public List> extendedLinks() { /** * Get the alertUri property: A direct link to the alert page in Azure Portal. - * + * * @return the alertUri value. */ public String alertUri() { @@ -347,7 +351,7 @@ public String alertUri() { /** * Get the timeGeneratedUtc property: The UTC time the alert was generated in ISO8601 format. - * + * * @return the timeGeneratedUtc value. */ public OffsetDateTime timeGeneratedUtc() { @@ -358,7 +362,7 @@ public OffsetDateTime timeGeneratedUtc() { * Get the productName property: The name of the product which published this alert (Microsoft Sentinel, Microsoft * Defender for Identity, Microsoft Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender for * Cloud Apps, and so on). - * + * * @return the productName value. */ public String productName() { @@ -367,7 +371,7 @@ public String productName() { /** * Get the processingEndTimeUtc property: The UTC processing end time of the alert in ISO8601 format. - * + * * @return the processingEndTimeUtc value. */ public OffsetDateTime processingEndTimeUtc() { @@ -376,7 +380,7 @@ public OffsetDateTime processingEndTimeUtc() { /** * Get the entities property: A list of entities related to the alert. - * + * * @return the entities value. */ public List entities() { @@ -386,7 +390,7 @@ public List entities() { /** * Get the isIncident property: This field determines whether the alert is an incident (a compound grouping of * several alerts) or a single alert. - * + * * @return the isIncident value. */ public Boolean isIncident() { @@ -396,7 +400,7 @@ public Boolean isIncident() { /** * Get the correlationKey property: Key for corelating related alerts. Alerts with the same correlation key * considered to be related. - * + * * @return the correlationKey value. */ public String correlationKey() { @@ -405,7 +409,7 @@ public String correlationKey() { /** * Get the extendedProperties property: Custom properties for the alert. - * + * * @return the extendedProperties value. */ public Map extendedProperties() { @@ -414,7 +418,7 @@ public Map extendedProperties() { /** * Set the extendedProperties property: Custom properties for the alert. - * + * * @param extendedProperties the extendedProperties value to set. * @return the AlertProperties object itself. */ @@ -425,7 +429,7 @@ public AlertProperties withExtendedProperties(Map extendedProper /** * Get the compromisedEntity property: The display name of the resource most related to this alert. - * + * * @return the compromisedEntity value. */ public String compromisedEntity() { @@ -434,7 +438,7 @@ public String compromisedEntity() { /** * Get the techniques property: kill chain related techniques behind the alert. - * + * * @return the techniques value. */ public List techniques() { @@ -443,7 +447,7 @@ public List techniques() { /** * Get the subTechniques property: Kill chain related sub-techniques behind the alert. - * + * * @return the subTechniques value. */ public List subTechniques() { @@ -452,7 +456,7 @@ public List subTechniques() { /** * Get the supportingEvidence property: Changing set of properties depending on the supportingEvidence type. - * + * * @return the supportingEvidence value. */ public AlertPropertiesSupportingEvidence supportingEvidence() { @@ -461,7 +465,7 @@ public AlertPropertiesSupportingEvidence supportingEvidence() { /** * Set the supportingEvidence property: Changing set of properties depending on the supportingEvidence type. - * + * * @param supportingEvidence the supportingEvidence value to set. * @return the AlertProperties object itself. */ @@ -472,7 +476,7 @@ public AlertProperties withSupportingEvidence(AlertPropertiesSupportingEvidence /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertSyncSettingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertSyncSettingProperties.java index fe3186458ebb..95d1855ae1f9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertSyncSettingProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertSyncSettingProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The alert sync setting properties. */ +/** + * The alert sync setting properties. + */ @Fluent public final class AlertSyncSettingProperties { /* @@ -16,13 +18,15 @@ public final class AlertSyncSettingProperties { @JsonProperty(value = "enabled", required = true) private boolean enabled; - /** Creates an instance of AlertSyncSettingProperties class. */ + /** + * Creates an instance of AlertSyncSettingProperties class. + */ public AlertSyncSettingProperties() { } /** * Get the enabled property: Is the alert sync setting enabled. - * + * * @return the enabled value. */ public boolean enabled() { @@ -31,7 +35,7 @@ public boolean enabled() { /** * Set the enabled property: Is the alert sync setting enabled. - * + * * @param enabled the enabled value to set. * @return the AlertSyncSettingProperties object itself. */ @@ -42,7 +46,7 @@ public AlertSyncSettingProperties withEnabled(boolean enabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleInner.java index 110197b8998b..236997fedc02 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Describes the suppression rule. */ +/** + * Describes the suppression rule. + */ @Fluent public final class AlertsSuppressionRuleInner extends ProxyResource { /* @@ -20,13 +22,15 @@ public final class AlertsSuppressionRuleInner extends ProxyResource { @JsonProperty(value = "properties") private AlertsSuppressionRuleProperties innerProperties; - /** Creates an instance of AlertsSuppressionRuleInner class. */ + /** + * Creates an instance of AlertsSuppressionRuleInner class. + */ public AlertsSuppressionRuleInner() { } /** * Get the innerProperties property: describes AlertsSuppressionRule properties. - * + * * @return the innerProperties value. */ private AlertsSuppressionRuleProperties innerProperties() { @@ -35,7 +39,7 @@ private AlertsSuppressionRuleProperties innerProperties() { /** * Get the alertType property: Type of the alert to automatically suppress. For all alert types, use '*'. - * + * * @return the alertType value. */ public String alertType() { @@ -44,7 +48,7 @@ public String alertType() { /** * Set the alertType property: Type of the alert to automatically suppress. For all alert types, use '*'. - * + * * @param alertType the alertType value to set. * @return the AlertsSuppressionRuleInner object itself. */ @@ -58,7 +62,7 @@ public AlertsSuppressionRuleInner withAlertType(String alertType) { /** * Get the lastModifiedUtc property: The last time this rule was modified. - * + * * @return the lastModifiedUtc value. */ public OffsetDateTime lastModifiedUtc() { @@ -67,8 +71,8 @@ public OffsetDateTime lastModifiedUtc() { /** * Get the expirationDateUtc property: Expiration date of the rule, if value is not provided or provided as null - * this field will default to the maximum allowed expiration date. - * + * there will no expiration at all. + * * @return the expirationDateUtc value. */ public OffsetDateTime expirationDateUtc() { @@ -77,8 +81,8 @@ public OffsetDateTime expirationDateUtc() { /** * Set the expirationDateUtc property: Expiration date of the rule, if value is not provided or provided as null - * this field will default to the maximum allowed expiration date. - * + * there will no expiration at all. + * * @param expirationDateUtc the expirationDateUtc value to set. * @return the AlertsSuppressionRuleInner object itself. */ @@ -92,7 +96,7 @@ public AlertsSuppressionRuleInner withExpirationDateUtc(OffsetDateTime expiratio /** * Get the reason property: The reason for dismissing the alert. - * + * * @return the reason value. */ public String reason() { @@ -101,7 +105,7 @@ public String reason() { /** * Set the reason property: The reason for dismissing the alert. - * + * * @param reason the reason value to set. * @return the AlertsSuppressionRuleInner object itself. */ @@ -115,7 +119,7 @@ public AlertsSuppressionRuleInner withReason(String reason) { /** * Get the state property: Possible states of the rule. - * + * * @return the state value. */ public RuleState state() { @@ -124,7 +128,7 @@ public RuleState state() { /** * Set the state property: Possible states of the rule. - * + * * @param state the state value to set. * @return the AlertsSuppressionRuleInner object itself. */ @@ -138,7 +142,7 @@ public AlertsSuppressionRuleInner withState(RuleState state) { /** * Get the comment property: Any comment regarding the rule. - * + * * @return the comment value. */ public String comment() { @@ -147,7 +151,7 @@ public String comment() { /** * Set the comment property: Any comment regarding the rule. - * + * * @param comment the comment value to set. * @return the AlertsSuppressionRuleInner object itself. */ @@ -161,7 +165,7 @@ public AlertsSuppressionRuleInner withComment(String comment) { /** * Get the suppressionAlertsScope property: The suppression conditions. - * + * * @return the suppressionAlertsScope value. */ public SuppressionAlertsScope suppressionAlertsScope() { @@ -170,7 +174,7 @@ public SuppressionAlertsScope suppressionAlertsScope() { /** * Set the suppressionAlertsScope property: The suppression conditions. - * + * * @param suppressionAlertsScope the suppressionAlertsScope value to set. * @return the AlertsSuppressionRuleInner object itself. */ @@ -184,7 +188,7 @@ public AlertsSuppressionRuleInner withSuppressionAlertsScope(SuppressionAlertsSc /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleProperties.java index 3ec48688de44..3f778272a158 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertsSuppressionRuleProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** describes AlertsSuppressionRule properties. */ +/** + * describes AlertsSuppressionRule properties. + */ @Fluent public final class AlertsSuppressionRuleProperties { /* @@ -27,8 +29,7 @@ public final class AlertsSuppressionRuleProperties { private OffsetDateTime lastModifiedUtc; /* - * Expiration date of the rule, if value is not provided or provided as null this field will default to the maximum - * allowed expiration date. + * Expiration date of the rule, if value is not provided or provided as null there will no expiration at all */ @JsonProperty(value = "expirationDateUtc") private OffsetDateTime expirationDateUtc; @@ -57,13 +58,15 @@ public final class AlertsSuppressionRuleProperties { @JsonProperty(value = "suppressionAlertsScope") private SuppressionAlertsScope suppressionAlertsScope; - /** Creates an instance of AlertsSuppressionRuleProperties class. */ + /** + * Creates an instance of AlertsSuppressionRuleProperties class. + */ public AlertsSuppressionRuleProperties() { } /** * Get the alertType property: Type of the alert to automatically suppress. For all alert types, use '*'. - * + * * @return the alertType value. */ public String alertType() { @@ -72,7 +75,7 @@ public String alertType() { /** * Set the alertType property: Type of the alert to automatically suppress. For all alert types, use '*'. - * + * * @param alertType the alertType value to set. * @return the AlertsSuppressionRuleProperties object itself. */ @@ -83,7 +86,7 @@ public AlertsSuppressionRuleProperties withAlertType(String alertType) { /** * Get the lastModifiedUtc property: The last time this rule was modified. - * + * * @return the lastModifiedUtc value. */ public OffsetDateTime lastModifiedUtc() { @@ -92,8 +95,8 @@ public OffsetDateTime lastModifiedUtc() { /** * Get the expirationDateUtc property: Expiration date of the rule, if value is not provided or provided as null - * this field will default to the maximum allowed expiration date. - * + * there will no expiration at all. + * * @return the expirationDateUtc value. */ public OffsetDateTime expirationDateUtc() { @@ -102,8 +105,8 @@ public OffsetDateTime expirationDateUtc() { /** * Set the expirationDateUtc property: Expiration date of the rule, if value is not provided or provided as null - * this field will default to the maximum allowed expiration date. - * + * there will no expiration at all. + * * @param expirationDateUtc the expirationDateUtc value to set. * @return the AlertsSuppressionRuleProperties object itself. */ @@ -114,7 +117,7 @@ public AlertsSuppressionRuleProperties withExpirationDateUtc(OffsetDateTime expi /** * Get the reason property: The reason for dismissing the alert. - * + * * @return the reason value. */ public String reason() { @@ -123,7 +126,7 @@ public String reason() { /** * Set the reason property: The reason for dismissing the alert. - * + * * @param reason the reason value to set. * @return the AlertsSuppressionRuleProperties object itself. */ @@ -134,7 +137,7 @@ public AlertsSuppressionRuleProperties withReason(String reason) { /** * Get the state property: Possible states of the rule. - * + * * @return the state value. */ public RuleState state() { @@ -143,7 +146,7 @@ public RuleState state() { /** * Set the state property: Possible states of the rule. - * + * * @param state the state value to set. * @return the AlertsSuppressionRuleProperties object itself. */ @@ -154,7 +157,7 @@ public AlertsSuppressionRuleProperties withState(RuleState state) { /** * Get the comment property: Any comment regarding the rule. - * + * * @return the comment value. */ public String comment() { @@ -163,7 +166,7 @@ public String comment() { /** * Set the comment property: Any comment regarding the rule. - * + * * @param comment the comment value to set. * @return the AlertsSuppressionRuleProperties object itself. */ @@ -174,7 +177,7 @@ public AlertsSuppressionRuleProperties withComment(String comment) { /** * Get the suppressionAlertsScope property: The suppression conditions. - * + * * @return the suppressionAlertsScope value. */ public SuppressionAlertsScope suppressionAlertsScope() { @@ -183,7 +186,7 @@ public SuppressionAlertsScope suppressionAlertsScope() { /** * Set the suppressionAlertsScope property: The suppression conditions. - * + * * @param suppressionAlertsScope the suppressionAlertsScope value to set. * @return the AlertsSuppressionRuleProperties object itself. */ @@ -194,27 +197,21 @@ public AlertsSuppressionRuleProperties withSuppressionAlertsScope(SuppressionAle /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (alertType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertType in model AlertsSuppressionRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property alertType in model AlertsSuppressionRuleProperties")); } if (reason() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property reason in model AlertsSuppressionRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property reason in model AlertsSuppressionRuleProperties")); } if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model AlertsSuppressionRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property state in model AlertsSuppressionRuleProperties")); } if (suppressionAlertsScope() != null) { suppressionAlertsScope().validate(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceInner.java index 7c222562dfcb..8e5129cea270 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceInner.java @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** The resource whose properties describes the allowed traffic between Azure resources. */ +/** + * The resource whose properties describes the allowed traffic between Azure resources. + */ @Immutable public final class AllowedConnectionsResourceInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class AllowedConnectionsResourceInner extends ProxyResource { @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; - /** Creates an instance of AllowedConnectionsResourceInner class. */ + /** + * Creates an instance of AllowedConnectionsResourceInner class. + */ public AllowedConnectionsResourceInner() { } /** * Get the innerProperties property: Describes the allowed traffic between Azure resources. - * + * * @return the innerProperties value. */ private AllowedConnectionsResourceProperties innerProperties() { @@ -41,7 +45,7 @@ private AllowedConnectionsResourceProperties innerProperties() { /** * Get the location property: Location where the resource is stored. - * + * * @return the location value. */ public String location() { @@ -50,7 +54,7 @@ public String location() { /** * Get the calculatedDateTime property: The UTC time on which the allowed connections resource was calculated. - * + * * @return the calculatedDateTime value. */ public OffsetDateTime calculatedDateTime() { @@ -59,7 +63,7 @@ public OffsetDateTime calculatedDateTime() { /** * Get the connectableResources property: List of connectable resources. - * + * * @return the connectableResources value. */ public List connectableResources() { @@ -68,7 +72,7 @@ public List connectableResources() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceProperties.java index 26132bd10a55..65cec8ebc792 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AllowedConnectionsResourceProperties.java @@ -10,7 +10,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Describes the allowed traffic between Azure resources. */ +/** + * Describes the allowed traffic between Azure resources. + */ @Immutable public final class AllowedConnectionsResourceProperties { /* @@ -25,13 +27,15 @@ public final class AllowedConnectionsResourceProperties { @JsonProperty(value = "connectableResources", access = JsonProperty.Access.WRITE_ONLY) private List connectableResources; - /** Creates an instance of AllowedConnectionsResourceProperties class. */ + /** + * Creates an instance of AllowedConnectionsResourceProperties class. + */ public AllowedConnectionsResourceProperties() { } /** * Get the calculatedDateTime property: The UTC time on which the allowed connections resource was calculated. - * + * * @return the calculatedDateTime value. */ public OffsetDateTime calculatedDateTime() { @@ -40,7 +44,7 @@ public OffsetDateTime calculatedDateTime() { /** * Get the connectableResources property: List of connectable resources. - * + * * @return the connectableResources value. */ public List connectableResources() { @@ -49,7 +53,7 @@ public List connectableResources() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionInner.java new file mode 100644 index 000000000000..60fdc7257adb --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionInner.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.security.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An API collection as represented by Microsoft Defender for APIs. + */ +@Immutable +public final class ApiCollectionInner extends ProxyResource { + /* + * Describes the properties of an API collection. + */ + @JsonProperty(value = "properties") + private ApiCollectionProperties innerProperties; + + /** + * Creates an instance of ApiCollectionInner class. + */ + public ApiCollectionInner() { + } + + /** + * Get the innerProperties property: Describes the properties of an API collection. + * + * @return the innerProperties value. + */ + private ApiCollectionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: Gets the provisioning state of the API collection. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the displayName property: The display name of the API collection. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the discoveredVia property: The resource Id of the resource from where this API collection was discovered. + * + * @return the discoveredVia value. + */ + public String discoveredVia() { + return this.innerProperties() == null ? null : this.innerProperties().discoveredVia(); + } + + /** + * Get the baseUrl property: The base URI for this API collection. All endpoints of this API collection extend this + * base URI. + * + * @return the baseUrl value. + */ + public String baseUrl() { + return this.innerProperties() == null ? null : this.innerProperties().baseUrl(); + } + + /** + * Get the numberOfApiEndpoints property: The number of API endpoints discovered in this API collection. + * + * @return the numberOfApiEndpoints value. + */ + public Long numberOfApiEndpoints() { + return this.innerProperties() == null ? null : this.innerProperties().numberOfApiEndpoints(); + } + + /** + * Get the numberOfInactiveApiEndpoints property: The number of API endpoints in this API collection that have not + * received any API traffic in the last 30 days. + * + * @return the numberOfInactiveApiEndpoints value. + */ + public Long numberOfInactiveApiEndpoints() { + return this.innerProperties() == null ? null : this.innerProperties().numberOfInactiveApiEndpoints(); + } + + /** + * Get the numberOfUnauthenticatedApiEndpoints property: The number of API endpoints in this API collection that + * are unauthenticated. + * + * @return the numberOfUnauthenticatedApiEndpoints value. + */ + public Long numberOfUnauthenticatedApiEndpoints() { + return this.innerProperties() == null ? null : this.innerProperties().numberOfUnauthenticatedApiEndpoints(); + } + + /** + * Get the numberOfExternalApiEndpoints property: The number of API endpoints in this API collection for which API + * traffic from the internet was observed. + * + * @return the numberOfExternalApiEndpoints value. + */ + public Long numberOfExternalApiEndpoints() { + return this.innerProperties() == null ? null : this.innerProperties().numberOfExternalApiEndpoints(); + } + + /** + * Get the numberOfApiEndpointsWithSensitiveDataExposed property: The number of API endpoints in this API + * collection which are exposing sensitive data in their requests and/or responses. + * + * @return the numberOfApiEndpointsWithSensitiveDataExposed value. + */ + public Long numberOfApiEndpointsWithSensitiveDataExposed() { + return this.innerProperties() == null ? null + : this.innerProperties().numberOfApiEndpointsWithSensitiveDataExposed(); + } + + /** + * Get the sensitivityLabel property: The highest priority sensitivity label from Microsoft Purview in this API + * collection. + * + * @return the sensitivityLabel value. + */ + public String sensitivityLabel() { + return this.innerProperties() == null ? null : this.innerProperties().sensitivityLabel(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionProperties.java index 951e62c71a5c..ee64ab453eea 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionProperties.java @@ -4,34 +4,94 @@ package com.azure.resourcemanager.security.fluent.models; -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.security.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; -/** Describes the properties of an API collection. */ -@Fluent +/** + * Describes the properties of an API collection. + */ +@Immutable public final class ApiCollectionProperties { /* - * The display name of the Azure API Management API. + * Gets the provisioning state of the API collection. */ - @JsonProperty(value = "displayName") + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The display name of the API collection. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* - * Additional data regarding the API collection. + * The resource Id of the resource from where this API collection was discovered. + */ + @JsonProperty(value = "discoveredVia", access = JsonProperty.Access.WRITE_ONLY) + private String discoveredVia; + + /* + * The base URI for this API collection. All endpoints of this API collection extend this base URI. + */ + @JsonProperty(value = "baseUrl", access = JsonProperty.Access.WRITE_ONLY) + private String baseUrl; + + /* + * The number of API endpoints discovered in this API collection. + */ + @JsonProperty(value = "numberOfApiEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfApiEndpoints; + + /* + * The number of API endpoints in this API collection that have not received any API traffic in the last 30 days. + */ + @JsonProperty(value = "numberOfInactiveApiEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfInactiveApiEndpoints; + + /* + * The number of API endpoints in this API collection that are unauthenticated. */ - @JsonProperty(value = "additionalData") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map additionalData; + @JsonProperty(value = "numberOfUnauthenticatedApiEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfUnauthenticatedApiEndpoints; - /** Creates an instance of ApiCollectionProperties class. */ + /* + * The number of API endpoints in this API collection for which API traffic from the internet was observed. + */ + @JsonProperty(value = "numberOfExternalApiEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfExternalApiEndpoints; + + /* + * The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or + * responses. + */ + @JsonProperty(value = "numberOfApiEndpointsWithSensitiveDataExposed", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfApiEndpointsWithSensitiveDataExposed; + + /* + * The highest priority sensitivity label from Microsoft Purview in this API collection. + */ + @JsonProperty(value = "sensitivityLabel", access = JsonProperty.Access.WRITE_ONLY) + private String sensitivityLabel; + + /** + * Creates an instance of ApiCollectionProperties class. + */ public ApiCollectionProperties() { } /** - * Get the displayName property: The display name of the Azure API Management API. - * + * Get the provisioningState property: Gets the provisioning state of the API collection. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the displayName property: The display name of the API collection. + * * @return the displayName value. */ public String displayName() { @@ -39,39 +99,86 @@ public String displayName() { } /** - * Set the displayName property: The display name of the Azure API Management API. - * - * @param displayName the displayName value to set. - * @return the ApiCollectionProperties object itself. - */ - public ApiCollectionProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; + * Get the discoveredVia property: The resource Id of the resource from where this API collection was discovered. + * + * @return the discoveredVia value. + */ + public String discoveredVia() { + return this.discoveredVia; + } + + /** + * Get the baseUrl property: The base URI for this API collection. All endpoints of this API collection extend this + * base URI. + * + * @return the baseUrl value. + */ + public String baseUrl() { + return this.baseUrl; + } + + /** + * Get the numberOfApiEndpoints property: The number of API endpoints discovered in this API collection. + * + * @return the numberOfApiEndpoints value. + */ + public Long numberOfApiEndpoints() { + return this.numberOfApiEndpoints; + } + + /** + * Get the numberOfInactiveApiEndpoints property: The number of API endpoints in this API collection that have not + * received any API traffic in the last 30 days. + * + * @return the numberOfInactiveApiEndpoints value. + */ + public Long numberOfInactiveApiEndpoints() { + return this.numberOfInactiveApiEndpoints; } /** - * Get the additionalData property: Additional data regarding the API collection. - * - * @return the additionalData value. + * Get the numberOfUnauthenticatedApiEndpoints property: The number of API endpoints in this API collection that + * are unauthenticated. + * + * @return the numberOfUnauthenticatedApiEndpoints value. */ - public Map additionalData() { - return this.additionalData; + public Long numberOfUnauthenticatedApiEndpoints() { + return this.numberOfUnauthenticatedApiEndpoints; } /** - * Set the additionalData property: Additional data regarding the API collection. - * - * @param additionalData the additionalData value to set. - * @return the ApiCollectionProperties object itself. - */ - public ApiCollectionProperties withAdditionalData(Map additionalData) { - this.additionalData = additionalData; - return this; + * Get the numberOfExternalApiEndpoints property: The number of API endpoints in this API collection for which API + * traffic from the internet was observed. + * + * @return the numberOfExternalApiEndpoints value. + */ + public Long numberOfExternalApiEndpoints() { + return this.numberOfExternalApiEndpoints; + } + + /** + * Get the numberOfApiEndpointsWithSensitiveDataExposed property: The number of API endpoints in this API + * collection which are exposing sensitive data in their requests and/or responses. + * + * @return the numberOfApiEndpointsWithSensitiveDataExposed value. + */ + public Long numberOfApiEndpointsWithSensitiveDataExposed() { + return this.numberOfApiEndpointsWithSensitiveDataExposed; + } + + /** + * Get the sensitivityLabel property: The highest priority sensitivity label from Microsoft Purview in this API + * collection. + * + * @return the sensitivityLabel value. + */ + public String sensitivityLabel() { + return this.sensitivityLabel; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionResponseInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionResponseInner.java deleted file mode 100644 index 6224a7ea4eb4..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApiCollectionResponseInner.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** An API collection as represented by Defender for APIs. */ -@Fluent -public final class ApiCollectionResponseInner extends ProxyResource { - /* - * Describes the properties of an API collection. - */ - @JsonProperty(value = "properties") - private ApiCollectionProperties innerProperties; - - /** Creates an instance of ApiCollectionResponseInner class. */ - public ApiCollectionResponseInner() { - } - - /** - * Get the innerProperties property: Describes the properties of an API collection. - * - * @return the innerProperties value. - */ - private ApiCollectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the displayName property: The display name of the Azure API Management API. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name of the Azure API Management API. - * - * @param displayName the displayName value to set. - * @return the ApiCollectionResponseInner object itself. - */ - public ApiCollectionResponseInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ApiCollectionProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the additionalData property: Additional data regarding the API collection. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Set the additionalData property: Additional data regarding the API collection. - * - * @param additionalData the additionalData value to set. - * @return the ApiCollectionResponseInner object itself. - */ - public ApiCollectionResponseInner withAdditionalData(Map additionalData) { - if (this.innerProperties() == null) { - this.innerProperties = new ApiCollectionProperties(); - } - this.innerProperties().withAdditionalData(additionalData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationInner.java index 52bda95475ad..ec4589ff800d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Security Application over a given scope. */ +/** + * Security Application over a given scope. + */ @Fluent public final class ApplicationInner extends ProxyResource { /* @@ -19,13 +21,15 @@ public final class ApplicationInner extends ProxyResource { @JsonProperty(value = "properties") private ApplicationProperties innerProperties; - /** Creates an instance of ApplicationInner class. */ + /** + * Creates an instance of ApplicationInner class. + */ public ApplicationInner() { } /** * Get the innerProperties property: Properties of a security application. - * + * * @return the innerProperties value. */ private ApplicationProperties innerProperties() { @@ -34,7 +38,7 @@ private ApplicationProperties innerProperties() { /** * Get the displayName property: display name of the application. - * + * * @return the displayName value. */ public String displayName() { @@ -43,7 +47,7 @@ public String displayName() { /** * Set the displayName property: display name of the application. - * + * * @param displayName the displayName value to set. * @return the ApplicationInner object itself. */ @@ -57,7 +61,7 @@ public ApplicationInner withDisplayName(String displayName) { /** * Get the description property: description of the application. - * + * * @return the description value. */ public String description() { @@ -66,7 +70,7 @@ public String description() { /** * Set the description property: description of the application. - * + * * @param description the description value to set. * @return the ApplicationInner object itself. */ @@ -80,7 +84,7 @@ public ApplicationInner withDescription(String description) { /** * Get the sourceResourceType property: The application source, what it affects, e.g. Assessments. - * + * * @return the sourceResourceType value. */ public ApplicationSourceResourceType sourceResourceType() { @@ -89,7 +93,7 @@ public ApplicationSourceResourceType sourceResourceType() { /** * Set the sourceResourceType property: The application source, what it affects, e.g. Assessments. - * + * * @param sourceResourceType the sourceResourceType value to set. * @return the ApplicationInner object itself. */ @@ -103,7 +107,7 @@ public ApplicationInner withSourceResourceType(ApplicationSourceResourceType sou /** * Get the conditionSets property: The application conditionSets - see examples. - * + * * @return the conditionSets value. */ public List conditionSets() { @@ -112,7 +116,7 @@ public List conditionSets() { /** * Set the conditionSets property: The application conditionSets - see examples. - * + * * @param conditionSets the conditionSets value to set. * @return the ApplicationInner object itself. */ @@ -126,7 +130,7 @@ public ApplicationInner withConditionSets(List conditionSets) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationProperties.java index bace1b11b0a5..a0d1c03be990 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ApplicationProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes properties of an application. */ +/** + * Describes properties of an application. + */ @Fluent public final class ApplicationProperties { /* @@ -37,13 +39,15 @@ public final class ApplicationProperties { @JsonProperty(value = "conditionSets", required = true) private List conditionSets; - /** Creates an instance of ApplicationProperties class. */ + /** + * Creates an instance of ApplicationProperties class. + */ public ApplicationProperties() { } /** * Get the displayName property: display name of the application. - * + * * @return the displayName value. */ public String displayName() { @@ -52,7 +56,7 @@ public String displayName() { /** * Set the displayName property: display name of the application. - * + * * @param displayName the displayName value to set. * @return the ApplicationProperties object itself. */ @@ -63,7 +67,7 @@ public ApplicationProperties withDisplayName(String displayName) { /** * Get the description property: description of the application. - * + * * @return the description value. */ public String description() { @@ -72,7 +76,7 @@ public String description() { /** * Set the description property: description of the application. - * + * * @param description the description value to set. * @return the ApplicationProperties object itself. */ @@ -83,7 +87,7 @@ public ApplicationProperties withDescription(String description) { /** * Get the sourceResourceType property: The application source, what it affects, e.g. Assessments. - * + * * @return the sourceResourceType value. */ public ApplicationSourceResourceType sourceResourceType() { @@ -92,7 +96,7 @@ public ApplicationSourceResourceType sourceResourceType() { /** * Set the sourceResourceType property: The application source, what it affects, e.g. Assessments. - * + * * @param sourceResourceType the sourceResourceType value to set. * @return the ApplicationProperties object itself. */ @@ -103,7 +107,7 @@ public ApplicationProperties withSourceResourceType(ApplicationSourceResourceTyp /** * Get the conditionSets property: The application conditionSets - see examples. - * + * * @return the conditionSets value. */ public List conditionSets() { @@ -112,7 +116,7 @@ public List conditionSets() { /** * Set the conditionSets property: The application conditionSets - see examples. - * + * * @param conditionSets the conditionSets value to set. * @return the ApplicationProperties object itself. */ @@ -123,21 +127,17 @@ public ApplicationProperties withConditionSets(List conditionSets) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (sourceResourceType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceResourceType in model ApplicationProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceResourceType in model ApplicationProperties")); } if (conditionSets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property conditionSets in model ApplicationProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property conditionSets in model ApplicationProperties")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AscLocationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AscLocationInner.java index 351e2b24190f..698386ce9650 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AscLocationInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AscLocationInner.java @@ -8,7 +8,9 @@ import com.azure.core.management.ProxyResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ASC location of the subscription is in the "name" field. */ +/** + * The ASC location of the subscription is in the "name" field. + */ @Fluent public final class AscLocationInner extends ProxyResource { /* @@ -17,13 +19,15 @@ public final class AscLocationInner extends ProxyResource { @JsonProperty(value = "properties") private Object properties; - /** Creates an instance of AscLocationInner class. */ + /** + * Creates an instance of AscLocationInner class. + */ public AscLocationInner() { } /** * Get the properties property: An empty set of properties. - * + * * @return the properties value. */ public Object properties() { @@ -32,7 +36,7 @@ public Object properties() { /** * Set the properties property: An empty set of properties. - * + * * @param properties the properties value to set. * @return the AscLocationInner object itself. */ @@ -43,7 +47,7 @@ public AscLocationInner withProperties(Object properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingInner.java index 8360f8b33cc3..925be47a8c8d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.AutoProvision; import com.fasterxml.jackson.annotation.JsonProperty; -/** Auto provisioning setting. */ +/** + * Auto provisioning setting. + */ @Fluent public final class AutoProvisioningSettingInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class AutoProvisioningSettingInner extends ProxyResource { @JsonProperty(value = "properties") private AutoProvisioningSettingProperties innerProperties; - /** Creates an instance of AutoProvisioningSettingInner class. */ + /** + * Creates an instance of AutoProvisioningSettingInner class. + */ public AutoProvisioningSettingInner() { } /** * Get the innerProperties property: Auto provisioning setting data. - * + * * @return the innerProperties value. */ private AutoProvisioningSettingProperties innerProperties() { @@ -33,7 +37,7 @@ private AutoProvisioningSettingProperties innerProperties() { /** * Get the autoProvision property: Describes what kind of security agent provisioning action to take. - * + * * @return the autoProvision value. */ public AutoProvision autoProvision() { @@ -42,7 +46,7 @@ public AutoProvision autoProvision() { /** * Set the autoProvision property: Describes what kind of security agent provisioning action to take. - * + * * @param autoProvision the autoProvision value to set. * @return the AutoProvisioningSettingInner object itself. */ @@ -56,7 +60,7 @@ public AutoProvisioningSettingInner withAutoProvision(AutoProvision autoProvisio /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingProperties.java index 52a8ebeec012..f17bd03d8bd3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutoProvisioningSettingProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.AutoProvision; import com.fasterxml.jackson.annotation.JsonProperty; -/** describes properties of an auto provisioning setting. */ +/** + * describes properties of an auto provisioning setting. + */ @Fluent public final class AutoProvisioningSettingProperties { /* @@ -18,13 +20,15 @@ public final class AutoProvisioningSettingProperties { @JsonProperty(value = "autoProvision", required = true) private AutoProvision autoProvision; - /** Creates an instance of AutoProvisioningSettingProperties class. */ + /** + * Creates an instance of AutoProvisioningSettingProperties class. + */ public AutoProvisioningSettingProperties() { } /** * Get the autoProvision property: Describes what kind of security agent provisioning action to take. - * + * * @return the autoProvision value. */ public AutoProvision autoProvision() { @@ -33,7 +37,7 @@ public AutoProvision autoProvision() { /** * Set the autoProvision property: Describes what kind of security agent provisioning action to take. - * + * * @param autoProvision the autoProvision value to set. * @return the AutoProvisioningSettingProperties object itself. */ @@ -44,15 +48,13 @@ public AutoProvisioningSettingProperties withAutoProvision(AutoProvision autoPro /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (autoProvision() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property autoProvision in model AutoProvisioningSettingProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property autoProvision in model AutoProvisioningSettingProperties")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationInner.java index 3881c341098c..ffbb280ca023 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationInner.java @@ -13,7 +13,9 @@ import java.util.List; import java.util.Map; -/** The security automation resource. */ +/** + * The security automation resource. + */ @Fluent public final class AutomationInner extends Resource { /* @@ -22,27 +24,33 @@ public final class AutomationInner extends Resource { @JsonProperty(value = "properties") private AutomationProperties innerProperties; - /** Creates an instance of AutomationInner class. */ + /** + * Creates an instance of AutomationInner class. + */ public AutomationInner() { } /** * Get the innerProperties property: Security automation data. - * + * * @return the innerProperties value. */ private AutomationProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutomationInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutomationInner withTags(Map tags) { super.withTags(tags); @@ -51,7 +59,7 @@ public AutomationInner withTags(Map tags) { /** * Get the description property: The security automation description. - * + * * @return the description value. */ public String description() { @@ -60,7 +68,7 @@ public String description() { /** * Set the description property: The security automation description. - * + * * @param description the description value to set. * @return the AutomationInner object itself. */ @@ -74,7 +82,7 @@ public AutomationInner withDescription(String description) { /** * Get the isEnabled property: Indicates whether the security automation is enabled. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -83,7 +91,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Indicates whether the security automation is enabled. - * + * * @param isEnabled the isEnabled value to set. * @return the AutomationInner object itself. */ @@ -97,9 +105,9 @@ public AutomationInner withIsEnabled(Boolean isEnabled) { /** * Get the scopes property: A collection of scopes on which the security automations logic is applied. Supported - * scopes are the subscription itself or a resource group under that subscription. The automation will only apply on - * defined scopes. - * + * scopes are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. + * * @return the scopes value. */ public List scopes() { @@ -108,9 +116,9 @@ public List scopes() { /** * Set the scopes property: A collection of scopes on which the security automations logic is applied. Supported - * scopes are the subscription itself or a resource group under that subscription. The automation will only apply on - * defined scopes. - * + * scopes are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. + * * @param scopes the scopes value to set. * @return the AutomationInner object itself. */ @@ -125,7 +133,7 @@ public AutomationInner withScopes(List scopes) { /** * Get the sources property: A collection of the source event types which evaluate the security automation set of * rules. - * + * * @return the sources value. */ public List sources() { @@ -135,7 +143,7 @@ public List sources() { /** * Set the sources property: A collection of the source event types which evaluate the security automation set of * rules. - * + * * @param sources the sources value to set. * @return the AutomationInner object itself. */ @@ -150,7 +158,7 @@ public AutomationInner withSources(List sources) { /** * Get the actions property: A collection of the actions which are triggered if all the configured rules * evaluations, within at least one rule set, are true. - * + * * @return the actions value. */ public List actions() { @@ -160,7 +168,7 @@ public List actions() { /** * Set the actions property: A collection of the actions which are triggered if all the configured rules * evaluations, within at least one rule set, are true. - * + * * @param actions the actions value to set. * @return the AutomationInner object itself. */ @@ -174,7 +182,7 @@ public AutomationInner withActions(List actions) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationProperties.java index c84b9645e428..f0ec00d46ad2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationProperties.java @@ -49,13 +49,15 @@ public final class AutomationProperties { @JsonProperty(value = "actions") private List actions; - /** Creates an instance of AutomationProperties class. */ + /** + * Creates an instance of AutomationProperties class. + */ public AutomationProperties() { } /** * Get the description property: The security automation description. - * + * * @return the description value. */ public String description() { @@ -64,7 +66,7 @@ public String description() { /** * Set the description property: The security automation description. - * + * * @param description the description value to set. * @return the AutomationProperties object itself. */ @@ -75,7 +77,7 @@ public AutomationProperties withDescription(String description) { /** * Get the isEnabled property: Indicates whether the security automation is enabled. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -84,7 +86,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Indicates whether the security automation is enabled. - * + * * @param isEnabled the isEnabled value to set. * @return the AutomationProperties object itself. */ @@ -95,9 +97,9 @@ public AutomationProperties withIsEnabled(Boolean isEnabled) { /** * Get the scopes property: A collection of scopes on which the security automations logic is applied. Supported - * scopes are the subscription itself or a resource group under that subscription. The automation will only apply on - * defined scopes. - * + * scopes are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. + * * @return the scopes value. */ public List scopes() { @@ -106,9 +108,9 @@ public List scopes() { /** * Set the scopes property: A collection of scopes on which the security automations logic is applied. Supported - * scopes are the subscription itself or a resource group under that subscription. The automation will only apply on - * defined scopes. - * + * scopes are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. + * * @param scopes the scopes value to set. * @return the AutomationProperties object itself. */ @@ -120,7 +122,7 @@ public AutomationProperties withScopes(List scopes) { /** * Get the sources property: A collection of the source event types which evaluate the security automation set of * rules. - * + * * @return the sources value. */ public List sources() { @@ -130,7 +132,7 @@ public List sources() { /** * Set the sources property: A collection of the source event types which evaluate the security automation set of * rules. - * + * * @param sources the sources value to set. * @return the AutomationProperties object itself. */ @@ -142,7 +144,7 @@ public AutomationProperties withSources(List sources) { /** * Get the actions property: A collection of the actions which are triggered if all the configured rules * evaluations, within at least one rule set, are true. - * + * * @return the actions value. */ public List actions() { @@ -152,7 +154,7 @@ public List actions() { /** * Set the actions property: A collection of the actions which are triggered if all the configured rules * evaluations, within at least one rule set, are true. - * + * * @param actions the actions value to set. * @return the AutomationProperties object itself. */ @@ -163,7 +165,7 @@ public AutomationProperties withActions(List actions) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationValidationStatusInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationValidationStatusInner.java index a43555c19211..7ebb43e68de0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationValidationStatusInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AutomationValidationStatusInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The security automation model state property bag. */ +/** + * The security automation model state property bag. + */ @Fluent public final class AutomationValidationStatusInner { /* @@ -22,13 +24,15 @@ public final class AutomationValidationStatusInner { @JsonProperty(value = "message") private String message; - /** Creates an instance of AutomationValidationStatusInner class. */ + /** + * Creates an instance of AutomationValidationStatusInner class. + */ public AutomationValidationStatusInner() { } /** * Get the isValid property: Indicates whether the model is valid or not. - * + * * @return the isValid value. */ public Boolean isValid() { @@ -37,7 +41,7 @@ public Boolean isValid() { /** * Set the isValid property: Indicates whether the model is valid or not. - * + * * @param isValid the isValid value to set. * @return the AutomationValidationStatusInner object itself. */ @@ -48,7 +52,7 @@ public AutomationValidationStatusInner withIsValid(Boolean isValid) { /** * Get the message property: The validation message. - * + * * @return the message value. */ public String message() { @@ -57,7 +61,7 @@ public String message() { /** * Set the message property: The validation message. - * + * * @param message the message value to set. * @return the AutomationValidationStatusInner object itself. */ @@ -68,7 +72,7 @@ public AutomationValidationStatusInner withMessage(String message) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgInner.java new file mode 100644 index 000000000000..65a89d987a17 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure DevOps Organization resource. + */ +@Fluent +public final class AzureDevOpsOrgInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Azure DevOps Organization properties. + */ + @JsonProperty(value = "properties") + private AzureDevOpsOrgProperties properties; + + /** + * Creates an instance of AzureDevOpsOrgInner class. + */ + public AzureDevOpsOrgInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: Azure DevOps Organization properties. + * + * @return the properties value. + */ + public AzureDevOpsOrgProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Azure DevOps Organization properties. + * + * @param properties the properties value to set. + * @return the AzureDevOpsOrgInner object itself. + */ + public AzureDevOpsOrgInner withProperties(AzureDevOpsOrgProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgListResponseInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgListResponseInner.java new file mode 100644 index 000000000000..d84170ba3669 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsOrgListResponseInner.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of RP resources which supports pagination. + */ +@Fluent +public final class AzureDevOpsOrgListResponseInner { + /* + * Gets or sets list of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Gets or sets next link to scroll over the results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of AzureDevOpsOrgListResponseInner class. + */ + public AzureDevOpsOrgListResponseInner() { + } + + /** + * Get the value property: Gets or sets list of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets or sets list of resources. + * + * @param value the value value to set. + * @return the AzureDevOpsOrgListResponseInner object itself. + */ + public AzureDevOpsOrgListResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Gets or sets next link to scroll over the results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Gets or sets next link to scroll over the results. + * + * @param nextLink the nextLink value to set. + * @return the AzureDevOpsOrgListResponseInner object itself. + */ + public AzureDevOpsOrgListResponseInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsProjectInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsProjectInner.java new file mode 100644 index 000000000000..0b80eb4533bd --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsProjectInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.AzureDevOpsProjectProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure DevOps Project resource. + */ +@Fluent +public final class AzureDevOpsProjectInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Azure DevOps Project properties. + */ + @JsonProperty(value = "properties") + private AzureDevOpsProjectProperties properties; + + /** + * Creates an instance of AzureDevOpsProjectInner class. + */ + public AzureDevOpsProjectInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: Azure DevOps Project properties. + * + * @return the properties value. + */ + public AzureDevOpsProjectProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Azure DevOps Project properties. + * + * @param properties the properties value to set. + * @return the AzureDevOpsProjectInner object itself. + */ + public AzureDevOpsProjectInner withProperties(AzureDevOpsProjectProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsRepositoryInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsRepositoryInner.java new file mode 100644 index 000000000000..ce96e9660324 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AzureDevOpsRepositoryInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.AzureDevOpsRepositoryProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure DevOps Repository resource. + */ +@Fluent +public final class AzureDevOpsRepositoryInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Azure DevOps Repository properties. + */ + @JsonProperty(value = "properties") + private AzureDevOpsRepositoryProperties properties; + + /** + * Creates an instance of AzureDevOpsRepositoryInner class. + */ + public AzureDevOpsRepositoryInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: Azure DevOps Repository properties. + * + * @return the properties value. + */ + public AzureDevOpsRepositoryProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Azure DevOps Repository properties. + * + * @param properties the properties value to set. + * @return the AzureDevOpsRepositoryInner object itself. + */ + public AzureDevOpsRepositoryInner withProperties(AzureDevOpsRepositoryProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceInner.java index 4017d627a9d0..209bd4b33efe 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceInner.java @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Compliance of a scope. */ +/** + * Compliance of a scope. + */ @Immutable public final class ComplianceInner extends ProxyResource { /* @@ -20,13 +22,15 @@ public final class ComplianceInner extends ProxyResource { @JsonProperty(value = "properties") private ComplianceProperties innerProperties; - /** Creates an instance of ComplianceInner class. */ + /** + * Creates an instance of ComplianceInner class. + */ public ComplianceInner() { } /** * Get the innerProperties property: Compliance data. - * + * * @return the innerProperties value. */ private ComplianceProperties innerProperties() { @@ -35,7 +39,7 @@ private ComplianceProperties innerProperties() { /** * Get the assessmentTimestampUtcDate property: The timestamp when the Compliance calculation was conducted. - * + * * @return the assessmentTimestampUtcDate value. */ public OffsetDateTime assessmentTimestampUtcDate() { @@ -43,9 +47,9 @@ public OffsetDateTime assessmentTimestampUtcDate() { } /** - * Get the resourceCount property: The resource count of the given subscription for which the Compliance calculation - * was conducted (needed for Management Group Compliance calculation). - * + * Get the resourceCount property: The resource count of the given subscription for which the Compliance + * calculation was conducted (needed for Management Group Compliance calculation). + * * @return the resourceCount value. */ public Integer resourceCount() { @@ -54,7 +58,7 @@ public Integer resourceCount() { /** * Get the assessmentResult property: An array of segment, which is the actually the compliance assessment. - * + * * @return the assessmentResult value. */ public List assessmentResult() { @@ -63,7 +67,7 @@ public List assessmentResult() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceProperties.java index 8eb6d80114fc..1ff87cb57607 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceProperties.java @@ -36,13 +36,15 @@ public final class ComplianceProperties { @JsonProperty(value = "assessmentResult", access = JsonProperty.Access.WRITE_ONLY) private List assessmentResult; - /** Creates an instance of ComplianceProperties class. */ + /** + * Creates an instance of ComplianceProperties class. + */ public ComplianceProperties() { } /** * Get the assessmentTimestampUtcDate property: The timestamp when the Compliance calculation was conducted. - * + * * @return the assessmentTimestampUtcDate value. */ public OffsetDateTime assessmentTimestampUtcDate() { @@ -50,9 +52,9 @@ public OffsetDateTime assessmentTimestampUtcDate() { } /** - * Get the resourceCount property: The resource count of the given subscription for which the Compliance calculation - * was conducted (needed for Management Group Compliance calculation). - * + * Get the resourceCount property: The resource count of the given subscription for which the Compliance + * calculation was conducted (needed for Management Group Compliance calculation). + * * @return the resourceCount value. */ public Integer resourceCount() { @@ -61,7 +63,7 @@ public Integer resourceCount() { /** * Get the assessmentResult property: An array of segment, which is the actually the compliance assessment. - * + * * @return the assessmentResult value. */ public List assessmentResult() { @@ -70,7 +72,7 @@ public List assessmentResult() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultInner.java index 4487e681da9b..7ba1143528a3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.ResourceStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** a compliance result. */ +/** + * a compliance result. + */ @Immutable public final class ComplianceResultInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class ComplianceResultInner extends ProxyResource { @JsonProperty(value = "properties") private ComplianceResultProperties innerProperties; - /** Creates an instance of ComplianceResultInner class. */ + /** + * Creates an instance of ComplianceResultInner class. + */ public ComplianceResultInner() { } /** * Get the innerProperties property: Compliance result data. - * + * * @return the innerProperties value. */ private ComplianceResultProperties innerProperties() { @@ -33,7 +37,7 @@ private ComplianceResultProperties innerProperties() { /** * Get the resourceStatus property: The status of the resource regarding a single assessment. - * + * * @return the resourceStatus value. */ public ResourceStatus resourceStatus() { @@ -42,7 +46,7 @@ public ResourceStatus resourceStatus() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultProperties.java index 743f7fe1a8b7..1b58d3960bcc 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ComplianceResultProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.models.ResourceStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Compliance result data. */ +/** + * Compliance result data. + */ @Immutable public final class ComplianceResultProperties { /* @@ -17,13 +19,15 @@ public final class ComplianceResultProperties { @JsonProperty(value = "resourceStatus", access = JsonProperty.Access.WRITE_ONLY) private ResourceStatus resourceStatus; - /** Creates an instance of ComplianceResultProperties class. */ + /** + * Creates an instance of ComplianceResultProperties class. + */ public ComplianceResultProperties() { } /** * Get the resourceStatus property: The status of the resource regarding a single assessment. - * + * * @return the resourceStatus value. */ public ResourceStatus resourceStatus() { @@ -32,7 +36,7 @@ public ResourceStatus resourceStatus() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectionStringsInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectionStringsInner.java deleted file mode 100644 index 4e21ee921fae..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectionStringsInner.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.models.IngestionConnectionString; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Connection string for ingesting security data and logs. */ -@Fluent -public final class ConnectionStringsInner { - /* - * Connection strings - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of ConnectionStringsInner class. */ - public ConnectionStringsInner() { - } - - /** - * Get the value property: Connection strings. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Connection strings. - * - * @param value the value value to set. - * @return the ConnectionStringsInner object itself. - */ - public ConnectionStringsInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ConnectionStringsInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConnectionStringsInner.class); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingInner.java index 423238e44dab..447751f0bfe1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.security.models.HybridComputeSettingsProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** The connector setting. */ +/** + * The connector setting. + */ @Fluent public final class ConnectorSettingInner extends ProxyResource { /* @@ -19,13 +21,15 @@ public final class ConnectorSettingInner extends ProxyResource { @JsonProperty(value = "properties") private ConnectorSettingProperties innerProperties; - /** Creates an instance of ConnectorSettingInner class. */ + /** + * Creates an instance of ConnectorSettingInner class. + */ public ConnectorSettingInner() { } /** * Get the innerProperties property: Connector setting data. - * + * * @return the innerProperties value. */ private ConnectorSettingProperties innerProperties() { @@ -35,7 +39,7 @@ private ConnectorSettingProperties innerProperties() { /** * Get the hybridComputeSettings property: Settings for hybrid compute management. These settings are relevant only * for Arc autoProvision (Hybrid Compute). - * + * * @return the hybridComputeSettings value. */ public HybridComputeSettingsProperties hybridComputeSettings() { @@ -45,7 +49,7 @@ public HybridComputeSettingsProperties hybridComputeSettings() { /** * Set the hybridComputeSettings property: Settings for hybrid compute management. These settings are relevant only * for Arc autoProvision (Hybrid Compute). - * + * * @param hybridComputeSettings the hybridComputeSettings value to set. * @return the ConnectorSettingInner object itself. */ @@ -60,7 +64,7 @@ public ConnectorSettingInner withHybridComputeSettings(HybridComputeSettingsProp /** * Get the authenticationDetails property: Settings for authentication management, these settings are relevant only * for the cloud connector. - * + * * @return the authenticationDetails value. */ public AuthenticationDetailsProperties authenticationDetails() { @@ -70,7 +74,7 @@ public AuthenticationDetailsProperties authenticationDetails() { /** * Set the authenticationDetails property: Settings for authentication management, these settings are relevant only * for the cloud connector. - * + * * @param authenticationDetails the authenticationDetails value to set. * @return the ConnectorSettingInner object itself. */ @@ -84,7 +88,7 @@ public ConnectorSettingInner withAuthenticationDetails(AuthenticationDetailsProp /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingProperties.java index 5a6a558eed59..800caa677e3b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ConnectorSettingProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.HybridComputeSettingsProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes properties of a connector setting. */ +/** + * Describes properties of a connector setting. + */ @Fluent public final class ConnectorSettingProperties { /* @@ -24,14 +26,16 @@ public final class ConnectorSettingProperties { @JsonProperty(value = "authenticationDetails") private AuthenticationDetailsProperties authenticationDetails; - /** Creates an instance of ConnectorSettingProperties class. */ + /** + * Creates an instance of ConnectorSettingProperties class. + */ public ConnectorSettingProperties() { } /** * Get the hybridComputeSettings property: Settings for hybrid compute management. These settings are relevant only * for Arc autoProvision (Hybrid Compute). - * + * * @return the hybridComputeSettings value. */ public HybridComputeSettingsProperties hybridComputeSettings() { @@ -41,7 +45,7 @@ public HybridComputeSettingsProperties hybridComputeSettings() { /** * Set the hybridComputeSettings property: Settings for hybrid compute management. These settings are relevant only * for Arc autoProvision (Hybrid Compute). - * + * * @param hybridComputeSettings the hybridComputeSettings value to set. * @return the ConnectorSettingProperties object itself. */ @@ -53,7 +57,7 @@ public ConnectorSettingProperties withHybridComputeSettings(HybridComputeSetting /** * Get the authenticationDetails property: Settings for authentication management, these settings are relevant only * for the cloud connector. - * + * * @return the authenticationDetails value. */ public AuthenticationDetailsProperties authenticationDetails() { @@ -63,7 +67,7 @@ public AuthenticationDetailsProperties authenticationDetails() { /** * Set the authenticationDetails property: Settings for authentication management, these settings are relevant only * for the cloud connector. - * + * * @param authenticationDetails the authenticationDetails value to set. * @return the ConnectorSettingProperties object itself. */ @@ -74,7 +78,7 @@ public ConnectorSettingProperties withAuthenticationDetails(AuthenticationDetail /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationInner.java index 77f1347c266e..405c0fe7d59e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.security.models.SupportedCloudEnum; import com.fasterxml.jackson.annotation.JsonProperty; -/** Custom Assessment Automation. */ +/** + * Custom Assessment Automation. + */ @Fluent public final class CustomAssessmentAutomationInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class CustomAssessmentAutomationInner extends ProxyResource { @JsonProperty(value = "properties") private CustomAssessmentAutomationProperties innerProperties; - /** Creates an instance of CustomAssessmentAutomationInner class. */ + /** + * Creates an instance of CustomAssessmentAutomationInner class. + */ public CustomAssessmentAutomationInner() { } /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -41,7 +45,7 @@ public SystemData systemData() { /** * Get the innerProperties property: describes Custom Assessment Automation properties. - * + * * @return the innerProperties value. */ private CustomAssessmentAutomationProperties innerProperties() { @@ -49,8 +53,9 @@ private CustomAssessmentAutomationProperties innerProperties() { } /** - * Get the compressedQuery property: GZip encoded KQL query representing the assessment automation results required. - * + * Get the compressedQuery property: GZip encoded KQL query representing the assessment automation results + * required. + * * @return the compressedQuery value. */ public String compressedQuery() { @@ -58,8 +63,9 @@ public String compressedQuery() { } /** - * Set the compressedQuery property: GZip encoded KQL query representing the assessment automation results required. - * + * Set the compressedQuery property: GZip encoded KQL query representing the assessment automation results + * required. + * * @param compressedQuery the compressedQuery value to set. * @return the CustomAssessmentAutomationInner object itself. */ @@ -73,7 +79,7 @@ public CustomAssessmentAutomationInner withCompressedQuery(String compressedQuer /** * Get the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @return the supportedCloud value. */ public SupportedCloudEnum supportedCloud() { @@ -82,7 +88,7 @@ public SupportedCloudEnum supportedCloud() { /** * Set the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @param supportedCloud the supportedCloud value to set. * @return the CustomAssessmentAutomationInner object itself. */ @@ -96,7 +102,7 @@ public CustomAssessmentAutomationInner withSupportedCloud(SupportedCloudEnum sup /** * Get the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @return the severity value. */ public SeverityEnum severity() { @@ -105,7 +111,7 @@ public SeverityEnum severity() { /** * Set the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @param severity the severity value to set. * @return the CustomAssessmentAutomationInner object itself. */ @@ -119,7 +125,7 @@ public CustomAssessmentAutomationInner withSeverity(SeverityEnum severity) { /** * Get the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @return the displayName value. */ public String displayName() { @@ -128,7 +134,7 @@ public String displayName() { /** * Set the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @param displayName the displayName value to set. * @return the CustomAssessmentAutomationInner object itself. */ @@ -143,7 +149,7 @@ public CustomAssessmentAutomationInner withDisplayName(String displayName) { /** * Get the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @return the description value. */ public String description() { @@ -153,7 +159,7 @@ public String description() { /** * Set the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @param description the description value to set. * @return the CustomAssessmentAutomationInner object itself. */ @@ -168,7 +174,7 @@ public CustomAssessmentAutomationInner withDescription(String description) { /** * Get the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @return the remediationDescription value. */ public String remediationDescription() { @@ -178,7 +184,7 @@ public String remediationDescription() { /** * Set the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @param remediationDescription the remediationDescription value to set. * @return the CustomAssessmentAutomationInner object itself. */ @@ -193,7 +199,7 @@ public CustomAssessmentAutomationInner withRemediationDescription(String remedia /** * Get the assessmentKey property: The assessment metadata key used when an assessment is generated for this * assessment automation. - * + * * @return the assessmentKey value. */ public String assessmentKey() { @@ -203,7 +209,7 @@ public String assessmentKey() { /** * Set the assessmentKey property: The assessment metadata key used when an assessment is generated for this * assessment automation. - * + * * @param assessmentKey the assessmentKey value to set. * @return the CustomAssessmentAutomationInner object itself. */ @@ -217,7 +223,7 @@ public CustomAssessmentAutomationInner withAssessmentKey(String assessmentKey) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationProperties.java index 9e8384522a94..7c86d35c0290 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.SupportedCloudEnum; import com.fasterxml.jackson.annotation.JsonProperty; -/** describes the Custom Assessment Automation properties. */ +/** + * describes the Custom Assessment Automation properties. + */ @Fluent public final class CustomAssessmentAutomationProperties { /* @@ -54,13 +56,16 @@ public final class CustomAssessmentAutomationProperties { @JsonProperty(value = "assessmentKey") private String assessmentKey; - /** Creates an instance of CustomAssessmentAutomationProperties class. */ + /** + * Creates an instance of CustomAssessmentAutomationProperties class. + */ public CustomAssessmentAutomationProperties() { } /** - * Get the compressedQuery property: GZip encoded KQL query representing the assessment automation results required. - * + * Get the compressedQuery property: GZip encoded KQL query representing the assessment automation results + * required. + * * @return the compressedQuery value. */ public String compressedQuery() { @@ -68,8 +73,9 @@ public String compressedQuery() { } /** - * Set the compressedQuery property: GZip encoded KQL query representing the assessment automation results required. - * + * Set the compressedQuery property: GZip encoded KQL query representing the assessment automation results + * required. + * * @param compressedQuery the compressedQuery value to set. * @return the CustomAssessmentAutomationProperties object itself. */ @@ -80,7 +86,7 @@ public CustomAssessmentAutomationProperties withCompressedQuery(String compresse /** * Get the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @return the supportedCloud value. */ public SupportedCloudEnum supportedCloud() { @@ -89,7 +95,7 @@ public SupportedCloudEnum supportedCloud() { /** * Set the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @param supportedCloud the supportedCloud value to set. * @return the CustomAssessmentAutomationProperties object itself. */ @@ -100,7 +106,7 @@ public CustomAssessmentAutomationProperties withSupportedCloud(SupportedCloudEnu /** * Get the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @return the severity value. */ public SeverityEnum severity() { @@ -109,7 +115,7 @@ public SeverityEnum severity() { /** * Set the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @param severity the severity value to set. * @return the CustomAssessmentAutomationProperties object itself. */ @@ -120,7 +126,7 @@ public CustomAssessmentAutomationProperties withSeverity(SeverityEnum severity) /** * Get the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @return the displayName value. */ public String displayName() { @@ -129,7 +135,7 @@ public String displayName() { /** * Set the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @param displayName the displayName value to set. * @return the CustomAssessmentAutomationProperties object itself. */ @@ -141,7 +147,7 @@ public CustomAssessmentAutomationProperties withDisplayName(String displayName) /** * Get the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @return the description value. */ public String description() { @@ -151,7 +157,7 @@ public String description() { /** * Set the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @param description the description value to set. * @return the CustomAssessmentAutomationProperties object itself. */ @@ -163,7 +169,7 @@ public CustomAssessmentAutomationProperties withDescription(String description) /** * Get the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @return the remediationDescription value. */ public String remediationDescription() { @@ -173,7 +179,7 @@ public String remediationDescription() { /** * Set the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @param remediationDescription the remediationDescription value to set. * @return the CustomAssessmentAutomationProperties object itself. */ @@ -185,7 +191,7 @@ public CustomAssessmentAutomationProperties withRemediationDescription(String re /** * Get the assessmentKey property: The assessment metadata key used when an assessment is generated for this * assessment automation. - * + * * @return the assessmentKey value. */ public String assessmentKey() { @@ -195,7 +201,7 @@ public String assessmentKey() { /** * Set the assessmentKey property: The assessment metadata key used when an assessment is generated for this * assessment automation. - * + * * @param assessmentKey the assessmentKey value to set. * @return the CustomAssessmentAutomationProperties object itself. */ @@ -206,7 +212,7 @@ public CustomAssessmentAutomationProperties withAssessmentKey(String assessmentK /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationRequestProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationRequestProperties.java index 524a5c5db165..69a9046298a6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationRequestProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomAssessmentAutomationRequestProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.SupportedCloudEnum; import com.fasterxml.jackson.annotation.JsonProperty; -/** describes the Custom Assessment Automation properties. */ +/** + * describes the Custom Assessment Automation properties. + */ @Fluent public final class CustomAssessmentAutomationRequestProperties { /* @@ -48,14 +50,16 @@ public final class CustomAssessmentAutomationRequestProperties { @JsonProperty(value = "remediationDescription") private String remediationDescription; - /** Creates an instance of CustomAssessmentAutomationRequestProperties class. */ + /** + * Creates an instance of CustomAssessmentAutomationRequestProperties class. + */ public CustomAssessmentAutomationRequestProperties() { } /** * Get the compressedQuery property: Base 64 encoded KQL query representing the assessment automation results * required. - * + * * @return the compressedQuery value. */ public String compressedQuery() { @@ -65,7 +69,7 @@ public String compressedQuery() { /** * Set the compressedQuery property: Base 64 encoded KQL query representing the assessment automation results * required. - * + * * @param compressedQuery the compressedQuery value to set. * @return the CustomAssessmentAutomationRequestProperties object itself. */ @@ -76,7 +80,7 @@ public CustomAssessmentAutomationRequestProperties withCompressedQuery(String co /** * Get the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @return the supportedCloud value. */ public SupportedCloudEnum supportedCloud() { @@ -85,7 +89,7 @@ public SupportedCloudEnum supportedCloud() { /** * Set the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @param supportedCloud the supportedCloud value to set. * @return the CustomAssessmentAutomationRequestProperties object itself. */ @@ -96,7 +100,7 @@ public CustomAssessmentAutomationRequestProperties withSupportedCloud(SupportedC /** * Get the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @return the severity value. */ public SeverityEnum severity() { @@ -105,7 +109,7 @@ public SeverityEnum severity() { /** * Set the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @param severity the severity value to set. * @return the CustomAssessmentAutomationRequestProperties object itself. */ @@ -116,7 +120,7 @@ public CustomAssessmentAutomationRequestProperties withSeverity(SeverityEnum sev /** * Get the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @return the displayName value. */ public String displayName() { @@ -125,7 +129,7 @@ public String displayName() { /** * Set the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @param displayName the displayName value to set. * @return the CustomAssessmentAutomationRequestProperties object itself. */ @@ -137,7 +141,7 @@ public CustomAssessmentAutomationRequestProperties withDisplayName(String displa /** * Get the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @return the description value. */ public String description() { @@ -147,7 +151,7 @@ public String description() { /** * Set the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @param description the description value to set. * @return the CustomAssessmentAutomationRequestProperties object itself. */ @@ -159,7 +163,7 @@ public CustomAssessmentAutomationRequestProperties withDescription(String descri /** * Get the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @return the remediationDescription value. */ public String remediationDescription() { @@ -169,7 +173,7 @@ public String remediationDescription() { /** * Set the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @param remediationDescription the remediationDescription value to set. * @return the CustomAssessmentAutomationRequestProperties object itself. */ @@ -180,7 +184,7 @@ public CustomAssessmentAutomationRequestProperties withRemediationDescription(St /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentInner.java index 0ac905684d25..3a24a6da384b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentInner.java @@ -9,7 +9,9 @@ import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Custom entity store assignment. */ +/** + * Custom entity store assignment. + */ @Fluent public final class CustomEntityStoreAssignmentInner extends ProxyResource { /* @@ -24,13 +26,15 @@ public final class CustomEntityStoreAssignmentInner extends ProxyResource { @JsonProperty(value = "properties") private CustomEntityStoreAssignmentProperties innerProperties; - /** Creates an instance of CustomEntityStoreAssignmentInner class. */ + /** + * Creates an instance of CustomEntityStoreAssignmentInner class. + */ public CustomEntityStoreAssignmentInner() { } /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -39,7 +43,7 @@ public SystemData systemData() { /** * Get the innerProperties property: describes custom entity store assignment properties. - * + * * @return the innerProperties value. */ private CustomEntityStoreAssignmentProperties innerProperties() { @@ -49,7 +53,7 @@ private CustomEntityStoreAssignmentProperties innerProperties() { /** * Get the principal property: The principal assigned with entity store. Format of principal is: [AAD * type]=[PrincipalObjectId];[TenantId]. - * + * * @return the principal value. */ public String principal() { @@ -59,7 +63,7 @@ public String principal() { /** * Set the principal property: The principal assigned with entity store. Format of principal is: [AAD * type]=[PrincipalObjectId];[TenantId]. - * + * * @param principal the principal value to set. * @return the CustomEntityStoreAssignmentInner object itself. */ @@ -73,7 +77,7 @@ public CustomEntityStoreAssignmentInner withPrincipal(String principal) { /** * Get the entityStoreDatabaseLink property: The link to entity store database. - * + * * @return the entityStoreDatabaseLink value. */ public String entityStoreDatabaseLink() { @@ -82,7 +86,7 @@ public String entityStoreDatabaseLink() { /** * Set the entityStoreDatabaseLink property: The link to entity store database. - * + * * @param entityStoreDatabaseLink the entityStoreDatabaseLink value to set. * @return the CustomEntityStoreAssignmentInner object itself. */ @@ -96,7 +100,7 @@ public CustomEntityStoreAssignmentInner withEntityStoreDatabaseLink(String entit /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentProperties.java index cf2b86ebd137..b6b881e2da6e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** describes the custom entity store assignment properties. */ +/** + * describes the custom entity store assignment properties. + */ @Fluent public final class CustomEntityStoreAssignmentProperties { /* @@ -22,14 +24,16 @@ public final class CustomEntityStoreAssignmentProperties { @JsonProperty(value = "entityStoreDatabaseLink") private String entityStoreDatabaseLink; - /** Creates an instance of CustomEntityStoreAssignmentProperties class. */ + /** + * Creates an instance of CustomEntityStoreAssignmentProperties class. + */ public CustomEntityStoreAssignmentProperties() { } /** * Get the principal property: The principal assigned with entity store. Format of principal is: [AAD * type]=[PrincipalObjectId];[TenantId]. - * + * * @return the principal value. */ public String principal() { @@ -39,7 +43,7 @@ public String principal() { /** * Set the principal property: The principal assigned with entity store. Format of principal is: [AAD * type]=[PrincipalObjectId];[TenantId]. - * + * * @param principal the principal value to set. * @return the CustomEntityStoreAssignmentProperties object itself. */ @@ -50,7 +54,7 @@ public CustomEntityStoreAssignmentProperties withPrincipal(String principal) { /** * Get the entityStoreDatabaseLink property: The link to entity store database. - * + * * @return the entityStoreDatabaseLink value. */ public String entityStoreDatabaseLink() { @@ -59,7 +63,7 @@ public String entityStoreDatabaseLink() { /** * Set the entityStoreDatabaseLink property: The link to entity store database. - * + * * @param entityStoreDatabaseLink the entityStoreDatabaseLink value to set. * @return the CustomEntityStoreAssignmentProperties object itself. */ @@ -70,7 +74,7 @@ public CustomEntityStoreAssignmentProperties withEntityStoreDatabaseLink(String /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentRequestProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentRequestProperties.java index fc9ebcd59cab..07235339fa56 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentRequestProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/CustomEntityStoreAssignmentRequestProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** describes properties of custom entity store assignment request. */ +/** + * describes properties of custom entity store assignment request. + */ @Fluent public final class CustomEntityStoreAssignmentRequestProperties { /* @@ -17,14 +19,16 @@ public final class CustomEntityStoreAssignmentRequestProperties { @JsonProperty(value = "principal") private String principal; - /** Creates an instance of CustomEntityStoreAssignmentRequestProperties class. */ + /** + * Creates an instance of CustomEntityStoreAssignmentRequestProperties class. + */ public CustomEntityStoreAssignmentRequestProperties() { } /** - * Get the principal property: The principal assigned with entity store. If not provided, will use caller principal. - * Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - * + * Get the principal property: The principal assigned with entity store. If not provided, will use caller + * principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. + * * @return the principal value. */ public String principal() { @@ -32,9 +36,9 @@ public String principal() { } /** - * Set the principal property: The principal assigned with entity store. If not provided, will use caller principal. - * Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - * + * Set the principal property: The principal assigned with entity store. If not provided, will use caller + * principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. + * * @param principal the principal value to set. * @return the CustomEntityStoreAssignmentRequestProperties object itself. */ @@ -45,7 +49,7 @@ public CustomEntityStoreAssignmentRequestProperties withPrincipal(String princip /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DataExportSettingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DataExportSettingProperties.java index 5f8daf7eabc5..eca261e08f1f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DataExportSettingProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DataExportSettingProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The data export setting properties. */ +/** + * The data export setting properties. + */ @Fluent public final class DataExportSettingProperties { /* @@ -16,13 +18,15 @@ public final class DataExportSettingProperties { @JsonProperty(value = "enabled", required = true) private boolean enabled; - /** Creates an instance of DataExportSettingProperties class. */ + /** + * Creates an instance of DataExportSettingProperties class. + */ public DataExportSettingProperties() { } /** * Get the enabled property: Is the data export setting enabled. - * + * * @return the enabled value. */ public boolean enabled() { @@ -31,7 +35,7 @@ public boolean enabled() { /** * Set the enabled property: Is the data export setting enabled. - * + * * @param enabled the enabled value to set. * @return the DataExportSettingProperties object itself. */ @@ -42,7 +46,7 @@ public DataExportSettingProperties withEnabled(boolean enabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingInner.java new file mode 100644 index 000000000000..0a1562f2ddd5 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingInner.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.security.models.OperationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Defender for Storage resource. + */ +@Fluent +public final class DefenderForStorageSettingInner extends ProxyResource { + /* + * Defender for Storage resource properties. + */ + @JsonProperty(value = "properties") + private DefenderForStorageSettingProperties innerProperties; + + /** + * Creates an instance of DefenderForStorageSettingInner class. + */ + public DefenderForStorageSettingInner() { + } + + /** + * Get the innerProperties property: Defender for Storage resource properties. + * + * @return the innerProperties value. + */ + private DefenderForStorageSettingProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the isEnabled property: Indicates whether Defender for Storage is enabled on this storage account. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); + } + + /** + * Set the isEnabled property: Indicates whether Defender for Storage is enabled on this storage account. + * + * @param isEnabled the isEnabled value to set. + * @return the DefenderForStorageSettingInner object itself. + */ + public DefenderForStorageSettingInner withIsEnabled(Boolean isEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new DefenderForStorageSettingProperties(); + } + this.innerProperties().withIsEnabled(isEnabled); + return this; + } + + /** + * Get the overrideSubscriptionLevelSettings property: Indicates whether the settings defined for this storage + * account should override the settings defined for the subscription. + * + * @return the overrideSubscriptionLevelSettings value. + */ + public Boolean overrideSubscriptionLevelSettings() { + return this.innerProperties() == null ? null : this.innerProperties().overrideSubscriptionLevelSettings(); + } + + /** + * Set the overrideSubscriptionLevelSettings property: Indicates whether the settings defined for this storage + * account should override the settings defined for the subscription. + * + * @param overrideSubscriptionLevelSettings the overrideSubscriptionLevelSettings value to set. + * @return the DefenderForStorageSettingInner object itself. + */ + public DefenderForStorageSettingInner + withOverrideSubscriptionLevelSettings(Boolean overrideSubscriptionLevelSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new DefenderForStorageSettingProperties(); + } + this.innerProperties().withOverrideSubscriptionLevelSettings(overrideSubscriptionLevelSettings); + return this; + } + + /** + * Get the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic to send scan + * results to. + * + * @return the scanResultsEventGridTopicResourceId value. + */ + public String scanResultsEventGridTopicResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().scanResultsEventGridTopicResourceId(); + } + + /** + * Set the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic to send scan + * results to. + * + * @param scanResultsEventGridTopicResourceId the scanResultsEventGridTopicResourceId value to set. + * @return the DefenderForStorageSettingInner object itself. + */ + public DefenderForStorageSettingInner + withScanResultsEventGridTopicResourceId(String scanResultsEventGridTopicResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new DefenderForStorageSettingProperties(); + } + this.innerProperties().withScanResultsEventGridTopicResourceId(scanResultsEventGridTopicResourceId); + return this; + } + + /** + * Get the operationStatus property: Upon failure or partial success. Additional data describing Malware Scanning + * enable/disable operation. + * + * @return the operationStatus value. + */ + public OperationStatus operationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().operationStatus(); + } + + /** + * Get the isEnabledMalwareScanningIsEnabled property: Indicates whether On Upload malware scanning should be + * enabled. + * + * @return the isEnabledMalwareScanningIsEnabled value. + */ + public Boolean isEnabledMalwareScanningIsEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isEnabledMalwareScanningIsEnabled(); + } + + /** + * Set the isEnabledMalwareScanningIsEnabled property: Indicates whether On Upload malware scanning should be + * enabled. + * + * @param isEnabledMalwareScanningIsEnabled the isEnabledMalwareScanningIsEnabled value to set. + * @return the DefenderForStorageSettingInner object itself. + */ + public DefenderForStorageSettingInner + withIsEnabledMalwareScanningIsEnabled(Boolean isEnabledMalwareScanningIsEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new DefenderForStorageSettingProperties(); + } + this.innerProperties().withIsEnabledMalwareScanningIsEnabled(isEnabledMalwareScanningIsEnabled); + return this; + } + + /** + * Get the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @return the capGBPerMonth value. + */ + public Integer capGBPerMonth() { + return this.innerProperties() == null ? null : this.innerProperties().capGBPerMonth(); + } + + /** + * Set the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @param capGBPerMonth the capGBPerMonth value to set. + * @return the DefenderForStorageSettingInner object itself. + */ + public DefenderForStorageSettingInner withCapGBPerMonth(Integer capGBPerMonth) { + if (this.innerProperties() == null) { + this.innerProperties = new DefenderForStorageSettingProperties(); + } + this.innerProperties().withCapGBPerMonth(capGBPerMonth); + return this; + } + + /** + * Get the isEnabledSensitiveDataDiscoveryIsEnabled property: Indicates whether Sensitive Data Discovery should be + * enabled. + * + * @return the isEnabledSensitiveDataDiscoveryIsEnabled value. + */ + public Boolean isEnabledSensitiveDataDiscoveryIsEnabled() { + return this.innerProperties() == null ? null + : this.innerProperties().isEnabledSensitiveDataDiscoveryIsEnabled(); + } + + /** + * Set the isEnabledSensitiveDataDiscoveryIsEnabled property: Indicates whether Sensitive Data Discovery should be + * enabled. + * + * @param isEnabledSensitiveDataDiscoveryIsEnabled the isEnabledSensitiveDataDiscoveryIsEnabled value to set. + * @return the DefenderForStorageSettingInner object itself. + */ + public DefenderForStorageSettingInner + withIsEnabledSensitiveDataDiscoveryIsEnabled(Boolean isEnabledSensitiveDataDiscoveryIsEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new DefenderForStorageSettingProperties(); + } + this.innerProperties().withIsEnabledSensitiveDataDiscoveryIsEnabled(isEnabledSensitiveDataDiscoveryIsEnabled); + return this; + } + + /** + * Get the operationStatusSensitiveDataDiscoveryOperationStatus property: Upon failure or partial success. + * Additional data describing Sensitive Data Discovery enable/disable operation. + * + * @return the operationStatusSensitiveDataDiscoveryOperationStatus value. + */ + public OperationStatus operationStatusSensitiveDataDiscoveryOperationStatus() { + return this.innerProperties() == null ? null + : this.innerProperties().operationStatusSensitiveDataDiscoveryOperationStatus(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingProperties.java new file mode 100644 index 000000000000..f462bb803cd0 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DefenderForStorageSettingProperties.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.security.models.OperationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defender for Storage resource properties. + */ +@Fluent +public final class DefenderForStorageSettingProperties { + /* + * Indicates whether Defender for Storage is enabled on this storage account. + */ + @JsonProperty(value = "isEnabled") + private Boolean isEnabled; + + /* + * Properties of Malware Scanning. + */ + @JsonProperty(value = "malwareScanning") + private MalwareScanningProperties innerMalwareScanning; + + /* + * Properties of Sensitive Data Discovery. + */ + @JsonProperty(value = "sensitiveDataDiscovery") + private SensitiveDataDiscoveryProperties innerSensitiveDataDiscovery; + + /* + * Indicates whether the settings defined for this storage account should override the settings defined for the + * subscription. + */ + @JsonProperty(value = "overrideSubscriptionLevelSettings") + private Boolean overrideSubscriptionLevelSettings; + + /** + * Creates an instance of DefenderForStorageSettingProperties class. + */ + public DefenderForStorageSettingProperties() { + } + + /** + * Get the isEnabled property: Indicates whether Defender for Storage is enabled on this storage account. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Set the isEnabled property: Indicates whether Defender for Storage is enabled on this storage account. + * + * @param isEnabled the isEnabled value to set. + * @return the DefenderForStorageSettingProperties object itself. + */ + public DefenderForStorageSettingProperties withIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Get the innerMalwareScanning property: Properties of Malware Scanning. + * + * @return the innerMalwareScanning value. + */ + private MalwareScanningProperties innerMalwareScanning() { + return this.innerMalwareScanning; + } + + /** + * Get the innerSensitiveDataDiscovery property: Properties of Sensitive Data Discovery. + * + * @return the innerSensitiveDataDiscovery value. + */ + private SensitiveDataDiscoveryProperties innerSensitiveDataDiscovery() { + return this.innerSensitiveDataDiscovery; + } + + /** + * Get the overrideSubscriptionLevelSettings property: Indicates whether the settings defined for this storage + * account should override the settings defined for the subscription. + * + * @return the overrideSubscriptionLevelSettings value. + */ + public Boolean overrideSubscriptionLevelSettings() { + return this.overrideSubscriptionLevelSettings; + } + + /** + * Set the overrideSubscriptionLevelSettings property: Indicates whether the settings defined for this storage + * account should override the settings defined for the subscription. + * + * @param overrideSubscriptionLevelSettings the overrideSubscriptionLevelSettings value to set. + * @return the DefenderForStorageSettingProperties object itself. + */ + public DefenderForStorageSettingProperties + withOverrideSubscriptionLevelSettings(Boolean overrideSubscriptionLevelSettings) { + this.overrideSubscriptionLevelSettings = overrideSubscriptionLevelSettings; + return this; + } + + /** + * Get the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic to send scan + * results to. + * + * @return the scanResultsEventGridTopicResourceId value. + */ + public String scanResultsEventGridTopicResourceId() { + return this.innerMalwareScanning() == null ? null + : this.innerMalwareScanning().scanResultsEventGridTopicResourceId(); + } + + /** + * Set the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic to send scan + * results to. + * + * @param scanResultsEventGridTopicResourceId the scanResultsEventGridTopicResourceId value to set. + * @return the DefenderForStorageSettingProperties object itself. + */ + public DefenderForStorageSettingProperties + withScanResultsEventGridTopicResourceId(String scanResultsEventGridTopicResourceId) { + if (this.innerMalwareScanning() == null) { + this.innerMalwareScanning = new MalwareScanningProperties(); + } + this.innerMalwareScanning().withScanResultsEventGridTopicResourceId(scanResultsEventGridTopicResourceId); + return this; + } + + /** + * Get the operationStatus property: Upon failure or partial success. Additional data describing Malware Scanning + * enable/disable operation. + * + * @return the operationStatus value. + */ + public OperationStatus operationStatus() { + return this.innerMalwareScanning() == null ? null : this.innerMalwareScanning().operationStatus(); + } + + /** + * Get the isEnabled property: Indicates whether On Upload malware scanning should be enabled. + * + * @return the isEnabled value. + */ + public Boolean isEnabledMalwareScanningIsEnabled() { + return this.innerMalwareScanning() == null ? null : this.innerMalwareScanning().isEnabled(); + } + + /** + * Set the isEnabled property: Indicates whether On Upload malware scanning should be enabled. + * + * @param isEnabled the isEnabled value to set. + * @return the DefenderForStorageSettingProperties object itself. + */ + public DefenderForStorageSettingProperties withIsEnabledMalwareScanningIsEnabled(Boolean isEnabled) { + if (this.innerMalwareScanning() == null) { + this.innerMalwareScanning = new MalwareScanningProperties(); + } + this.innerMalwareScanning().withIsEnabled(isEnabled); + return this; + } + + /** + * Get the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @return the capGBPerMonth value. + */ + public Integer capGBPerMonth() { + return this.innerMalwareScanning() == null ? null : this.innerMalwareScanning().capGBPerMonth(); + } + + /** + * Set the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @param capGBPerMonth the capGBPerMonth value to set. + * @return the DefenderForStorageSettingProperties object itself. + */ + public DefenderForStorageSettingProperties withCapGBPerMonth(Integer capGBPerMonth) { + if (this.innerMalwareScanning() == null) { + this.innerMalwareScanning = new MalwareScanningProperties(); + } + this.innerMalwareScanning().withCapGBPerMonth(capGBPerMonth); + return this; + } + + /** + * Get the isEnabled property: Indicates whether Sensitive Data Discovery should be enabled. + * + * @return the isEnabled value. + */ + public Boolean isEnabledSensitiveDataDiscoveryIsEnabled() { + return this.innerSensitiveDataDiscovery() == null ? null : this.innerSensitiveDataDiscovery().isEnabled(); + } + + /** + * Set the isEnabled property: Indicates whether Sensitive Data Discovery should be enabled. + * + * @param isEnabled the isEnabled value to set. + * @return the DefenderForStorageSettingProperties object itself. + */ + public DefenderForStorageSettingProperties withIsEnabledSensitiveDataDiscoveryIsEnabled(Boolean isEnabled) { + if (this.innerSensitiveDataDiscovery() == null) { + this.innerSensitiveDataDiscovery = new SensitiveDataDiscoveryProperties(); + } + this.innerSensitiveDataDiscovery().withIsEnabled(isEnabled); + return this; + } + + /** + * Get the operationStatus property: Upon failure or partial success. Additional data describing Sensitive Data + * Discovery enable/disable operation. + * + * @return the operationStatus value. + */ + public OperationStatus operationStatusSensitiveDataDiscoveryOperationStatus() { + return this.innerSensitiveDataDiscovery() == null ? null : this.innerSensitiveDataDiscovery().operationStatus(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerMalwareScanning() != null) { + innerMalwareScanning().validate(); + } + if (innerSensitiveDataDiscovery() != null) { + innerSensitiveDataDiscovery().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DevOpsConfigurationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DevOpsConfigurationInner.java new file mode 100644 index 000000000000..84cd2be215f6 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DevOpsConfigurationInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.DevOpsConfigurationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DevOps Configuration resource. + */ +@Fluent +public final class DevOpsConfigurationInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * DevOps Configuration properties. + */ + @JsonProperty(value = "properties") + private DevOpsConfigurationProperties properties; + + /** + * Creates an instance of DevOpsConfigurationInner class. + */ + public DevOpsConfigurationInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: DevOps Configuration properties. + * + * @return the properties value. + */ + public DevOpsConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: DevOps Configuration properties. + * + * @param properties the properties value to set. + * @return the DevOpsConfigurationInner object itself. + */ + public DevOpsConfigurationInner withProperties(DevOpsConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupInner.java index 29aa17350b73..4ac5384380fa 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupInner.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The device security group resource. */ +/** + * The device security group resource. + */ @Fluent public final class DeviceSecurityGroupInner extends ProxyResource { /* @@ -22,13 +24,15 @@ public final class DeviceSecurityGroupInner extends ProxyResource { @JsonProperty(value = "properties") private DeviceSecurityGroupProperties innerProperties; - /** Creates an instance of DeviceSecurityGroupInner class. */ + /** + * Creates an instance of DeviceSecurityGroupInner class. + */ public DeviceSecurityGroupInner() { } /** * Get the innerProperties property: Device Security group data. - * + * * @return the innerProperties value. */ private DeviceSecurityGroupProperties innerProperties() { @@ -37,7 +41,7 @@ private DeviceSecurityGroupProperties innerProperties() { /** * Get the thresholdRules property: The list of custom alert threshold rules. - * + * * @return the thresholdRules value. */ public List thresholdRules() { @@ -46,7 +50,7 @@ public List thresholdRules() { /** * Set the thresholdRules property: The list of custom alert threshold rules. - * + * * @param thresholdRules the thresholdRules value to set. * @return the DeviceSecurityGroupInner object itself. */ @@ -60,7 +64,7 @@ public DeviceSecurityGroupInner withThresholdRules(List timeWindowRules() { @@ -69,7 +73,7 @@ public List timeWindowRules() { /** * Set the timeWindowRules property: The list of custom alert time-window rules. - * + * * @param timeWindowRules the timeWindowRules value to set. * @return the DeviceSecurityGroupInner object itself. */ @@ -83,7 +87,7 @@ public DeviceSecurityGroupInner withTimeWindowRules(List allowlistRules() { @@ -92,7 +96,7 @@ public List allowlistRules() { /** * Set the allowlistRules property: The allow-list custom alert rules. - * + * * @param allowlistRules the allowlistRules value to set. * @return the DeviceSecurityGroupInner object itself. */ @@ -106,7 +110,7 @@ public DeviceSecurityGroupInner withAllowlistRules(List denylistRules() { @@ -115,7 +119,7 @@ public List denylistRules() { /** * Set the denylistRules property: The deny-list custom alert rules. - * + * * @param denylistRules the denylistRules value to set. * @return the DeviceSecurityGroupInner object itself. */ @@ -129,7 +133,7 @@ public DeviceSecurityGroupInner withDenylistRules(List /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupProperties.java index 0ee8520c518c..89cd036e97e2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceSecurityGroupProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** describes properties of a security group. */ +/** + * describes properties of a security group. + */ @Fluent public final class DeviceSecurityGroupProperties { /* @@ -39,13 +41,15 @@ public final class DeviceSecurityGroupProperties { @JsonProperty(value = "denylistRules") private List denylistRules; - /** Creates an instance of DeviceSecurityGroupProperties class. */ + /** + * Creates an instance of DeviceSecurityGroupProperties class. + */ public DeviceSecurityGroupProperties() { } /** * Get the thresholdRules property: The list of custom alert threshold rules. - * + * * @return the thresholdRules value. */ public List thresholdRules() { @@ -54,7 +58,7 @@ public List thresholdRules() { /** * Set the thresholdRules property: The list of custom alert threshold rules. - * + * * @param thresholdRules the thresholdRules value to set. * @return the DeviceSecurityGroupProperties object itself. */ @@ -65,7 +69,7 @@ public DeviceSecurityGroupProperties withThresholdRules(List timeWindowRules() { @@ -74,7 +78,7 @@ public List timeWindowRules() { /** * Set the timeWindowRules property: The list of custom alert time-window rules. - * + * * @param timeWindowRules the timeWindowRules value to set. * @return the DeviceSecurityGroupProperties object itself. */ @@ -85,7 +89,7 @@ public DeviceSecurityGroupProperties withTimeWindowRules(List allowlistRules() { @@ -94,7 +98,7 @@ public List allowlistRules() { /** * Set the allowlistRules property: The allow-list custom alert rules. - * + * * @param allowlistRules the allowlistRules value to set. * @return the DeviceSecurityGroupProperties object itself. */ @@ -105,7 +109,7 @@ public DeviceSecurityGroupProperties withAllowlistRules(List denylistRules() { @@ -114,7 +118,7 @@ public List denylistRules() { /** * Set the denylistRules property: The deny-list custom alert rules. - * + * * @param denylistRules the denylistRules value to set. * @return the DeviceSecurityGroupProperties object itself. */ @@ -125,7 +129,7 @@ public DeviceSecurityGroupProperties withDenylistRules(List value; + + /** + * Creates an instance of GetSensitivitySettingsListResponseInner class. + */ + public GetSensitivitySettingsListResponseInner() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the GetSensitivitySettingsListResponseInner object itself. + */ + public GetSensitivitySettingsListResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GetSensitivitySettingsResponseInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GetSensitivitySettingsResponseInner.java new file mode 100644 index 000000000000..9163e9203502 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GetSensitivitySettingsResponseInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.security.models.GetSensitivitySettingsResponseProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data sensitivity settings for sensitive data discovery. + */ +@Fluent +public final class GetSensitivitySettingsResponseInner extends ProxyResource { + /* + * The sensitivity settings properties + */ + @JsonProperty(value = "properties") + private GetSensitivitySettingsResponseProperties properties; + + /** + * Creates an instance of GetSensitivitySettingsResponseInner class. + */ + public GetSensitivitySettingsResponseInner() { + } + + /** + * Get the properties property: The sensitivity settings properties. + * + * @return the properties value. + */ + public GetSensitivitySettingsResponseProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The sensitivity settings properties. + * + * @param properties the properties value to set. + * @return the GetSensitivitySettingsResponseInner object itself. + */ + public GetSensitivitySettingsResponseInner withProperties(GetSensitivitySettingsResponseProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerInner.java new file mode 100644 index 000000000000..cdc48c7f89f2 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.GitHubOwnerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * GitHub Owner resource. + */ +@Fluent +public final class GitHubOwnerInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * GitHub Owner properties. + */ + @JsonProperty(value = "properties") + private GitHubOwnerProperties properties; + + /** + * Creates an instance of GitHubOwnerInner class. + */ + public GitHubOwnerInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: GitHub Owner properties. + * + * @return the properties value. + */ + public GitHubOwnerProperties properties() { + return this.properties; + } + + /** + * Set the properties property: GitHub Owner properties. + * + * @param properties the properties value to set. + * @return the GitHubOwnerInner object itself. + */ + public GitHubOwnerInner withProperties(GitHubOwnerProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerListResponseInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerListResponseInner.java new file mode 100644 index 000000000000..37ea6f2cba59 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubOwnerListResponseInner.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of RP resources which supports pagination. + */ +@Fluent +public final class GitHubOwnerListResponseInner { + /* + * Gets or sets list of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Gets or sets next link to scroll over the results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of GitHubOwnerListResponseInner class. + */ + public GitHubOwnerListResponseInner() { + } + + /** + * Get the value property: Gets or sets list of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets or sets list of resources. + * + * @param value the value value to set. + * @return the GitHubOwnerListResponseInner object itself. + */ + public GitHubOwnerListResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Gets or sets next link to scroll over the results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Gets or sets next link to scroll over the results. + * + * @param nextLink the nextLink value to set. + * @return the GitHubOwnerListResponseInner object itself. + */ + public GitHubOwnerListResponseInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubRepositoryInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubRepositoryInner.java new file mode 100644 index 000000000000..fdf3cf2876ca --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitHubRepositoryInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.GitHubRepositoryProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * GitHub Repository resource. + */ +@Fluent +public final class GitHubRepositoryInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * GitHub Repository properties. + */ + @JsonProperty(value = "properties") + private GitHubRepositoryProperties properties; + + /** + * Creates an instance of GitHubRepositoryInner class. + */ + public GitHubRepositoryInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: GitHub Repository properties. + * + * @return the properties value. + */ + public GitHubRepositoryProperties properties() { + return this.properties; + } + + /** + * Set the properties property: GitHub Repository properties. + * + * @param properties the properties value to set. + * @return the GitHubRepositoryInner object itself. + */ + public GitHubRepositoryInner withProperties(GitHubRepositoryProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupInner.java new file mode 100644 index 000000000000..40c4ee5cb99d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.GitLabGroupProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * GitLab Group resource. + */ +@Fluent +public final class GitLabGroupInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * GitLab Group properties. + */ + @JsonProperty(value = "properties") + private GitLabGroupProperties properties; + + /** + * Creates an instance of GitLabGroupInner class. + */ + public GitLabGroupInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: GitLab Group properties. + * + * @return the properties value. + */ + public GitLabGroupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: GitLab Group properties. + * + * @param properties the properties value to set. + * @return the GitLabGroupInner object itself. + */ + public GitLabGroupInner withProperties(GitLabGroupProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupListResponseInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupListResponseInner.java new file mode 100644 index 000000000000..12ece067735e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabGroupListResponseInner.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of RP resources which supports pagination. + */ +@Fluent +public final class GitLabGroupListResponseInner { + /* + * Gets or sets list of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Gets or sets next link to scroll over the results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of GitLabGroupListResponseInner class. + */ + public GitLabGroupListResponseInner() { + } + + /** + * Get the value property: Gets or sets list of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets or sets list of resources. + * + * @param value the value value to set. + * @return the GitLabGroupListResponseInner object itself. + */ + public GitLabGroupListResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Gets or sets next link to scroll over the results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Gets or sets next link to scroll over the results. + * + * @param nextLink the nextLink value to set. + * @return the GitLabGroupListResponseInner object itself. + */ + public GitLabGroupListResponseInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabProjectInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabProjectInner.java new file mode 100644 index 000000000000..646ee832cd08 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GitLabProjectInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.models.GitLabProjectProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * GitLab Project resource. + */ +@Fluent +public final class GitLabProjectInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * GitLab Project properties. + */ + @JsonProperty(value = "properties") + private GitLabProjectProperties properties; + + /** + * Creates an instance of GitLabProjectInner class. + */ + public GitLabProjectInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: GitLab Project properties. + * + * @return the properties value. + */ + public GitLabProjectProperties properties() { + return this.properties; + } + + /** + * Set the properties property: GitLab Project properties. + * + * @param properties the properties value to set. + * @return the GitLabProjectInner object itself. + */ + public GitLabProjectInner withProperties(GitLabProjectProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentInner.java index f880104179cc..b7ca7624af9a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentInner.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Governance assignment over a given scope. */ +/** + * Governance assignment over a given scope. + */ @Fluent public final class GovernanceAssignmentInner extends ProxyResource { /* @@ -21,13 +23,15 @@ public final class GovernanceAssignmentInner extends ProxyResource { @JsonProperty(value = "properties") private GovernanceAssignmentProperties innerProperties; - /** Creates an instance of GovernanceAssignmentInner class. */ + /** + * Creates an instance of GovernanceAssignmentInner class. + */ public GovernanceAssignmentInner() { } /** * Get the innerProperties property: The properties of a governance assignment. - * + * * @return the innerProperties value. */ private GovernanceAssignmentProperties innerProperties() { @@ -36,7 +40,7 @@ private GovernanceAssignmentProperties innerProperties() { /** * Get the owner property: The Owner for the governance assignment - e.g. user@contoso.com - see example. - * + * * @return the owner value. */ public String owner() { @@ -45,7 +49,7 @@ public String owner() { /** * Set the owner property: The Owner for the governance assignment - e.g. user@contoso.com - see example. - * + * * @param owner the owner value to set. * @return the GovernanceAssignmentInner object itself. */ @@ -58,9 +62,9 @@ public GovernanceAssignmentInner withOwner(String owner) { } /** - * Get the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected (in - * case of active grace-period). - * + * Get the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected + * (in case of active grace-period). + * * @return the remediationDueDate value. */ public OffsetDateTime remediationDueDate() { @@ -68,9 +72,9 @@ public OffsetDateTime remediationDueDate() { } /** - * Set the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected (in - * case of active grace-period). - * + * Set the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected + * (in case of active grace-period). + * * @param remediationDueDate the remediationDueDate value to set. * @return the GovernanceAssignmentInner object itself. */ @@ -84,7 +88,7 @@ public GovernanceAssignmentInner withRemediationDueDate(OffsetDateTime remediati /** * Get the remediationEta property: The ETA (estimated time of arrival) for remediation (optional), see example. - * + * * @return the remediationEta value. */ public RemediationEta remediationEta() { @@ -93,7 +97,7 @@ public RemediationEta remediationEta() { /** * Set the remediationEta property: The ETA (estimated time of arrival) for remediation (optional), see example. - * + * * @param remediationEta the remediationEta value to set. * @return the GovernanceAssignmentInner object itself. */ @@ -107,7 +111,7 @@ public GovernanceAssignmentInner withRemediationEta(RemediationEta remediationEt /** * Get the isGracePeriod property: Defines whether there is a grace period on the governance assignment. - * + * * @return the isGracePeriod value. */ public Boolean isGracePeriod() { @@ -116,7 +120,7 @@ public Boolean isGracePeriod() { /** * Set the isGracePeriod property: Defines whether there is a grace period on the governance assignment. - * + * * @param isGracePeriod the isGracePeriod value to set. * @return the GovernanceAssignmentInner object itself. */ @@ -131,7 +135,7 @@ public GovernanceAssignmentInner withIsGracePeriod(Boolean isGracePeriod) { /** * Get the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @return the governanceEmailNotification value. */ public GovernanceEmailNotification governanceEmailNotification() { @@ -141,12 +145,12 @@ public GovernanceEmailNotification governanceEmailNotification() { /** * Set the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @param governanceEmailNotification the governanceEmailNotification value to set. * @return the GovernanceAssignmentInner object itself. */ - public GovernanceAssignmentInner withGovernanceEmailNotification( - GovernanceEmailNotification governanceEmailNotification) { + public GovernanceAssignmentInner + withGovernanceEmailNotification(GovernanceEmailNotification governanceEmailNotification) { if (this.innerProperties() == null) { this.innerProperties = new GovernanceAssignmentProperties(); } @@ -157,7 +161,7 @@ public GovernanceAssignmentInner withGovernanceEmailNotification( /** * Get the additionalData property: The additional data for the governance assignment - e.g. links to ticket * (optional), see example. - * + * * @return the additionalData value. */ public GovernanceAssignmentAdditionalData additionalData() { @@ -167,7 +171,7 @@ public GovernanceAssignmentAdditionalData additionalData() { /** * Set the additionalData property: The additional data for the governance assignment - e.g. links to ticket * (optional), see example. - * + * * @param additionalData the additionalData value to set. * @return the GovernanceAssignmentInner object itself. */ @@ -181,7 +185,7 @@ public GovernanceAssignmentInner withAdditionalData(GovernanceAssignmentAddition /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentProperties.java index 4fe799c62798..48d00b1ec88b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceAssignmentProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Describes properties of an governance assignment. */ +/** + * Describes properties of an governance assignment. + */ @Fluent public final class GovernanceAssignmentProperties { /* @@ -22,7 +24,7 @@ public final class GovernanceAssignmentProperties { private String owner; /* - * The remediation due-date - after this date Secure Score will be affected (in case of active grace-period) + * The remediation due-date - after this date Secure Score will be affected (in case of active grace-period) */ @JsonProperty(value = "remediationDueDate", required = true) private OffsetDateTime remediationDueDate; @@ -52,13 +54,15 @@ public final class GovernanceAssignmentProperties { @JsonProperty(value = "additionalData") private GovernanceAssignmentAdditionalData additionalData; - /** Creates an instance of GovernanceAssignmentProperties class. */ + /** + * Creates an instance of GovernanceAssignmentProperties class. + */ public GovernanceAssignmentProperties() { } /** * Get the owner property: The Owner for the governance assignment - e.g. user@contoso.com - see example. - * + * * @return the owner value. */ public String owner() { @@ -67,7 +71,7 @@ public String owner() { /** * Set the owner property: The Owner for the governance assignment - e.g. user@contoso.com - see example. - * + * * @param owner the owner value to set. * @return the GovernanceAssignmentProperties object itself. */ @@ -77,9 +81,9 @@ public GovernanceAssignmentProperties withOwner(String owner) { } /** - * Get the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected (in - * case of active grace-period). - * + * Get the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected + * (in case of active grace-period). + * * @return the remediationDueDate value. */ public OffsetDateTime remediationDueDate() { @@ -87,9 +91,9 @@ public OffsetDateTime remediationDueDate() { } /** - * Set the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected (in - * case of active grace-period). - * + * Set the remediationDueDate property: The remediation due-date - after this date Secure Score will be affected + * (in case of active grace-period). + * * @param remediationDueDate the remediationDueDate value to set. * @return the GovernanceAssignmentProperties object itself. */ @@ -100,7 +104,7 @@ public GovernanceAssignmentProperties withRemediationDueDate(OffsetDateTime reme /** * Get the remediationEta property: The ETA (estimated time of arrival) for remediation (optional), see example. - * + * * @return the remediationEta value. */ public RemediationEta remediationEta() { @@ -109,7 +113,7 @@ public RemediationEta remediationEta() { /** * Set the remediationEta property: The ETA (estimated time of arrival) for remediation (optional), see example. - * + * * @param remediationEta the remediationEta value to set. * @return the GovernanceAssignmentProperties object itself. */ @@ -120,7 +124,7 @@ public GovernanceAssignmentProperties withRemediationEta(RemediationEta remediat /** * Get the isGracePeriod property: Defines whether there is a grace period on the governance assignment. - * + * * @return the isGracePeriod value. */ public Boolean isGracePeriod() { @@ -129,7 +133,7 @@ public Boolean isGracePeriod() { /** * Set the isGracePeriod property: Defines whether there is a grace period on the governance assignment. - * + * * @param isGracePeriod the isGracePeriod value to set. * @return the GovernanceAssignmentProperties object itself. */ @@ -141,7 +145,7 @@ public GovernanceAssignmentProperties withIsGracePeriod(Boolean isGracePeriod) { /** * Get the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @return the governanceEmailNotification value. */ public GovernanceEmailNotification governanceEmailNotification() { @@ -151,12 +155,12 @@ public GovernanceEmailNotification governanceEmailNotification() { /** * Set the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @param governanceEmailNotification the governanceEmailNotification value to set. * @return the GovernanceAssignmentProperties object itself. */ - public GovernanceAssignmentProperties withGovernanceEmailNotification( - GovernanceEmailNotification governanceEmailNotification) { + public GovernanceAssignmentProperties + withGovernanceEmailNotification(GovernanceEmailNotification governanceEmailNotification) { this.governanceEmailNotification = governanceEmailNotification; return this; } @@ -164,7 +168,7 @@ public GovernanceAssignmentProperties withGovernanceEmailNotification( /** * Get the additionalData property: The additional data for the governance assignment - e.g. links to ticket * (optional), see example. - * + * * @return the additionalData value. */ public GovernanceAssignmentAdditionalData additionalData() { @@ -174,7 +178,7 @@ public GovernanceAssignmentAdditionalData additionalData() { /** * Set the additionalData property: The additional data for the governance assignment - e.g. links to ticket * (optional), see example. - * + * * @param additionalData the additionalData value to set. * @return the GovernanceAssignmentProperties object itself. */ @@ -185,15 +189,13 @@ public GovernanceAssignmentProperties withAdditionalData(GovernanceAssignmentAdd /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (remediationDueDate() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property remediationDueDate in model GovernanceAssignmentProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property remediationDueDate in model GovernanceAssignmentProperties")); } if (remediationEta() != null) { remediationEta().validate(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleInner.java index 62781d9a3ac8..f8f9c07ca09d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleInner.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Governance rule over a given scope. */ +/** + * Governance rule over a given scope. + */ @Fluent public final class GovernanceRuleInner extends ProxyResource { /* @@ -23,13 +25,15 @@ public final class GovernanceRuleInner extends ProxyResource { @JsonProperty(value = "properties") private GovernanceRuleProperties innerProperties; - /** Creates an instance of GovernanceRuleInner class. */ + /** + * Creates an instance of GovernanceRuleInner class. + */ public GovernanceRuleInner() { } /** * Get the innerProperties property: Properties of a governance rule. - * + * * @return the innerProperties value. */ private GovernanceRuleProperties innerProperties() { @@ -38,7 +42,7 @@ private GovernanceRuleProperties innerProperties() { /** * Get the tenantId property: The tenantId (GUID). - * + * * @return the tenantId value. */ public String tenantId() { @@ -47,7 +51,7 @@ public String tenantId() { /** * Get the displayName property: Display name of the governance rule. - * + * * @return the displayName value. */ public String displayName() { @@ -56,7 +60,7 @@ public String displayName() { /** * Set the displayName property: Display name of the governance rule. - * + * * @param displayName the displayName value to set. * @return the GovernanceRuleInner object itself. */ @@ -70,7 +74,7 @@ public GovernanceRuleInner withDisplayName(String displayName) { /** * Get the description property: Description of the governance rule. - * + * * @return the description value. */ public String description() { @@ -79,7 +83,7 @@ public String description() { /** * Set the description property: Description of the governance rule. - * + * * @param description the description value to set. * @return the GovernanceRuleInner object itself. */ @@ -94,7 +98,7 @@ public GovernanceRuleInner withDescription(String description) { /** * Get the remediationTimeframe property: Governance rule remediation timeframe - this is the time that will affect * on the grace-period duration e.g. 7.00:00:00 - means 7 days. - * + * * @return the remediationTimeframe value. */ public String remediationTimeframe() { @@ -104,7 +108,7 @@ public String remediationTimeframe() { /** * Set the remediationTimeframe property: Governance rule remediation timeframe - this is the time that will affect * on the grace-period duration e.g. 7.00:00:00 - means 7 days. - * + * * @param remediationTimeframe the remediationTimeframe value to set. * @return the GovernanceRuleInner object itself. */ @@ -118,7 +122,7 @@ public GovernanceRuleInner withRemediationTimeframe(String remediationTimeframe) /** * Get the isGracePeriod property: Defines whether there is a grace period on the governance rule. - * + * * @return the isGracePeriod value. */ public Boolean isGracePeriod() { @@ -127,7 +131,7 @@ public Boolean isGracePeriod() { /** * Set the isGracePeriod property: Defines whether there is a grace period on the governance rule. - * + * * @param isGracePeriod the isGracePeriod value to set. * @return the GovernanceRuleInner object itself. */ @@ -142,7 +146,7 @@ public GovernanceRuleInner withIsGracePeriod(Boolean isGracePeriod) { /** * Get the rulePriority property: The governance rule priority, priority to the lower number. Rules with the same * priority on the same scope will not be allowed. - * + * * @return the rulePriority value. */ public Integer rulePriority() { @@ -152,7 +156,7 @@ public Integer rulePriority() { /** * Set the rulePriority property: The governance rule priority, priority to the lower number. Rules with the same * priority on the same scope will not be allowed. - * + * * @param rulePriority the rulePriority value to set. * @return the GovernanceRuleInner object itself. */ @@ -166,7 +170,7 @@ public GovernanceRuleInner withRulePriority(Integer rulePriority) { /** * Get the isDisabled property: Defines whether the rule is active/inactive. - * + * * @return the isDisabled value. */ public Boolean isDisabled() { @@ -175,7 +179,7 @@ public Boolean isDisabled() { /** * Set the isDisabled property: Defines whether the rule is active/inactive. - * + * * @param isDisabled the isDisabled value to set. * @return the GovernanceRuleInner object itself. */ @@ -189,7 +193,7 @@ public GovernanceRuleInner withIsDisabled(Boolean isDisabled) { /** * Get the ruleType property: The rule type of the governance rule, defines the source of the rule e.g. Integrated. - * + * * @return the ruleType value. */ public GovernanceRuleType ruleType() { @@ -198,7 +202,7 @@ public GovernanceRuleType ruleType() { /** * Set the ruleType property: The rule type of the governance rule, defines the source of the rule e.g. Integrated. - * + * * @param ruleType the ruleType value to set. * @return the GovernanceRuleInner object itself. */ @@ -212,7 +216,7 @@ public GovernanceRuleInner withRuleType(GovernanceRuleType ruleType) { /** * Get the sourceResourceType property: The governance rule source, what the rule affects, e.g. Assessments. - * + * * @return the sourceResourceType value. */ public GovernanceRuleSourceResourceType sourceResourceType() { @@ -221,7 +225,7 @@ public GovernanceRuleSourceResourceType sourceResourceType() { /** * Set the sourceResourceType property: The governance rule source, what the rule affects, e.g. Assessments. - * + * * @param sourceResourceType the sourceResourceType value to set. * @return the GovernanceRuleInner object itself. */ @@ -234,8 +238,9 @@ public GovernanceRuleInner withSourceResourceType(GovernanceRuleSourceResourceTy } /** - * Get the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management scopes). - * + * Get the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management + * scopes). + * * @return the excludedScopes value. */ public List excludedScopes() { @@ -243,8 +248,9 @@ public List excludedScopes() { } /** - * Set the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management scopes). - * + * Set the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management + * scopes). + * * @param excludedScopes the excludedScopes value to set. * @return the GovernanceRuleInner object itself. */ @@ -258,7 +264,7 @@ public GovernanceRuleInner withExcludedScopes(List excludedScopes) { /** * Get the conditionSets property: The governance rule conditionSets - see examples. - * + * * @return the conditionSets value. */ public List conditionSets() { @@ -267,7 +273,7 @@ public List conditionSets() { /** * Set the conditionSets property: The governance rule conditionSets - see examples. - * + * * @param conditionSets the conditionSets value to set. * @return the GovernanceRuleInner object itself. */ @@ -282,7 +288,7 @@ public GovernanceRuleInner withConditionSets(List conditionSets) { /** * Get the includeMemberScopes property: Defines whether the rule is management scope rule (master connector as a * single scope or management scope). - * + * * @return the includeMemberScopes value. */ public Boolean includeMemberScopes() { @@ -292,7 +298,7 @@ public Boolean includeMemberScopes() { /** * Set the includeMemberScopes property: Defines whether the rule is management scope rule (master connector as a * single scope or management scope). - * + * * @param includeMemberScopes the includeMemberScopes value to set. * @return the GovernanceRuleInner object itself. */ @@ -307,7 +313,7 @@ public GovernanceRuleInner withIncludeMemberScopes(Boolean includeMemberScopes) /** * Get the ownerSource property: The owner source for the governance rule - e.g. Manually by user@contoso.com - see * example. - * + * * @return the ownerSource value. */ public GovernanceRuleOwnerSource ownerSource() { @@ -317,7 +323,7 @@ public GovernanceRuleOwnerSource ownerSource() { /** * Set the ownerSource property: The owner source for the governance rule - e.g. Manually by user@contoso.com - see * example. - * + * * @param ownerSource the ownerSource value to set. * @return the GovernanceRuleInner object itself. */ @@ -332,7 +338,7 @@ public GovernanceRuleInner withOwnerSource(GovernanceRuleOwnerSource ownerSource /** * Get the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @return the governanceEmailNotification value. */ public GovernanceRuleEmailNotification governanceEmailNotification() { @@ -342,12 +348,12 @@ public GovernanceRuleEmailNotification governanceEmailNotification() { /** * Set the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @param governanceEmailNotification the governanceEmailNotification value to set. * @return the GovernanceRuleInner object itself. */ - public GovernanceRuleInner withGovernanceEmailNotification( - GovernanceRuleEmailNotification governanceEmailNotification) { + public GovernanceRuleInner + withGovernanceEmailNotification(GovernanceRuleEmailNotification governanceEmailNotification) { if (this.innerProperties() == null) { this.innerProperties = new GovernanceRuleProperties(); } @@ -357,7 +363,7 @@ public GovernanceRuleInner withGovernanceEmailNotification( /** * Get the metadata property: The governance rule metadata. - * + * * @return the metadata value. */ public GovernanceRuleMetadata metadata() { @@ -366,7 +372,7 @@ public GovernanceRuleMetadata metadata() { /** * Set the metadata property: The governance rule metadata. - * + * * @param metadata the metadata value to set. * @return the GovernanceRuleInner object itself. */ @@ -380,7 +386,7 @@ public GovernanceRuleInner withMetadata(GovernanceRuleMetadata metadata) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleProperties.java index d54629e94239..8840e80b5b41 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/GovernanceRuleProperties.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes properties of an governance rule. */ +/** + * Describes properties of an governance rule. + */ @Fluent public final class GovernanceRuleProperties { /* @@ -110,13 +112,15 @@ public final class GovernanceRuleProperties { @JsonProperty(value = "metadata") private GovernanceRuleMetadata metadata; - /** Creates an instance of GovernanceRuleProperties class. */ + /** + * Creates an instance of GovernanceRuleProperties class. + */ public GovernanceRuleProperties() { } /** * Get the tenantId property: The tenantId (GUID). - * + * * @return the tenantId value. */ public String tenantId() { @@ -125,7 +129,7 @@ public String tenantId() { /** * Get the displayName property: Display name of the governance rule. - * + * * @return the displayName value. */ public String displayName() { @@ -134,7 +138,7 @@ public String displayName() { /** * Set the displayName property: Display name of the governance rule. - * + * * @param displayName the displayName value to set. * @return the GovernanceRuleProperties object itself. */ @@ -145,7 +149,7 @@ public GovernanceRuleProperties withDisplayName(String displayName) { /** * Get the description property: Description of the governance rule. - * + * * @return the description value. */ public String description() { @@ -154,7 +158,7 @@ public String description() { /** * Set the description property: Description of the governance rule. - * + * * @param description the description value to set. * @return the GovernanceRuleProperties object itself. */ @@ -166,7 +170,7 @@ public GovernanceRuleProperties withDescription(String description) { /** * Get the remediationTimeframe property: Governance rule remediation timeframe - this is the time that will affect * on the grace-period duration e.g. 7.00:00:00 - means 7 days. - * + * * @return the remediationTimeframe value. */ public String remediationTimeframe() { @@ -176,7 +180,7 @@ public String remediationTimeframe() { /** * Set the remediationTimeframe property: Governance rule remediation timeframe - this is the time that will affect * on the grace-period duration e.g. 7.00:00:00 - means 7 days. - * + * * @param remediationTimeframe the remediationTimeframe value to set. * @return the GovernanceRuleProperties object itself. */ @@ -187,7 +191,7 @@ public GovernanceRuleProperties withRemediationTimeframe(String remediationTimef /** * Get the isGracePeriod property: Defines whether there is a grace period on the governance rule. - * + * * @return the isGracePeriod value. */ public Boolean isGracePeriod() { @@ -196,7 +200,7 @@ public Boolean isGracePeriod() { /** * Set the isGracePeriod property: Defines whether there is a grace period on the governance rule. - * + * * @param isGracePeriod the isGracePeriod value to set. * @return the GovernanceRuleProperties object itself. */ @@ -208,7 +212,7 @@ public GovernanceRuleProperties withIsGracePeriod(Boolean isGracePeriod) { /** * Get the rulePriority property: The governance rule priority, priority to the lower number. Rules with the same * priority on the same scope will not be allowed. - * + * * @return the rulePriority value. */ public int rulePriority() { @@ -218,7 +222,7 @@ public int rulePriority() { /** * Set the rulePriority property: The governance rule priority, priority to the lower number. Rules with the same * priority on the same scope will not be allowed. - * + * * @param rulePriority the rulePriority value to set. * @return the GovernanceRuleProperties object itself. */ @@ -229,7 +233,7 @@ public GovernanceRuleProperties withRulePriority(int rulePriority) { /** * Get the isDisabled property: Defines whether the rule is active/inactive. - * + * * @return the isDisabled value. */ public Boolean isDisabled() { @@ -238,7 +242,7 @@ public Boolean isDisabled() { /** * Set the isDisabled property: Defines whether the rule is active/inactive. - * + * * @param isDisabled the isDisabled value to set. * @return the GovernanceRuleProperties object itself. */ @@ -249,7 +253,7 @@ public GovernanceRuleProperties withIsDisabled(Boolean isDisabled) { /** * Get the ruleType property: The rule type of the governance rule, defines the source of the rule e.g. Integrated. - * + * * @return the ruleType value. */ public GovernanceRuleType ruleType() { @@ -258,7 +262,7 @@ public GovernanceRuleType ruleType() { /** * Set the ruleType property: The rule type of the governance rule, defines the source of the rule e.g. Integrated. - * + * * @param ruleType the ruleType value to set. * @return the GovernanceRuleProperties object itself. */ @@ -269,7 +273,7 @@ public GovernanceRuleProperties withRuleType(GovernanceRuleType ruleType) { /** * Get the sourceResourceType property: The governance rule source, what the rule affects, e.g. Assessments. - * + * * @return the sourceResourceType value. */ public GovernanceRuleSourceResourceType sourceResourceType() { @@ -278,7 +282,7 @@ public GovernanceRuleSourceResourceType sourceResourceType() { /** * Set the sourceResourceType property: The governance rule source, what the rule affects, e.g. Assessments. - * + * * @param sourceResourceType the sourceResourceType value to set. * @return the GovernanceRuleProperties object itself. */ @@ -288,8 +292,9 @@ public GovernanceRuleProperties withSourceResourceType(GovernanceRuleSourceResou } /** - * Get the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management scopes). - * + * Get the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management + * scopes). + * * @return the excludedScopes value. */ public List excludedScopes() { @@ -297,8 +302,9 @@ public List excludedScopes() { } /** - * Set the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management scopes). - * + * Set the excludedScopes property: Excluded scopes, filter out the descendants of the scope (on management + * scopes). + * * @param excludedScopes the excludedScopes value to set. * @return the GovernanceRuleProperties object itself. */ @@ -309,7 +315,7 @@ public GovernanceRuleProperties withExcludedScopes(List excludedScopes) /** * Get the conditionSets property: The governance rule conditionSets - see examples. - * + * * @return the conditionSets value. */ public List conditionSets() { @@ -318,7 +324,7 @@ public List conditionSets() { /** * Set the conditionSets property: The governance rule conditionSets - see examples. - * + * * @param conditionSets the conditionSets value to set. * @return the GovernanceRuleProperties object itself. */ @@ -330,7 +336,7 @@ public GovernanceRuleProperties withConditionSets(List conditionSets) { /** * Get the includeMemberScopes property: Defines whether the rule is management scope rule (master connector as a * single scope or management scope). - * + * * @return the includeMemberScopes value. */ public Boolean includeMemberScopes() { @@ -340,7 +346,7 @@ public Boolean includeMemberScopes() { /** * Set the includeMemberScopes property: Defines whether the rule is management scope rule (master connector as a * single scope or management scope). - * + * * @param includeMemberScopes the includeMemberScopes value to set. * @return the GovernanceRuleProperties object itself. */ @@ -352,7 +358,7 @@ public GovernanceRuleProperties withIncludeMemberScopes(Boolean includeMemberSco /** * Get the ownerSource property: The owner source for the governance rule - e.g. Manually by user@contoso.com - see * example. - * + * * @return the ownerSource value. */ public GovernanceRuleOwnerSource ownerSource() { @@ -362,7 +368,7 @@ public GovernanceRuleOwnerSource ownerSource() { /** * Set the ownerSource property: The owner source for the governance rule - e.g. Manually by user@contoso.com - see * example. - * + * * @param ownerSource the ownerSource value to set. * @return the GovernanceRuleProperties object itself. */ @@ -374,7 +380,7 @@ public GovernanceRuleProperties withOwnerSource(GovernanceRuleOwnerSource ownerS /** * Get the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @return the governanceEmailNotification value. */ public GovernanceRuleEmailNotification governanceEmailNotification() { @@ -384,19 +390,19 @@ public GovernanceRuleEmailNotification governanceEmailNotification() { /** * Set the governanceEmailNotification property: The email notifications settings for the governance rule, states * whether to disable notifications for mangers and owners. - * + * * @param governanceEmailNotification the governanceEmailNotification value to set. * @return the GovernanceRuleProperties object itself. */ - public GovernanceRuleProperties withGovernanceEmailNotification( - GovernanceRuleEmailNotification governanceEmailNotification) { + public GovernanceRuleProperties + withGovernanceEmailNotification(GovernanceRuleEmailNotification governanceEmailNotification) { this.governanceEmailNotification = governanceEmailNotification; return this; } /** * Get the metadata property: The governance rule metadata. - * + * * @return the metadata value. */ public GovernanceRuleMetadata metadata() { @@ -405,7 +411,7 @@ public GovernanceRuleMetadata metadata() { /** * Set the metadata property: The governance rule metadata. - * + * * @param metadata the metadata value to set. * @return the GovernanceRuleProperties object itself. */ @@ -416,39 +422,29 @@ public GovernanceRuleProperties withMetadata(GovernanceRuleMetadata metadata) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model GovernanceRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property displayName in model GovernanceRuleProperties")); } if (ruleType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property ruleType in model GovernanceRuleProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ruleType in model GovernanceRuleProperties")); } if (sourceResourceType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceResourceType in model GovernanceRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceResourceType in model GovernanceRuleProperties")); } if (conditionSets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property conditionSets in model GovernanceRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property conditionSets in model GovernanceRuleProperties")); } if (ownerSource() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property ownerSource in model GovernanceRuleProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property ownerSource in model GovernanceRuleProperties")); } else { ownerSource().validate(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportInner.java index 31f24ba0c299..75b77db58ad4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportInner.java @@ -13,8 +13,11 @@ import com.azure.resourcemanager.security.models.StatusAutoGenerated; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; +import java.util.Map; -/** The health report resource. */ +/** + * The health report resource. + */ @Fluent public final class HealthReportInner extends ProxyResource { /* @@ -23,13 +26,15 @@ public final class HealthReportInner extends ProxyResource { @JsonProperty(value = "properties") private HealthReportProperties innerProperties; - /** Creates an instance of HealthReportInner class. */ + /** + * Creates an instance of HealthReportInner class. + */ public HealthReportInner() { } /** * Get the innerProperties property: Properties of a health report. - * + * * @return the innerProperties value. */ private HealthReportProperties innerProperties() { @@ -38,7 +43,7 @@ private HealthReportProperties innerProperties() { /** * Get the resourceDetails property: The resource details of the health report. - * + * * @return the resourceDetails value. */ public ResourceDetailsAutoGenerated resourceDetails() { @@ -47,7 +52,7 @@ public ResourceDetailsAutoGenerated resourceDetails() { /** * Set the resourceDetails property: The resource details of the health report. - * + * * @param resourceDetails the resourceDetails value to set. * @return the HealthReportInner object itself. */ @@ -61,7 +66,7 @@ public HealthReportInner withResourceDetails(ResourceDetailsAutoGenerated resour /** * Get the environmentDetails property: The environment details of the resource. - * + * * @return the environmentDetails value. */ public EnvironmentDetails environmentDetails() { @@ -70,7 +75,7 @@ public EnvironmentDetails environmentDetails() { /** * Set the environmentDetails property: The environment details of the resource. - * + * * @param environmentDetails the environmentDetails value to set. * @return the HealthReportInner object itself. */ @@ -84,7 +89,7 @@ public HealthReportInner withEnvironmentDetails(EnvironmentDetails environmentDe /** * Get the healthDataClassification property: The classification of the health report. - * + * * @return the healthDataClassification value. */ public HealthDataClassification healthDataClassification() { @@ -93,7 +98,7 @@ public HealthDataClassification healthDataClassification() { /** * Set the healthDataClassification property: The classification of the health report. - * + * * @param healthDataClassification the healthDataClassification value to set. * @return the HealthReportInner object itself. */ @@ -107,7 +112,7 @@ public HealthReportInner withHealthDataClassification(HealthDataClassification h /** * Get the status property: The status of the health report. - * + * * @return the status value. */ public StatusAutoGenerated status() { @@ -116,7 +121,7 @@ public StatusAutoGenerated status() { /** * Set the status property: The status of the health report. - * + * * @param status the status value to set. * @return the HealthReportInner object itself. */ @@ -130,7 +135,7 @@ public HealthReportInner withStatus(StatusAutoGenerated status) { /** * Get the affectedDefendersPlans property: The affected defenders plans by unhealthy report. - * + * * @return the affectedDefendersPlans value. */ public List affectedDefendersPlans() { @@ -139,7 +144,7 @@ public List affectedDefendersPlans() { /** * Set the affectedDefendersPlans property: The affected defenders plans by unhealthy report. - * + * * @param affectedDefendersPlans the affectedDefendersPlans value to set. * @return the HealthReportInner object itself. */ @@ -151,9 +156,42 @@ public HealthReportInner withAffectedDefendersPlans(List affectedDefende return this; } + /** + * Get the affectedDefendersSubPlans property: The affected defenders sub plans by unhealthy report. + * + * @return the affectedDefendersSubPlans value. + */ + public List affectedDefendersSubPlans() { + return this.innerProperties() == null ? null : this.innerProperties().affectedDefendersSubPlans(); + } + + /** + * Set the affectedDefendersSubPlans property: The affected defenders sub plans by unhealthy report. + * + * @param affectedDefendersSubPlans the affectedDefendersSubPlans value to set. + * @return the HealthReportInner object itself. + */ + public HealthReportInner withAffectedDefendersSubPlans(List affectedDefendersSubPlans) { + if (this.innerProperties() == null) { + this.innerProperties = new HealthReportProperties(); + } + this.innerProperties().withAffectedDefendersSubPlans(affectedDefendersSubPlans); + return this; + } + + /** + * Get the reportAdditionalData property: Additional data for the given health report, this field can include more + * details on the resource and the health scenario. + * + * @return the reportAdditionalData value. + */ + public Map reportAdditionalData() { + return this.innerProperties() == null ? null : this.innerProperties().reportAdditionalData(); + } + /** * Get the issues property: A collection of the issues in the report. - * + * * @return the issues value. */ public List issues() { @@ -162,7 +200,7 @@ public List issues() { /** * Set the issues property: A collection of the issues in the report. - * + * * @param issues the issues value to set. * @return the HealthReportInner object itself. */ @@ -176,7 +214,7 @@ public HealthReportInner withIssues(List issues) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportProperties.java index 98ee1832e128..e503e82693b2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/HealthReportProperties.java @@ -10,10 +10,14 @@ import com.azure.resourcemanager.security.models.Issue; import com.azure.resourcemanager.security.models.ResourceDetailsAutoGenerated; import com.azure.resourcemanager.security.models.StatusAutoGenerated; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; +import java.util.Map; -/** Describes properties of the health report. */ +/** + * Describes properties of the health report. + */ @Fluent public final class HealthReportProperties { /* @@ -46,19 +50,35 @@ public final class HealthReportProperties { @JsonProperty(value = "affectedDefendersPlans") private List affectedDefendersPlans; + /* + * The affected defenders sub plans by unhealthy report + */ + @JsonProperty(value = "affectedDefendersSubPlans") + private List affectedDefendersSubPlans; + + /* + * Additional data for the given health report, this field can include more details on the resource and the health + * scenario. + */ + @JsonProperty(value = "reportAdditionalData", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map reportAdditionalData; + /* * A collection of the issues in the report */ @JsonProperty(value = "issues") private List issues; - /** Creates an instance of HealthReportProperties class. */ + /** + * Creates an instance of HealthReportProperties class. + */ public HealthReportProperties() { } /** * Get the resourceDetails property: The resource details of the health report. - * + * * @return the resourceDetails value. */ public ResourceDetailsAutoGenerated resourceDetails() { @@ -67,7 +87,7 @@ public ResourceDetailsAutoGenerated resourceDetails() { /** * Set the resourceDetails property: The resource details of the health report. - * + * * @param resourceDetails the resourceDetails value to set. * @return the HealthReportProperties object itself. */ @@ -78,7 +98,7 @@ public HealthReportProperties withResourceDetails(ResourceDetailsAutoGenerated r /** * Get the environmentDetails property: The environment details of the resource. - * + * * @return the environmentDetails value. */ public EnvironmentDetails environmentDetails() { @@ -87,7 +107,7 @@ public EnvironmentDetails environmentDetails() { /** * Set the environmentDetails property: The environment details of the resource. - * + * * @param environmentDetails the environmentDetails value to set. * @return the HealthReportProperties object itself. */ @@ -98,7 +118,7 @@ public HealthReportProperties withEnvironmentDetails(EnvironmentDetails environm /** * Get the healthDataClassification property: The classification of the health report. - * + * * @return the healthDataClassification value. */ public HealthDataClassification healthDataClassification() { @@ -107,7 +127,7 @@ public HealthDataClassification healthDataClassification() { /** * Set the healthDataClassification property: The classification of the health report. - * + * * @param healthDataClassification the healthDataClassification value to set. * @return the HealthReportProperties object itself. */ @@ -118,7 +138,7 @@ public HealthReportProperties withHealthDataClassification(HealthDataClassificat /** * Get the status property: The status of the health report. - * + * * @return the status value. */ public StatusAutoGenerated status() { @@ -127,7 +147,7 @@ public StatusAutoGenerated status() { /** * Set the status property: The status of the health report. - * + * * @param status the status value to set. * @return the HealthReportProperties object itself. */ @@ -138,7 +158,7 @@ public HealthReportProperties withStatus(StatusAutoGenerated status) { /** * Get the affectedDefendersPlans property: The affected defenders plans by unhealthy report. - * + * * @return the affectedDefendersPlans value. */ public List affectedDefendersPlans() { @@ -147,7 +167,7 @@ public List affectedDefendersPlans() { /** * Set the affectedDefendersPlans property: The affected defenders plans by unhealthy report. - * + * * @param affectedDefendersPlans the affectedDefendersPlans value to set. * @return the HealthReportProperties object itself. */ @@ -156,9 +176,39 @@ public HealthReportProperties withAffectedDefendersPlans(List affectedDe return this; } + /** + * Get the affectedDefendersSubPlans property: The affected defenders sub plans by unhealthy report. + * + * @return the affectedDefendersSubPlans value. + */ + public List affectedDefendersSubPlans() { + return this.affectedDefendersSubPlans; + } + + /** + * Set the affectedDefendersSubPlans property: The affected defenders sub plans by unhealthy report. + * + * @param affectedDefendersSubPlans the affectedDefendersSubPlans value to set. + * @return the HealthReportProperties object itself. + */ + public HealthReportProperties withAffectedDefendersSubPlans(List affectedDefendersSubPlans) { + this.affectedDefendersSubPlans = affectedDefendersSubPlans; + return this; + } + + /** + * Get the reportAdditionalData property: Additional data for the given health report, this field can include more + * details on the resource and the health scenario. + * + * @return the reportAdditionalData value. + */ + public Map reportAdditionalData() { + return this.reportAdditionalData; + } + /** * Get the issues property: A collection of the issues in the report. - * + * * @return the issues value. */ public List issues() { @@ -167,7 +217,7 @@ public List issues() { /** * Set the issues property: A collection of the issues in the report. - * + * * @param issues the issues value to set. * @return the HealthReportProperties object itself. */ @@ -178,7 +228,7 @@ public HealthReportProperties withIssues(List issues) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java index f146e90386f2..675a449f3fd5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java @@ -12,7 +12,9 @@ import java.time.OffsetDateTime; import java.util.Map; -/** Information protection policy. */ +/** + * Information protection policy. + */ @Fluent public final class InformationProtectionPolicyInner extends ProxyResource { /* @@ -21,13 +23,15 @@ public final class InformationProtectionPolicyInner extends ProxyResource { @JsonProperty(value = "properties") private InformationProtectionPolicyProperties innerProperties; - /** Creates an instance of InformationProtectionPolicyInner class. */ + /** + * Creates an instance of InformationProtectionPolicyInner class. + */ public InformationProtectionPolicyInner() { } /** * Get the innerProperties property: Information protection policy data. - * + * * @return the innerProperties value. */ private InformationProtectionPolicyProperties innerProperties() { @@ -36,7 +40,7 @@ private InformationProtectionPolicyProperties innerProperties() { /** * Get the lastModifiedUtc property: Describes the last UTC time the policy was modified. - * + * * @return the lastModifiedUtc value. */ public OffsetDateTime lastModifiedUtc() { @@ -45,7 +49,7 @@ public OffsetDateTime lastModifiedUtc() { /** * Get the version property: Describes the version of the policy. - * + * * @return the version value. */ public String version() { @@ -54,7 +58,7 @@ public String version() { /** * Get the labels property: Dictionary of sensitivity labels. - * + * * @return the labels value. */ public Map labels() { @@ -63,7 +67,7 @@ public Map labels() { /** * Set the labels property: Dictionary of sensitivity labels. - * + * * @param labels the labels value to set. * @return the InformationProtectionPolicyInner object itself. */ @@ -77,7 +81,7 @@ public InformationProtectionPolicyInner withLabels(Map /** * Get the informationTypes property: The sensitivity information types. - * + * * @return the informationTypes value. */ public Map informationTypes() { @@ -86,7 +90,7 @@ public Map informationTypes() { /** * Set the informationTypes property: The sensitivity information types. - * + * * @param informationTypes the informationTypes value to set. * @return the InformationProtectionPolicyInner object itself. */ @@ -100,7 +104,7 @@ public InformationProtectionPolicyInner withInformationTypes(Map informationTypes; - /** Creates an instance of InformationProtectionPolicyProperties class. */ + /** + * Creates an instance of InformationProtectionPolicyProperties class. + */ public InformationProtectionPolicyProperties() { } /** * Get the lastModifiedUtc property: Describes the last UTC time the policy was modified. - * + * * @return the lastModifiedUtc value. */ public OffsetDateTime lastModifiedUtc() { @@ -56,7 +60,7 @@ public OffsetDateTime lastModifiedUtc() { /** * Get the version property: Describes the version of the policy. - * + * * @return the version value. */ public String version() { @@ -65,7 +69,7 @@ public String version() { /** * Get the labels property: Dictionary of sensitivity labels. - * + * * @return the labels value. */ public Map labels() { @@ -74,7 +78,7 @@ public Map labels() { /** * Set the labels property: Dictionary of sensitivity labels. - * + * * @param labels the labels value to set. * @return the InformationProtectionPolicyProperties object itself. */ @@ -85,7 +89,7 @@ public InformationProtectionPolicyProperties withLabels(Map informationTypes() { @@ -94,7 +98,7 @@ public Map informationTypes() { /** * Set the informationTypes property: The sensitivity information types. - * + * * @param informationTypes the informationTypes value to set. * @return the InformationProtectionPolicyProperties object itself. */ @@ -105,29 +109,23 @@ public InformationProtectionPolicyProperties withInformationTypes(Map { - if (e != null) { - e.validate(); - } - }); + labels().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } if (informationTypes() != null) { - informationTypes() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + informationTypes().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingInner.java deleted file mode 100644 index 6bf368c4d201..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingInner.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configures how to correlate scan data and logs with resources associated with the subscription. */ -@Fluent -public final class IngestionSettingInner extends ProxyResource { - /* - * Ingestion setting data - */ - @JsonProperty(value = "properties") - private Object properties; - - /** Creates an instance of IngestionSettingInner class. */ - public IngestionSettingInner() { - } - - /** - * Get the properties property: Ingestion setting data. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: Ingestion setting data. - * - * @param properties the properties value to set. - * @return the IngestionSettingInner object itself. - */ - public IngestionSettingInner withProperties(Object properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingTokenInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingTokenInner.java deleted file mode 100644 index dd95c8c94ce6..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IngestionSettingTokenInner.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configures how to correlate scan data and logs with resources associated with the subscription. */ -@Immutable -public final class IngestionSettingTokenInner { - /* - * The token is used for correlating security data and logs with the resources in the subscription. - */ - @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) - private String token; - - /** Creates an instance of IngestionSettingTokenInner class. */ - public IngestionSettingTokenInner() { - } - - /** - * Get the token property: The token is used for correlating security data and logs with the resources in the - * subscription. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java index d6ac39d9089d..6e0d7744ab16 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java @@ -14,7 +14,9 @@ import java.util.List; import java.util.Map; -/** Security Solution Aggregated Alert information. */ +/** + * Security Solution Aggregated Alert information. + */ @Fluent public final class IoTSecurityAggregatedAlertInner extends ProxyResource { /* @@ -30,13 +32,15 @@ public final class IoTSecurityAggregatedAlertInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of IoTSecurityAggregatedAlertInner class. */ + /** + * Creates an instance of IoTSecurityAggregatedAlertInner class. + */ public IoTSecurityAggregatedAlertInner() { } /** * Get the innerProperties property: IoT Security solution aggregated alert details. - * + * * @return the innerProperties value. */ private IoTSecurityAggregatedAlertProperties innerProperties() { @@ -45,7 +49,7 @@ private IoTSecurityAggregatedAlertProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -54,7 +58,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the IoTSecurityAggregatedAlertInner object itself. */ @@ -65,7 +69,7 @@ public IoTSecurityAggregatedAlertInner withTags(Map tags) { /** * Get the alertType property: Name of the alert type. - * + * * @return the alertType value. */ public String alertType() { @@ -74,7 +78,7 @@ public String alertType() { /** * Get the alertDisplayName property: Display name of the alert type. - * + * * @return the alertDisplayName value. */ public String alertDisplayName() { @@ -83,7 +87,7 @@ public String alertDisplayName() { /** * Get the aggregatedDateUtc property: Date of detection. - * + * * @return the aggregatedDateUtc value. */ public LocalDate aggregatedDateUtc() { @@ -92,7 +96,7 @@ public LocalDate aggregatedDateUtc() { /** * Get the vendorName property: Name of the organization that raised the alert. - * + * * @return the vendorName value. */ public String vendorName() { @@ -101,7 +105,7 @@ public String vendorName() { /** * Get the reportedSeverity property: Assessed alert severity. - * + * * @return the reportedSeverity value. */ public ReportedSeverity reportedSeverity() { @@ -110,7 +114,7 @@ public ReportedSeverity reportedSeverity() { /** * Get the remediationSteps property: Recommended steps for remediation. - * + * * @return the remediationSteps value. */ public String remediationSteps() { @@ -119,7 +123,7 @@ public String remediationSteps() { /** * Get the description property: Description of the suspected vulnerability and meaning. - * + * * @return the description value. */ public String description() { @@ -128,7 +132,7 @@ public String description() { /** * Get the count property: Number of alerts occurrences within the aggregated time window. - * + * * @return the count value. */ public Long count() { @@ -137,7 +141,7 @@ public Long count() { /** * Get the effectedResourceType property: Azure resource ID of the resource that received the alerts. - * + * * @return the effectedResourceType value. */ public String effectedResourceType() { @@ -146,7 +150,7 @@ public String effectedResourceType() { /** * Get the systemSource property: The type of the alerted resource (Azure, Non-Azure). - * + * * @return the systemSource value. */ public String systemSource() { @@ -155,7 +159,7 @@ public String systemSource() { /** * Get the actionTaken property: IoT Security solution alert response. - * + * * @return the actionTaken value. */ public String actionTaken() { @@ -164,7 +168,7 @@ public String actionTaken() { /** * Get the logAnalyticsQuery property: Log analytics query for getting the list of affected devices/alerts. - * + * * @return the logAnalyticsQuery value. */ public String logAnalyticsQuery() { @@ -174,7 +178,7 @@ public String logAnalyticsQuery() { /** * Get the topDevicesList property: 10 devices with the highest number of occurrences of this alert type, on this * day. - * + * * @return the topDevicesList value. */ public List topDevicesList() { @@ -183,7 +187,7 @@ public List topDevicesLi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertProperties.java index 7413ba8442db..98c98aaa7f3b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertProperties.java @@ -11,7 +11,9 @@ import java.time.LocalDate; import java.util.List; -/** IoT Security solution aggregated alert details. */ +/** + * IoT Security solution aggregated alert details. + */ @Immutable public final class IoTSecurityAggregatedAlertProperties { /* @@ -92,13 +94,15 @@ public final class IoTSecurityAggregatedAlertProperties { @JsonProperty(value = "topDevicesList", access = JsonProperty.Access.WRITE_ONLY) private List topDevicesList; - /** Creates an instance of IoTSecurityAggregatedAlertProperties class. */ + /** + * Creates an instance of IoTSecurityAggregatedAlertProperties class. + */ public IoTSecurityAggregatedAlertProperties() { } /** * Get the alertType property: Name of the alert type. - * + * * @return the alertType value. */ public String alertType() { @@ -107,7 +111,7 @@ public String alertType() { /** * Get the alertDisplayName property: Display name of the alert type. - * + * * @return the alertDisplayName value. */ public String alertDisplayName() { @@ -116,7 +120,7 @@ public String alertDisplayName() { /** * Get the aggregatedDateUtc property: Date of detection. - * + * * @return the aggregatedDateUtc value. */ public LocalDate aggregatedDateUtc() { @@ -125,7 +129,7 @@ public LocalDate aggregatedDateUtc() { /** * Get the vendorName property: Name of the organization that raised the alert. - * + * * @return the vendorName value. */ public String vendorName() { @@ -134,7 +138,7 @@ public String vendorName() { /** * Get the reportedSeverity property: Assessed alert severity. - * + * * @return the reportedSeverity value. */ public ReportedSeverity reportedSeverity() { @@ -143,7 +147,7 @@ public ReportedSeverity reportedSeverity() { /** * Get the remediationSteps property: Recommended steps for remediation. - * + * * @return the remediationSteps value. */ public String remediationSteps() { @@ -152,7 +156,7 @@ public String remediationSteps() { /** * Get the description property: Description of the suspected vulnerability and meaning. - * + * * @return the description value. */ public String description() { @@ -161,7 +165,7 @@ public String description() { /** * Get the count property: Number of alerts occurrences within the aggregated time window. - * + * * @return the count value. */ public Long count() { @@ -170,7 +174,7 @@ public Long count() { /** * Get the effectedResourceType property: Azure resource ID of the resource that received the alerts. - * + * * @return the effectedResourceType value. */ public String effectedResourceType() { @@ -179,7 +183,7 @@ public String effectedResourceType() { /** * Get the systemSource property: The type of the alerted resource (Azure, Non-Azure). - * + * * @return the systemSource value. */ public String systemSource() { @@ -188,7 +192,7 @@ public String systemSource() { /** * Get the actionTaken property: IoT Security solution alert response. - * + * * @return the actionTaken value. */ public String actionTaken() { @@ -197,7 +201,7 @@ public String actionTaken() { /** * Get the logAnalyticsQuery property: Log analytics query for getting the list of affected devices/alerts. - * + * * @return the logAnalyticsQuery value. */ public String logAnalyticsQuery() { @@ -207,7 +211,7 @@ public String logAnalyticsQuery() { /** * Get the topDevicesList property: 10 devices with the highest number of occurrences of this alert type, on this * day. - * + * * @return the topDevicesList value. */ public List topDevicesList() { @@ -216,7 +220,7 @@ public List topDevicesLi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java index 9d9a7c3beb31..ae23b23f9aea 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** IoT Security solution recommendation information. */ +/** + * IoT Security solution recommendation information. + */ @Fluent public final class IoTSecurityAggregatedRecommendationInner extends ProxyResource { /* @@ -27,13 +29,15 @@ public final class IoTSecurityAggregatedRecommendationInner extends ProxyResourc @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of IoTSecurityAggregatedRecommendationInner class. */ + /** + * Creates an instance of IoTSecurityAggregatedRecommendationInner class. + */ public IoTSecurityAggregatedRecommendationInner() { } /** * Get the innerProperties property: Security Solution data. - * + * * @return the innerProperties value. */ private IoTSecurityAggregatedRecommendationProperties innerProperties() { @@ -42,7 +46,7 @@ private IoTSecurityAggregatedRecommendationProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -51,7 +55,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the IoTSecurityAggregatedRecommendationInner object itself. */ @@ -62,7 +66,7 @@ public IoTSecurityAggregatedRecommendationInner withTags(Map tag /** * Get the recommendationName property: Name of the recommendation. - * + * * @return the recommendationName value. */ public String recommendationName() { @@ -71,7 +75,7 @@ public String recommendationName() { /** * Set the recommendationName property: Name of the recommendation. - * + * * @param recommendationName the recommendationName value to set. * @return the IoTSecurityAggregatedRecommendationInner object itself. */ @@ -85,7 +89,7 @@ public IoTSecurityAggregatedRecommendationInner withRecommendationName(String re /** * Get the recommendationDisplayName property: Display name of the recommendation type. - * + * * @return the recommendationDisplayName value. */ public String recommendationDisplayName() { @@ -94,7 +98,7 @@ public String recommendationDisplayName() { /** * Get the description property: Description of the suspected vulnerability and meaning. - * + * * @return the description value. */ public String description() { @@ -103,7 +107,7 @@ public String description() { /** * Get the recommendationTypeId property: Recommendation-type GUID. - * + * * @return the recommendationTypeId value. */ public String recommendationTypeId() { @@ -112,7 +116,7 @@ public String recommendationTypeId() { /** * Get the detectedBy property: Name of the organization that made the recommendation. - * + * * @return the detectedBy value. */ public String detectedBy() { @@ -121,7 +125,7 @@ public String detectedBy() { /** * Get the remediationSteps property: Recommended steps for remediation. - * + * * @return the remediationSteps value. */ public String remediationSteps() { @@ -130,7 +134,7 @@ public String remediationSteps() { /** * Get the reportedSeverity property: Assessed recommendation severity. - * + * * @return the reportedSeverity value. */ public ReportedSeverity reportedSeverity() { @@ -139,7 +143,7 @@ public ReportedSeverity reportedSeverity() { /** * Get the healthyDevices property: Number of healthy devices within the IoT Security solution. - * + * * @return the healthyDevices value. */ public Long healthyDevices() { @@ -148,7 +152,7 @@ public Long healthyDevices() { /** * Get the unhealthyDeviceCount property: Number of unhealthy devices within the IoT Security solution. - * + * * @return the unhealthyDeviceCount value. */ public Long unhealthyDeviceCount() { @@ -157,7 +161,7 @@ public Long unhealthyDeviceCount() { /** * Get the logAnalyticsQuery property: Log analytics query for getting the list of affected devices/alerts. - * + * * @return the logAnalyticsQuery value. */ public String logAnalyticsQuery() { @@ -166,7 +170,7 @@ public String logAnalyticsQuery() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationProperties.java index 9ee966078183..0c1305dc7710 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.models.ReportedSeverity; import com.fasterxml.jackson.annotation.JsonProperty; -/** IoT Security solution aggregated recommendation information. */ +/** + * IoT Security solution aggregated recommendation information. + */ @Fluent public final class IoTSecurityAggregatedRecommendationProperties { /* @@ -71,13 +73,15 @@ public final class IoTSecurityAggregatedRecommendationProperties { @JsonProperty(value = "logAnalyticsQuery", access = JsonProperty.Access.WRITE_ONLY) private String logAnalyticsQuery; - /** Creates an instance of IoTSecurityAggregatedRecommendationProperties class. */ + /** + * Creates an instance of IoTSecurityAggregatedRecommendationProperties class. + */ public IoTSecurityAggregatedRecommendationProperties() { } /** * Get the recommendationName property: Name of the recommendation. - * + * * @return the recommendationName value. */ public String recommendationName() { @@ -86,7 +90,7 @@ public String recommendationName() { /** * Set the recommendationName property: Name of the recommendation. - * + * * @param recommendationName the recommendationName value to set. * @return the IoTSecurityAggregatedRecommendationProperties object itself. */ @@ -97,7 +101,7 @@ public IoTSecurityAggregatedRecommendationProperties withRecommendationName(Stri /** * Get the recommendationDisplayName property: Display name of the recommendation type. - * + * * @return the recommendationDisplayName value. */ public String recommendationDisplayName() { @@ -106,7 +110,7 @@ public String recommendationDisplayName() { /** * Get the description property: Description of the suspected vulnerability and meaning. - * + * * @return the description value. */ public String description() { @@ -115,7 +119,7 @@ public String description() { /** * Get the recommendationTypeId property: Recommendation-type GUID. - * + * * @return the recommendationTypeId value. */ public String recommendationTypeId() { @@ -124,7 +128,7 @@ public String recommendationTypeId() { /** * Get the detectedBy property: Name of the organization that made the recommendation. - * + * * @return the detectedBy value. */ public String detectedBy() { @@ -133,7 +137,7 @@ public String detectedBy() { /** * Get the remediationSteps property: Recommended steps for remediation. - * + * * @return the remediationSteps value. */ public String remediationSteps() { @@ -142,7 +146,7 @@ public String remediationSteps() { /** * Get the reportedSeverity property: Assessed recommendation severity. - * + * * @return the reportedSeverity value. */ public ReportedSeverity reportedSeverity() { @@ -151,7 +155,7 @@ public ReportedSeverity reportedSeverity() { /** * Get the healthyDevices property: Number of healthy devices within the IoT Security solution. - * + * * @return the healthyDevices value. */ public Long healthyDevices() { @@ -160,7 +164,7 @@ public Long healthyDevices() { /** * Get the unhealthyDeviceCount property: Number of unhealthy devices within the IoT Security solution. - * + * * @return the unhealthyDeviceCount value. */ public Long unhealthyDeviceCount() { @@ -169,7 +173,7 @@ public Long unhealthyDeviceCount() { /** * Get the logAnalyticsQuery property: Log analytics query for getting the list of affected devices/alerts. - * + * * @return the logAnalyticsQuery value. */ public String logAnalyticsQuery() { @@ -178,7 +182,7 @@ public String logAnalyticsQuery() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelInner.java index fb70db188a5e..3ed64aca81d3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelInner.java @@ -14,22 +14,26 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Security analytics of your IoT Security solution. */ +/** + * Security analytics of your IoT Security solution. + */ @Fluent public final class IoTSecuritySolutionAnalyticsModelInner extends ProxyResource { /* - * Security Solution Aggregated Alert data + * Security Solution Aggregated Alert data */ @JsonProperty(value = "properties") private IoTSecuritySolutionAnalyticsModelProperties innerProperties; - /** Creates an instance of IoTSecuritySolutionAnalyticsModelInner class. */ + /** + * Creates an instance of IoTSecuritySolutionAnalyticsModelInner class. + */ public IoTSecuritySolutionAnalyticsModelInner() { } /** * Get the innerProperties property: Security Solution Aggregated Alert data. - * + * * @return the innerProperties value. */ private IoTSecuritySolutionAnalyticsModelProperties innerProperties() { @@ -38,7 +42,7 @@ private IoTSecuritySolutionAnalyticsModelProperties innerProperties() { /** * Get the metrics property: Security analytics of your IoT Security solution. - * + * * @return the metrics value. */ public IoTSeverityMetrics metrics() { @@ -47,7 +51,7 @@ public IoTSeverityMetrics metrics() { /** * Get the unhealthyDeviceCount property: Number of unhealthy devices within your IoT Security solution. - * + * * @return the unhealthyDeviceCount value. */ public Long unhealthyDeviceCount() { @@ -56,7 +60,7 @@ public Long unhealthyDeviceCount() { /** * Get the devicesMetrics property: List of device metrics by the aggregation date. - * + * * @return the devicesMetrics value. */ public List devicesMetrics() { @@ -65,7 +69,7 @@ public List devic /** * Get the topAlertedDevices property: List of the 3 devices with the most alerts. - * + * * @return the topAlertedDevices value. */ public List topAlertedDevices() { @@ -74,12 +78,12 @@ public List topAlertedDevices() { /** * Set the topAlertedDevices property: List of the 3 devices with the most alerts. - * + * * @param topAlertedDevices the topAlertedDevices value to set. * @return the IoTSecuritySolutionAnalyticsModelInner object itself. */ - public IoTSecuritySolutionAnalyticsModelInner withTopAlertedDevices( - List topAlertedDevices) { + public IoTSecuritySolutionAnalyticsModelInner + withTopAlertedDevices(List topAlertedDevices) { if (this.innerProperties() == null) { this.innerProperties = new IoTSecuritySolutionAnalyticsModelProperties(); } @@ -89,7 +93,7 @@ public IoTSecuritySolutionAnalyticsModelInner withTopAlertedDevices( /** * Get the mostPrevalentDeviceAlerts property: List of the 3 most prevalent device alerts. - * + * * @return the mostPrevalentDeviceAlerts value. */ public List mostPrevalentDeviceAlerts() { @@ -98,12 +102,12 @@ public List mostPrevalentDeviceAlerts() { /** * Set the mostPrevalentDeviceAlerts property: List of the 3 most prevalent device alerts. - * + * * @param mostPrevalentDeviceAlerts the mostPrevalentDeviceAlerts value to set. * @return the IoTSecuritySolutionAnalyticsModelInner object itself. */ - public IoTSecuritySolutionAnalyticsModelInner withMostPrevalentDeviceAlerts( - List mostPrevalentDeviceAlerts) { + public IoTSecuritySolutionAnalyticsModelInner + withMostPrevalentDeviceAlerts(List mostPrevalentDeviceAlerts) { if (this.innerProperties() == null) { this.innerProperties = new IoTSecuritySolutionAnalyticsModelProperties(); } @@ -113,7 +117,7 @@ public IoTSecuritySolutionAnalyticsModelInner withMostPrevalentDeviceAlerts( /** * Get the mostPrevalentDeviceRecommendations property: List of the 3 most prevalent device recommendations. - * + * * @return the mostPrevalentDeviceRecommendations value. */ public List mostPrevalentDeviceRecommendations() { @@ -122,7 +126,7 @@ public List mostPrevalentDeviceRecommendations( /** * Set the mostPrevalentDeviceRecommendations property: List of the 3 most prevalent device recommendations. - * + * * @param mostPrevalentDeviceRecommendations the mostPrevalentDeviceRecommendations value to set. * @return the IoTSecuritySolutionAnalyticsModelInner object itself. */ @@ -137,7 +141,7 @@ public IoTSecuritySolutionAnalyticsModelInner withMostPrevalentDeviceRecommendat /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelListInner.java index 05ebcd73f079..5b485603f753 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelListInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelListInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of Security analytics of your IoT Security solution. */ +/** + * List of Security analytics of your IoT Security solution. + */ @Fluent public final class IoTSecuritySolutionAnalyticsModelListInner { /* @@ -24,13 +26,15 @@ public final class IoTSecuritySolutionAnalyticsModelListInner { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of IoTSecuritySolutionAnalyticsModelListInner class. */ + /** + * Creates an instance of IoTSecuritySolutionAnalyticsModelListInner class. + */ public IoTSecuritySolutionAnalyticsModelListInner() { } /** * Get the value property: List of Security analytics of your IoT Security solution. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of Security analytics of your IoT Security solution. - * + * * @param value the value value to set. * @return the IoTSecuritySolutionAnalyticsModelListInner object itself. */ @@ -50,7 +54,7 @@ public IoTSecuritySolutionAnalyticsModelListInner withValue(List e.validate()); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelProperties.java index 6ca28aeb9f29..c43a6fdf5de6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionAnalyticsModelProperties.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Security analytics properties of your IoT Security solution. */ +/** + * Security analytics properties of your IoT Security solution. + */ @Fluent public final class IoTSecuritySolutionAnalyticsModelProperties { /* @@ -52,13 +54,15 @@ public final class IoTSecuritySolutionAnalyticsModelProperties { @JsonProperty(value = "mostPrevalentDeviceRecommendations") private List mostPrevalentDeviceRecommendations; - /** Creates an instance of IoTSecuritySolutionAnalyticsModelProperties class. */ + /** + * Creates an instance of IoTSecuritySolutionAnalyticsModelProperties class. + */ public IoTSecuritySolutionAnalyticsModelProperties() { } /** * Get the metrics property: Security analytics of your IoT Security solution. - * + * * @return the metrics value. */ public IoTSeverityMetrics metrics() { @@ -67,7 +71,7 @@ public IoTSeverityMetrics metrics() { /** * Get the unhealthyDeviceCount property: Number of unhealthy devices within your IoT Security solution. - * + * * @return the unhealthyDeviceCount value. */ public Long unhealthyDeviceCount() { @@ -76,7 +80,7 @@ public Long unhealthyDeviceCount() { /** * Get the devicesMetrics property: List of device metrics by the aggregation date. - * + * * @return the devicesMetrics value. */ public List devicesMetrics() { @@ -85,7 +89,7 @@ public List devic /** * Get the topAlertedDevices property: List of the 3 devices with the most alerts. - * + * * @return the topAlertedDevices value. */ public List topAlertedDevices() { @@ -94,19 +98,19 @@ public List topAlertedDevices() { /** * Set the topAlertedDevices property: List of the 3 devices with the most alerts. - * + * * @param topAlertedDevices the topAlertedDevices value to set. * @return the IoTSecuritySolutionAnalyticsModelProperties object itself. */ - public IoTSecuritySolutionAnalyticsModelProperties withTopAlertedDevices( - List topAlertedDevices) { + public IoTSecuritySolutionAnalyticsModelProperties + withTopAlertedDevices(List topAlertedDevices) { this.topAlertedDevices = topAlertedDevices; return this; } /** * Get the mostPrevalentDeviceAlerts property: List of the 3 most prevalent device alerts. - * + * * @return the mostPrevalentDeviceAlerts value. */ public List mostPrevalentDeviceAlerts() { @@ -115,19 +119,19 @@ public List mostPrevalentDeviceAlerts() { /** * Set the mostPrevalentDeviceAlerts property: List of the 3 most prevalent device alerts. - * + * * @param mostPrevalentDeviceAlerts the mostPrevalentDeviceAlerts value to set. * @return the IoTSecuritySolutionAnalyticsModelProperties object itself. */ - public IoTSecuritySolutionAnalyticsModelProperties withMostPrevalentDeviceAlerts( - List mostPrevalentDeviceAlerts) { + public IoTSecuritySolutionAnalyticsModelProperties + withMostPrevalentDeviceAlerts(List mostPrevalentDeviceAlerts) { this.mostPrevalentDeviceAlerts = mostPrevalentDeviceAlerts; return this; } /** * Get the mostPrevalentDeviceRecommendations property: List of the 3 most prevalent device recommendations. - * + * * @return the mostPrevalentDeviceRecommendations value. */ public List mostPrevalentDeviceRecommendations() { @@ -136,7 +140,7 @@ public List mostPrevalentDeviceRecommendations( /** * Set the mostPrevalentDeviceRecommendations property: List of the 3 most prevalent device recommendations. - * + * * @param mostPrevalentDeviceRecommendations the mostPrevalentDeviceRecommendations value to set. * @return the IoTSecuritySolutionAnalyticsModelProperties object itself. */ @@ -148,7 +152,7 @@ public IoTSecuritySolutionAnalyticsModelProperties withMostPrevalentDeviceRecomm /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java index 6659bf29c42b..215dba52bc7e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java @@ -19,7 +19,9 @@ import java.util.List; import java.util.Map; -/** IoT Security solution configuration and resource information. */ +/** + * IoT Security solution configuration and resource information. + */ @Fluent public final class IoTSecuritySolutionModelInner extends ProxyResource { /* @@ -47,13 +49,15 @@ public final class IoTSecuritySolutionModelInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of IoTSecuritySolutionModelInner class. */ + /** + * Creates an instance of IoTSecuritySolutionModelInner class. + */ public IoTSecuritySolutionModelInner() { } /** * Get the location property: The resource location. - * + * * @return the location value. */ public String location() { @@ -62,7 +66,7 @@ public String location() { /** * Set the location property: The resource location. - * + * * @param location the location value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -73,7 +77,7 @@ public IoTSecuritySolutionModelInner withLocation(String location) { /** * Get the innerProperties property: Security Solution data. - * + * * @return the innerProperties value. */ private IoTSecuritySolutionProperties innerProperties() { @@ -82,7 +86,7 @@ private IoTSecuritySolutionProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -91,7 +95,7 @@ public SystemData systemData() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -100,7 +104,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -111,7 +115,7 @@ public IoTSecuritySolutionModelInner withTags(Map tags) { /** * Get the workspace property: Workspace resource ID. - * + * * @return the workspace value. */ public String workspace() { @@ -120,7 +124,7 @@ public String workspace() { /** * Set the workspace property: Workspace resource ID. - * + * * @param workspace the workspace value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -134,7 +138,7 @@ public IoTSecuritySolutionModelInner withWorkspace(String workspace) { /** * Get the displayName property: Resource display name. - * + * * @return the displayName value. */ public String displayName() { @@ -143,7 +147,7 @@ public String displayName() { /** * Set the displayName property: Resource display name. - * + * * @param displayName the displayName value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -157,7 +161,7 @@ public IoTSecuritySolutionModelInner withDisplayName(String displayName) { /** * Get the status property: Status of the IoT Security solution. - * + * * @return the status value. */ public SecuritySolutionStatus status() { @@ -166,7 +170,7 @@ public SecuritySolutionStatus status() { /** * Set the status property: Status of the IoT Security solution. - * + * * @param status the status value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -180,7 +184,7 @@ public IoTSecuritySolutionModelInner withStatus(SecuritySolutionStatus status) { /** * Get the export property: List of additional options for exporting to workspace data. - * + * * @return the export value. */ public List export() { @@ -189,7 +193,7 @@ public List export() { /** * Set the export property: List of additional options for exporting to workspace data. - * + * * @param export the export value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -202,8 +206,9 @@ public IoTSecuritySolutionModelInner withExport(List export) { } /** - * Get the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system. - * + * Get the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the + * system. + * * @return the disabledDataSources value. */ public List disabledDataSources() { @@ -211,8 +216,9 @@ public List disabledDataSources() { } /** - * Set the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system. - * + * Set the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the + * system. + * * @param disabledDataSources the disabledDataSources value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -226,7 +232,7 @@ public IoTSecuritySolutionModelInner withDisabledDataSources(List di /** * Get the iotHubs property: IoT Hub resource IDs. - * + * * @return the iotHubs value. */ public List iotHubs() { @@ -235,7 +241,7 @@ public List iotHubs() { /** * Set the iotHubs property: IoT Hub resource IDs. - * + * * @param iotHubs the iotHubs value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -249,7 +255,7 @@ public IoTSecuritySolutionModelInner withIotHubs(List iotHubs) { /** * Get the userDefinedResources property: Properties of the IoT Security solution's user defined resources. - * + * * @return the userDefinedResources value. */ public UserDefinedResourcesProperties userDefinedResources() { @@ -258,7 +264,7 @@ public UserDefinedResourcesProperties userDefinedResources() { /** * Set the userDefinedResources property: Properties of the IoT Security solution's user defined resources. - * + * * @param userDefinedResources the userDefinedResources value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -271,9 +277,9 @@ public IoTSecuritySolutionModelInner withUserDefinedResources(UserDefinedResourc } /** - * Get the autoDiscoveredResources property: List of resources that were automatically discovered as relevant to the - * security solution. - * + * Get the autoDiscoveredResources property: List of resources that were automatically discovered as relevant to + * the security solution. + * * @return the autoDiscoveredResources value. */ public List autoDiscoveredResources() { @@ -282,7 +288,7 @@ public List autoDiscoveredResources() { /** * Get the recommendationsConfiguration property: List of the configuration status for each recommendation type. - * + * * @return the recommendationsConfiguration value. */ public List recommendationsConfiguration() { @@ -291,12 +297,12 @@ public List recommendationsConfiguration( /** * Set the recommendationsConfiguration property: List of the configuration status for each recommendation type. - * + * * @param recommendationsConfiguration the recommendationsConfiguration value to set. * @return the IoTSecuritySolutionModelInner object itself. */ - public IoTSecuritySolutionModelInner withRecommendationsConfiguration( - List recommendationsConfiguration) { + public IoTSecuritySolutionModelInner + withRecommendationsConfiguration(List recommendationsConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new IoTSecuritySolutionProperties(); } @@ -306,7 +312,7 @@ public IoTSecuritySolutionModelInner withRecommendationsConfiguration( /** * Get the unmaskedIpLoggingStatus property: Unmasked IP address logging status. - * + * * @return the unmaskedIpLoggingStatus value. */ public UnmaskedIpLoggingStatus unmaskedIpLoggingStatus() { @@ -315,7 +321,7 @@ public UnmaskedIpLoggingStatus unmaskedIpLoggingStatus() { /** * Set the unmaskedIpLoggingStatus property: Unmasked IP address logging status. - * + * * @param unmaskedIpLoggingStatus the unmaskedIpLoggingStatus value to set. * @return the IoTSecuritySolutionModelInner object itself. */ @@ -329,7 +335,7 @@ public IoTSecuritySolutionModelInner withUnmaskedIpLoggingStatus(UnmaskedIpLoggi /** * Get the additionalWorkspaces property: List of additional workspaces. - * + * * @return the additionalWorkspaces value. */ public List additionalWorkspaces() { @@ -338,12 +344,12 @@ public List additionalWorkspaces() { /** * Set the additionalWorkspaces property: List of additional workspaces. - * + * * @param additionalWorkspaces the additionalWorkspaces value to set. * @return the IoTSecuritySolutionModelInner object itself. */ - public IoTSecuritySolutionModelInner withAdditionalWorkspaces( - List additionalWorkspaces) { + public IoTSecuritySolutionModelInner + withAdditionalWorkspaces(List additionalWorkspaces) { if (this.innerProperties() == null) { this.innerProperties = new IoTSecuritySolutionProperties(); } @@ -353,7 +359,7 @@ public IoTSecuritySolutionModelInner withAdditionalWorkspaces( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionProperties.java index daddad737073..b50c1d45301d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionProperties.java @@ -16,7 +16,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Security Solution setting data. */ +/** + * Security Solution setting data. + */ @Fluent public final class IoTSecuritySolutionProperties { /* @@ -85,13 +87,15 @@ public final class IoTSecuritySolutionProperties { @JsonProperty(value = "additionalWorkspaces") private List additionalWorkspaces; - /** Creates an instance of IoTSecuritySolutionProperties class. */ + /** + * Creates an instance of IoTSecuritySolutionProperties class. + */ public IoTSecuritySolutionProperties() { } /** * Get the workspace property: Workspace resource ID. - * + * * @return the workspace value. */ public String workspace() { @@ -100,7 +104,7 @@ public String workspace() { /** * Set the workspace property: Workspace resource ID. - * + * * @param workspace the workspace value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -111,7 +115,7 @@ public IoTSecuritySolutionProperties withWorkspace(String workspace) { /** * Get the displayName property: Resource display name. - * + * * @return the displayName value. */ public String displayName() { @@ -120,7 +124,7 @@ public String displayName() { /** * Set the displayName property: Resource display name. - * + * * @param displayName the displayName value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -131,7 +135,7 @@ public IoTSecuritySolutionProperties withDisplayName(String displayName) { /** * Get the status property: Status of the IoT Security solution. - * + * * @return the status value. */ public SecuritySolutionStatus status() { @@ -140,7 +144,7 @@ public SecuritySolutionStatus status() { /** * Set the status property: Status of the IoT Security solution. - * + * * @param status the status value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -151,7 +155,7 @@ public IoTSecuritySolutionProperties withStatus(SecuritySolutionStatus status) { /** * Get the export property: List of additional options for exporting to workspace data. - * + * * @return the export value. */ public List export() { @@ -160,7 +164,7 @@ public List export() { /** * Set the export property: List of additional options for exporting to workspace data. - * + * * @param export the export value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -170,8 +174,9 @@ public IoTSecuritySolutionProperties withExport(List export) { } /** - * Get the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system. - * + * Get the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the + * system. + * * @return the disabledDataSources value. */ public List disabledDataSources() { @@ -179,8 +184,9 @@ public List disabledDataSources() { } /** - * Set the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system. - * + * Set the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the + * system. + * * @param disabledDataSources the disabledDataSources value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -191,7 +197,7 @@ public IoTSecuritySolutionProperties withDisabledDataSources(List di /** * Get the iotHubs property: IoT Hub resource IDs. - * + * * @return the iotHubs value. */ public List iotHubs() { @@ -200,7 +206,7 @@ public List iotHubs() { /** * Set the iotHubs property: IoT Hub resource IDs. - * + * * @param iotHubs the iotHubs value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -211,7 +217,7 @@ public IoTSecuritySolutionProperties withIotHubs(List iotHubs) { /** * Get the userDefinedResources property: Properties of the IoT Security solution's user defined resources. - * + * * @return the userDefinedResources value. */ public UserDefinedResourcesProperties userDefinedResources() { @@ -220,7 +226,7 @@ public UserDefinedResourcesProperties userDefinedResources() { /** * Set the userDefinedResources property: Properties of the IoT Security solution's user defined resources. - * + * * @param userDefinedResources the userDefinedResources value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -230,9 +236,9 @@ public IoTSecuritySolutionProperties withUserDefinedResources(UserDefinedResourc } /** - * Get the autoDiscoveredResources property: List of resources that were automatically discovered as relevant to the - * security solution. - * + * Get the autoDiscoveredResources property: List of resources that were automatically discovered as relevant to + * the security solution. + * * @return the autoDiscoveredResources value. */ public List autoDiscoveredResources() { @@ -241,7 +247,7 @@ public List autoDiscoveredResources() { /** * Get the recommendationsConfiguration property: List of the configuration status for each recommendation type. - * + * * @return the recommendationsConfiguration value. */ public List recommendationsConfiguration() { @@ -250,19 +256,19 @@ public List recommendationsConfiguration( /** * Set the recommendationsConfiguration property: List of the configuration status for each recommendation type. - * + * * @param recommendationsConfiguration the recommendationsConfiguration value to set. * @return the IoTSecuritySolutionProperties object itself. */ - public IoTSecuritySolutionProperties withRecommendationsConfiguration( - List recommendationsConfiguration) { + public IoTSecuritySolutionProperties + withRecommendationsConfiguration(List recommendationsConfiguration) { this.recommendationsConfiguration = recommendationsConfiguration; return this; } /** * Get the unmaskedIpLoggingStatus property: Unmasked IP address logging status. - * + * * @return the unmaskedIpLoggingStatus value. */ public UnmaskedIpLoggingStatus unmaskedIpLoggingStatus() { @@ -271,7 +277,7 @@ public UnmaskedIpLoggingStatus unmaskedIpLoggingStatus() { /** * Set the unmaskedIpLoggingStatus property: Unmasked IP address logging status. - * + * * @param unmaskedIpLoggingStatus the unmaskedIpLoggingStatus value to set. * @return the IoTSecuritySolutionProperties object itself. */ @@ -282,7 +288,7 @@ public IoTSecuritySolutionProperties withUnmaskedIpLoggingStatus(UnmaskedIpLoggi /** * Get the additionalWorkspaces property: List of additional workspaces. - * + * * @return the additionalWorkspaces value. */ public List additionalWorkspaces() { @@ -291,33 +297,29 @@ public List additionalWorkspaces() { /** * Set the additionalWorkspaces property: List of additional workspaces. - * + * * @param additionalWorkspaces the additionalWorkspaces value to set. * @return the IoTSecuritySolutionProperties object itself. */ - public IoTSecuritySolutionProperties withAdditionalWorkspaces( - List additionalWorkspaces) { + public IoTSecuritySolutionProperties + withAdditionalWorkspaces(List additionalWorkspaces) { this.additionalWorkspaces = additionalWorkspaces; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model IoTSecuritySolutionProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property displayName in model IoTSecuritySolutionProperties")); } if (iotHubs() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property iotHubs in model IoTSecuritySolutionProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property iotHubs in model IoTSecuritySolutionProperties")); } if (userDefinedResources() != null) { userDefinedResources().validate(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessPolicyInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessPolicyInner.java index 7b307820330e..976395745484 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessPolicyInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessPolicyInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The JitNetworkAccessPolicy model. */ +/** + * The JitNetworkAccessPolicy model. + */ @Fluent public final class JitNetworkAccessPolicyInner extends ProxyResource { /* @@ -32,13 +34,15 @@ public final class JitNetworkAccessPolicyInner extends ProxyResource { @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; - /** Creates an instance of JitNetworkAccessPolicyInner class. */ + /** + * Creates an instance of JitNetworkAccessPolicyInner class. + */ public JitNetworkAccessPolicyInner() { } /** * Get the innerProperties property: The properties property. - * + * * @return the innerProperties value. */ private JitNetworkAccessPolicyProperties innerProperties() { @@ -47,7 +51,7 @@ private JitNetworkAccessPolicyProperties innerProperties() { /** * Get the kind property: Kind of the resource. - * + * * @return the kind value. */ public String kind() { @@ -56,7 +60,7 @@ public String kind() { /** * Set the kind property: Kind of the resource. - * + * * @param kind the kind value to set. * @return the JitNetworkAccessPolicyInner object itself. */ @@ -67,7 +71,7 @@ public JitNetworkAccessPolicyInner withKind(String kind) { /** * Get the location property: Location where the resource is stored. - * + * * @return the location value. */ public String location() { @@ -76,7 +80,7 @@ public String location() { /** * Get the virtualMachines property: Configurations for Microsoft.Compute/virtualMachines resource type. - * + * * @return the virtualMachines value. */ public List virtualMachines() { @@ -85,7 +89,7 @@ public List virtualMachines() { /** * Set the virtualMachines property: Configurations for Microsoft.Compute/virtualMachines resource type. - * + * * @param virtualMachines the virtualMachines value to set. * @return the JitNetworkAccessPolicyInner object itself. */ @@ -99,7 +103,7 @@ public JitNetworkAccessPolicyInner withVirtualMachines(List requests() { @@ -108,7 +112,7 @@ public List requests() { /** * Set the requests property: The requests property. - * + * * @param requests the requests value to set. * @return the JitNetworkAccessPolicyInner object itself. */ @@ -122,7 +126,7 @@ public JitNetworkAccessPolicyInner withRequests(List virtualMachines() { @@ -46,19 +50,19 @@ public List virtualMachines() { /** * Set the virtualMachines property: Configurations for Microsoft.Compute/virtualMachines resource type. - * + * * @param virtualMachines the virtualMachines value to set. * @return the JitNetworkAccessPolicyProperties object itself. */ - public JitNetworkAccessPolicyProperties withVirtualMachines( - List virtualMachines) { + public JitNetworkAccessPolicyProperties + withVirtualMachines(List virtualMachines) { this.virtualMachines = virtualMachines; return this; } /** * Get the requests property: The requests property. - * + * * @return the requests value. */ public List requests() { @@ -67,7 +71,7 @@ public List requests() { /** * Set the requests property: The requests property. - * + * * @param requests the requests value to set. * @return the JitNetworkAccessPolicyProperties object itself. */ @@ -78,7 +82,7 @@ public JitNetworkAccessPolicyProperties withRequests(List e.validate()); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessRequestInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessRequestInner.java index 6864965bacb3..9043ec075438 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessRequestInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/JitNetworkAccessRequestInner.java @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** The JitNetworkAccessRequest model. */ +/** + * The JitNetworkAccessRequest model. + */ @Fluent public final class JitNetworkAccessRequestInner { /* @@ -38,13 +40,15 @@ public final class JitNetworkAccessRequestInner { @JsonProperty(value = "justification") private String justification; - /** Creates an instance of JitNetworkAccessRequestInner class. */ + /** + * Creates an instance of JitNetworkAccessRequestInner class. + */ public JitNetworkAccessRequestInner() { } /** * Get the virtualMachines property: The virtualMachines property. - * + * * @return the virtualMachines value. */ public List virtualMachines() { @@ -53,19 +57,19 @@ public List virtualMachines() { /** * Set the virtualMachines property: The virtualMachines property. - * + * * @param virtualMachines the virtualMachines value to set. * @return the JitNetworkAccessRequestInner object itself. */ - public JitNetworkAccessRequestInner withVirtualMachines( - List virtualMachines) { + public JitNetworkAccessRequestInner + withVirtualMachines(List virtualMachines) { this.virtualMachines = virtualMachines; return this; } /** * Get the startTimeUtc property: The start time of the request in UTC. - * + * * @return the startTimeUtc value. */ public OffsetDateTime startTimeUtc() { @@ -74,7 +78,7 @@ public OffsetDateTime startTimeUtc() { /** * Set the startTimeUtc property: The start time of the request in UTC. - * + * * @param startTimeUtc the startTimeUtc value to set. * @return the JitNetworkAccessRequestInner object itself. */ @@ -85,7 +89,7 @@ public JitNetworkAccessRequestInner withStartTimeUtc(OffsetDateTime startTimeUtc /** * Get the requestor property: The identity of the person who made the request. - * + * * @return the requestor value. */ public String requestor() { @@ -94,7 +98,7 @@ public String requestor() { /** * Set the requestor property: The identity of the person who made the request. - * + * * @param requestor the requestor value to set. * @return the JitNetworkAccessRequestInner object itself. */ @@ -105,7 +109,7 @@ public JitNetworkAccessRequestInner withRequestor(String requestor) { /** * Get the justification property: The justification for making the initiate request. - * + * * @return the justification value. */ public String justification() { @@ -114,7 +118,7 @@ public String justification() { /** * Set the justification property: The justification for making the initiate request. - * + * * @param justification the justification value to set. * @return the JitNetworkAccessRequestInner object itself. */ @@ -125,29 +129,23 @@ public JitNetworkAccessRequestInner withJustification(String justification) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (virtualMachines() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property virtualMachines in model JitNetworkAccessRequestInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property virtualMachines in model JitNetworkAccessRequestInner")); } else { virtualMachines().forEach(e -> e.validate()); } if (startTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTimeUtc in model JitNetworkAccessRequestInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property startTimeUtc in model JitNetworkAccessRequestInner")); } if (requestor() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property requestor in model JitNetworkAccessRequestInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property requestor in model JitNetworkAccessRequestInner")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MalwareScanningProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MalwareScanningProperties.java new file mode 100644 index 000000000000..fc1926b41e9e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MalwareScanningProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.security.models.OperationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of Malware Scanning. + */ +@Fluent +public final class MalwareScanningProperties { + /* + * Properties of On Upload malware scanning. + */ + @JsonProperty(value = "onUpload") + private OnUploadProperties innerOnUpload; + + /* + * Optional. Resource id of an Event Grid Topic to send scan results to. + */ + @JsonProperty(value = "scanResultsEventGridTopicResourceId") + private String scanResultsEventGridTopicResourceId; + + /* + * Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation. + */ + @JsonProperty(value = "operationStatus", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus operationStatus; + + /** + * Creates an instance of MalwareScanningProperties class. + */ + public MalwareScanningProperties() { + } + + /** + * Get the innerOnUpload property: Properties of On Upload malware scanning. + * + * @return the innerOnUpload value. + */ + private OnUploadProperties innerOnUpload() { + return this.innerOnUpload; + } + + /** + * Get the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic to send scan + * results to. + * + * @return the scanResultsEventGridTopicResourceId value. + */ + public String scanResultsEventGridTopicResourceId() { + return this.scanResultsEventGridTopicResourceId; + } + + /** + * Set the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic to send scan + * results to. + * + * @param scanResultsEventGridTopicResourceId the scanResultsEventGridTopicResourceId value to set. + * @return the MalwareScanningProperties object itself. + */ + public MalwareScanningProperties + withScanResultsEventGridTopicResourceId(String scanResultsEventGridTopicResourceId) { + this.scanResultsEventGridTopicResourceId = scanResultsEventGridTopicResourceId; + return this; + } + + /** + * Get the operationStatus property: Upon failure or partial success. Additional data describing Malware Scanning + * enable/disable operation. + * + * @return the operationStatus value. + */ + public OperationStatus operationStatus() { + return this.operationStatus; + } + + /** + * Get the isEnabled property: Indicates whether On Upload malware scanning should be enabled. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.innerOnUpload() == null ? null : this.innerOnUpload().isEnabled(); + } + + /** + * Set the isEnabled property: Indicates whether On Upload malware scanning should be enabled. + * + * @param isEnabled the isEnabled value to set. + * @return the MalwareScanningProperties object itself. + */ + public MalwareScanningProperties withIsEnabled(Boolean isEnabled) { + if (this.innerOnUpload() == null) { + this.innerOnUpload = new OnUploadProperties(); + } + this.innerOnUpload().withIsEnabled(isEnabled); + return this; + } + + /** + * Get the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @return the capGBPerMonth value. + */ + public Integer capGBPerMonth() { + return this.innerOnUpload() == null ? null : this.innerOnUpload().capGBPerMonth(); + } + + /** + * Set the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @param capGBPerMonth the capGBPerMonth value to set. + * @return the MalwareScanningProperties object itself. + */ + public MalwareScanningProperties withCapGBPerMonth(Integer capGBPerMonth) { + if (this.innerOnUpload() == null) { + this.innerOnUpload = new OnUploadProperties(); + } + this.innerOnUpload().withCapGBPerMonth(capGBPerMonth); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerOnUpload() != null) { + innerOnUpload().validate(); + } + if (operationStatus() != null) { + operationStatus().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataInner.java index bd385f7c835d..3202212b2799 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataInner.java @@ -8,23 +8,29 @@ import com.azure.core.management.ProxyResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** The resource of the configuration or data needed to onboard the machine to MDE. */ +/** + * The resource of the configuration or data needed to onboard the machine to MDE. + */ @Fluent public final class MdeOnboardingDataInner extends ProxyResource { + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + /* * Properties of the MDE configuration or data parameter needed to onboard the machine to MDE */ @JsonProperty(value = "properties") private MdeOnboardingDataProperties innerProperties; - /** Creates an instance of MdeOnboardingDataInner class. */ + /** + * Creates an instance of MdeOnboardingDataInner class. + */ public MdeOnboardingDataInner() { } /** * Get the innerProperties property: Properties of the MDE configuration or data parameter needed to onboard the * machine to MDE. - * + * * @return the innerProperties value. */ private MdeOnboardingDataProperties innerProperties() { @@ -34,17 +40,17 @@ private MdeOnboardingDataProperties innerProperties() { /** * Get the onboardingPackageWindows property: The onboarding package used to onboard Windows machines to MDE, coded * in base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @return the onboardingPackageWindows value. */ public byte[] onboardingPackageWindows() { - return this.innerProperties() == null ? new byte[0] : this.innerProperties().onboardingPackageWindows(); + return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().onboardingPackageWindows(); } /** * Set the onboardingPackageWindows property: The onboarding package used to onboard Windows machines to MDE, coded * in base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @param onboardingPackageWindows the onboardingPackageWindows value to set. * @return the MdeOnboardingDataInner object itself. */ @@ -59,17 +65,17 @@ public MdeOnboardingDataInner withOnboardingPackageWindows(byte[] onboardingPack /** * Get the onboardingPackageLinux property: The onboarding package used to onboard Linux machines to MDE, coded in * base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @return the onboardingPackageLinux value. */ public byte[] onboardingPackageLinux() { - return this.innerProperties() == null ? new byte[0] : this.innerProperties().onboardingPackageLinux(); + return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().onboardingPackageLinux(); } /** * Set the onboardingPackageLinux property: The onboarding package used to onboard Linux machines to MDE, coded in * base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @param onboardingPackageLinux the onboardingPackageLinux value to set. * @return the MdeOnboardingDataInner object itself. */ @@ -83,7 +89,7 @@ public MdeOnboardingDataInner withOnboardingPackageLinux(byte[] onboardingPackag /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataListInner.java index b6650c04d95d..5385060ce6a6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataListInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataListInner.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of all MDE onboarding data resources. */ +/** + * List of all MDE onboarding data resources. + */ @Fluent public final class MdeOnboardingDataListInner { /* @@ -17,13 +19,15 @@ public final class MdeOnboardingDataListInner { @JsonProperty(value = "value") private List value; - /** Creates an instance of MdeOnboardingDataListInner class. */ + /** + * Creates an instance of MdeOnboardingDataListInner class. + */ public MdeOnboardingDataListInner() { } /** * Get the value property: List of the resources of the configuration or data needed to onboard the machine to MDE. - * + * * @return the value value. */ public List value() { @@ -32,7 +36,7 @@ public List value() { /** * Set the value property: List of the resources of the configuration or data needed to onboard the machine to MDE. - * + * * @param value the value value to set. * @return the MdeOnboardingDataListInner object itself. */ @@ -43,7 +47,7 @@ public MdeOnboardingDataListInner withValue(List value) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataProperties.java index b1bae4df584b..cd5151bb2f88 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/MdeOnboardingDataProperties.java @@ -8,7 +8,9 @@ import com.azure.core.util.CoreUtils; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of the MDE configuration or data parameter needed to onboard the machine to MDE. */ +/** + * Properties of the MDE configuration or data parameter needed to onboard the machine to MDE. + */ @Fluent public final class MdeOnboardingDataProperties { /* @@ -25,14 +27,16 @@ public final class MdeOnboardingDataProperties { @JsonProperty(value = "onboardingPackageLinux") private byte[] onboardingPackageLinux; - /** Creates an instance of MdeOnboardingDataProperties class. */ + /** + * Creates an instance of MdeOnboardingDataProperties class. + */ public MdeOnboardingDataProperties() { } /** * Get the onboardingPackageWindows property: The onboarding package used to onboard Windows machines to MDE, coded * in base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @return the onboardingPackageWindows value. */ public byte[] onboardingPackageWindows() { @@ -42,7 +46,7 @@ public byte[] onboardingPackageWindows() { /** * Set the onboardingPackageWindows property: The onboarding package used to onboard Windows machines to MDE, coded * in base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @param onboardingPackageWindows the onboardingPackageWindows value to set. * @return the MdeOnboardingDataProperties object itself. */ @@ -54,7 +58,7 @@ public MdeOnboardingDataProperties withOnboardingPackageWindows(byte[] onboardin /** * Get the onboardingPackageLinux property: The onboarding package used to onboard Linux machines to MDE, coded in * base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @return the onboardingPackageLinux value. */ public byte[] onboardingPackageLinux() { @@ -64,7 +68,7 @@ public byte[] onboardingPackageLinux() { /** * Set the onboardingPackageLinux property: The onboarding package used to onboard Linux machines to MDE, coded in * base64. This can also be used for onboarding using the dedicated VM Extension. - * + * * @param onboardingPackageLinux the onboardingPackageLinux value to set. * @return the MdeOnboardingDataProperties object itself. */ @@ -75,7 +79,7 @@ public MdeOnboardingDataProperties withOnboardingPackageLinux(byte[] onboardingP /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnUploadProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnUploadProperties.java new file mode 100644 index 000000000000..ec474144bbd5 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnUploadProperties.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of On Upload malware scanning. + */ +@Fluent +public final class OnUploadProperties { + /* + * Indicates whether On Upload malware scanning should be enabled. + */ + @JsonProperty(value = "isEnabled") + private Boolean isEnabled; + + /* + * Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + */ + @JsonProperty(value = "capGBPerMonth") + private Integer capGBPerMonth; + + /** + * Creates an instance of OnUploadProperties class. + */ + public OnUploadProperties() { + } + + /** + * Get the isEnabled property: Indicates whether On Upload malware scanning should be enabled. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Set the isEnabled property: Indicates whether On Upload malware scanning should be enabled. + * + * @param isEnabled the isEnabled value to set. + * @return the OnUploadProperties object itself. + */ + public OnUploadProperties withIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Get the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @return the capGBPerMonth value. + */ + public Integer capGBPerMonth() { + return this.capGBPerMonth; + } + + /** + * Set the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @param capGBPerMonth the capGBPerMonth value to set. + * @return the OnUploadProperties object itself. + */ + public OnUploadProperties withCapGBPerMonth(Integer capGBPerMonth) { + this.capGBPerMonth = capGBPerMonth; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationInner.java index e681d61a3dd2..bb95b9088b5a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.models.OperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** Possible operation in the REST API of Microsoft.Security. */ +/** + * Possible operation in the REST API of Microsoft.Security. + */ @Fluent public final class OperationInner { /* @@ -29,13 +31,15 @@ public final class OperationInner { @JsonProperty(value = "display") private OperationDisplay display; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: Name of the operation. - * + * * @return the name value. */ public String name() { @@ -44,7 +48,7 @@ public String name() { /** * Get the origin property: Where the operation is originated. - * + * * @return the origin value. */ public String origin() { @@ -53,7 +57,7 @@ public String origin() { /** * Get the display property: Security operation display. - * + * * @return the display value. */ public OperationDisplay display() { @@ -62,7 +66,7 @@ public OperationDisplay display() { /** * Set the display property: Security operation display. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -73,7 +77,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationResultAutoGeneratedInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationResultAutoGeneratedInner.java index c4ca79253a77..697a3841200f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationResultAutoGeneratedInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationResultAutoGeneratedInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.models.OperationResult; import com.fasterxml.jackson.annotation.JsonProperty; -/** Long run operation status of governance rule over a given scope. */ +/** + * Long run operation status of governance rule over a given scope. + */ @Immutable public final class OperationResultAutoGeneratedInner { /* @@ -17,13 +19,15 @@ public final class OperationResultAutoGeneratedInner { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private OperationResult status; - /** Creates an instance of OperationResultAutoGeneratedInner class. */ + /** + * Creates an instance of OperationResultAutoGeneratedInner class. + */ public OperationResultAutoGeneratedInner() { } /** * Get the status property: The status of the long run operation result of governance rule. - * + * * @return the status value. */ public OperationResult status() { @@ -32,7 +36,7 @@ public OperationResult status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationStatusResultInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationStatusResultInner.java new file mode 100644 index 000000000000..163c04aa5bff --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Fluent +public final class OperationStatusResultInner { + /* + * Fully qualified ID for the async operation. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name of the async operation. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Operation status. + */ + @JsonProperty(value = "status", required = true) + private String status; + + /* + * Percent of the operation that is complete. + */ + @JsonProperty(value = "percentComplete") + private Float percentComplete; + + /* + * The start time of the operation. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * The operations list. + */ + @JsonProperty(value = "operations") + private List operations; + + /* + * If present, details of the operation error. + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + public OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified ID for the async operation. + * + * @param id the id value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the async operation. + * + * @param name the name value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Float percentComplete() { + return this.percentComplete; + } + + /** + * Set the percentComplete property: Percent of the operation that is complete. + * + * @param percentComplete the percentComplete value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withPercentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + return this; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the operation. + * + * @param startTime the startTime value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the operation. + * + * @param endTime the endTime value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Set the operations property: The operations list. + * + * @param operations the operations value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withOperations(List operations) { + this.operations = operations; + return this; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: If present, details of the operation error. + * + * @param error the error value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property status in model OperationStatusResultInner")); + } + if (operations() != null) { + operations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java index 99e866421998..fcb5bbae1b65 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.security.models.Enforce; import com.azure.resourcemanager.security.models.Extension; +import com.azure.resourcemanager.security.models.Inherited; import com.azure.resourcemanager.security.models.PricingTier; +import com.azure.resourcemanager.security.models.ResourcesCoverageStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; @@ -25,13 +28,15 @@ public final class PricingInner extends ProxyResource { @JsonProperty(value = "properties") private PricingProperties innerProperties; - /** Creates an instance of PricingInner class. */ + /** + * Creates an instance of PricingInner class. + */ public PricingInner() { } /** * Get the innerProperties property: Pricing data. - * + * * @return the innerProperties value. */ private PricingProperties innerProperties() { @@ -39,10 +44,10 @@ private PricingProperties innerProperties() { } /** - * Get the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing - * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers - * basic security features. - * + * Get the pricingTier property: Indicates whether the Defender plan is enabled on the selected scope. Microsoft + * Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced + * security capabilities, while the free tier offers basic security features. + * * @return the pricingTier value. */ public PricingTier pricingTier() { @@ -50,10 +55,10 @@ public PricingTier pricingTier() { } /** - * Set the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing - * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers - * basic security features. - * + * Set the pricingTier property: Indicates whether the Defender plan is enabled on the selected scope. Microsoft + * Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced + * security capabilities, while the free tier offers basic security features. + * * @param pricingTier the pricingTier value to set. * @return the PricingInner object itself. */ @@ -66,9 +71,11 @@ public PricingInner withPricingTier(PricingTier pricingTier) { } /** - * Get the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one sub-plan - * is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. - * + * Get the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one + * sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is + * applied. For VirtualMachines plan, available sub plans are 'P1' & 'P2', where for resource level only 'P1' + * sub plan is supported. + * * @return the subPlan value. */ public String subPlan() { @@ -76,9 +83,11 @@ public String subPlan() { } /** - * Set the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one sub-plan - * is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. - * + * Set the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one + * sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is + * applied. For VirtualMachines plan, available sub plans are 'P1' & 'P2', where for resource level only 'P1' + * sub plan is supported. + * * @param subPlan the subPlan value to set. * @return the PricingInner object itself. */ @@ -93,7 +102,7 @@ public PricingInner withSubPlan(String subPlan) { /** * Get the freeTrialRemainingTime property: The duration left for the subscriptions free trial period - in ISO 8601 * format (e.g. P3Y6M4DT12H30M5S). - * + * * @return the freeTrialRemainingTime value. */ public Duration freeTrialRemainingTime() { @@ -103,7 +112,7 @@ public Duration freeTrialRemainingTime() { /** * Get the enablementTime property: Optional. If `pricingTier` is `Standard` then this property holds the date of * the last time the `pricingTier` was set to `Standard`, when available (e.g 2023-03-01T12:42:42.1921106Z). - * + * * @return the enablementTime value. */ public OffsetDateTime enablementTime() { @@ -111,28 +120,73 @@ public OffsetDateTime enablementTime() { } /** - * Get the deprecated property: Optional. True if the plan is deprecated. If there are replacing plans they will - * appear in `replacedBy` property. - * - * @return the deprecated value. + * Get the enforce property: If set to "False", it allows the descendants of this scope to override the pricing + * configuration set on this scope (allows setting inherited="False"). If set to "True", it prevents overrides and + * forces this pricing configuration on all the descendants of this scope. This field is only available for + * subscription-level pricing. + * + * @return the enforce value. */ - public Boolean deprecated() { - return this.innerProperties() == null ? null : this.innerProperties().deprecated(); + public Enforce enforce() { + return this.innerProperties() == null ? null : this.innerProperties().enforce(); } /** - * Get the replacedBy property: Optional. List of plans that replace this plan. This property exists only if this - * plan is deprecated. - * - * @return the replacedBy value. + * Set the enforce property: If set to "False", it allows the descendants of this scope to override the pricing + * configuration set on this scope (allows setting inherited="False"). If set to "True", it prevents overrides and + * forces this pricing configuration on all the descendants of this scope. This field is only available for + * subscription-level pricing. + * + * @param enforce the enforce value to set. + * @return the PricingInner object itself. */ - public List replacedBy() { - return this.innerProperties() == null ? null : this.innerProperties().replacedBy(); + public PricingInner withEnforce(Enforce enforce) { + if (this.innerProperties() == null) { + this.innerProperties = new PricingProperties(); + } + this.innerProperties().withEnforce(enforce); + return this; + } + + /** + * Get the inherited property: "inherited" = "True" indicates that the current scope inherits its pricing + * configuration from its parent. The ID of the parent scope that provides the inherited configuration is displayed + * in the "inheritedFrom" field. On the other hand, "inherited" = "False" indicates that the current scope has its + * own pricing configuration explicitly set, and does not inherit from its parent. This field is read only and + * available only for resource-level pricing. + * + * @return the inherited value. + */ + public Inherited inherited() { + return this.innerProperties() == null ? null : this.innerProperties().inherited(); + } + + /** + * Get the inheritedFrom property: The id of the scope inherited from. "Null" if not inherited. This field is only + * available for resource-level pricing. + * + * @return the inheritedFrom value. + */ + public String inheritedFrom() { + return this.innerProperties() == null ? null : this.innerProperties().inheritedFrom(); + } + + /** + * Get the resourcesCoverageStatus property: This field is available for subscription-level only, and reflects the + * coverage status of the resources under the subscription. Please note: The "pricingTier" field reflects the plan + * status of the subscription. However, since the plan status can also be defined at the resource level, there + * might be misalignment between the subscription's plan status and the resource status. This field helps indicate + * the coverage status of the resources. + * + * @return the resourcesCoverageStatus value. + */ + public ResourcesCoverageStatus resourcesCoverageStatus() { + return this.innerProperties() == null ? null : this.innerProperties().resourcesCoverageStatus(); } /** * Get the extensions property: Optional. List of extensions offered under a plan. - * + * * @return the extensions value. */ public List extensions() { @@ -141,7 +195,7 @@ public List extensions() { /** * Set the extensions property: Optional. List of extensions offered under a plan. - * + * * @param extensions the extensions value to set. * @return the PricingInner object itself. */ @@ -153,9 +207,29 @@ public PricingInner withExtensions(List extensions) { return this; } + /** + * Get the deprecated property: Optional. True if the plan is deprecated. If there are replacing plans they will + * appear in `replacedBy` property. + * + * @return the deprecated value. + */ + public Boolean deprecated() { + return this.innerProperties() == null ? null : this.innerProperties().deprecated(); + } + + /** + * Get the replacedBy property: Optional. List of plans that replace this plan. This property exists only if this + * plan is deprecated. + * + * @return the replacedBy value. + */ + public List replacedBy() { + return this.innerProperties() == null ? null : this.innerProperties().replacedBy(); + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingListInner.java index 51b2670b30a2..89e92c08ec65 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingListInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingListInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of pricing configurations response. */ +/** + * List of pricing configurations response. + */ @Fluent public final class PricingListInner { /* @@ -18,13 +20,15 @@ public final class PricingListInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of PricingListInner class. */ + /** + * Creates an instance of PricingListInner class. + */ public PricingListInner() { } /** * Get the value property: List of pricing configurations. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: List of pricing configurations. - * + * * @param value the value value to set. * @return the PricingListInner object itself. */ @@ -44,14 +48,13 @@ public PricingListInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model PricingListInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PricingListInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java index 681894d02f72..e3cd403183f8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java @@ -6,26 +6,33 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.models.Enforce; import com.azure.resourcemanager.security.models.Extension; +import com.azure.resourcemanager.security.models.Inherited; import com.azure.resourcemanager.security.models.PricingTier; +import com.azure.resourcemanager.security.models.ResourcesCoverageStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; import java.util.List; -/** Pricing properties for the relevant scope. */ +/** + * Pricing properties for the relevant scope. + */ @Fluent public final class PricingProperties { /* - * The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The - * standard tier offers advanced security capabilities, while the free tier offers basic security features. + * Indicates whether the Defender plan is enabled on the selected scope. Microsoft Defender for Cloud is provided + * in two pricing tiers: free and standard. The standard tier offers advanced security capabilities, while the free + * tier offers basic security features. */ @JsonProperty(value = "pricingTier", required = true) private PricingTier pricingTier; /* * The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each - * sub-plan enables a set of security features. When not specified, full plan is applied. + * sub-plan enables a set of security features. When not specified, full plan is applied. For VirtualMachines plan, + * available sub plans are 'P1' & 'P2', where for resource level only 'P1' sub plan is supported. */ @JsonProperty(value = "subPlan") private String subPlan; @@ -43,6 +50,47 @@ public final class PricingProperties { @JsonProperty(value = "enablementTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime enablementTime; + /* + * If set to "False", it allows the descendants of this scope to override the pricing configuration set on this + * scope (allows setting inherited="False"). If set to "True", it prevents overrides and forces this pricing + * configuration on all the descendants of this scope. This field is only available for subscription-level pricing. + */ + @JsonProperty(value = "enforce") + private Enforce enforce; + + /* + * "inherited" = "True" indicates that the current scope inherits its pricing configuration from its parent. The ID + * of the parent scope that provides the inherited configuration is displayed in the "inheritedFrom" field. On the + * other hand, "inherited" = "False" indicates that the current scope has its own pricing configuration explicitly + * set, and does not inherit from its parent. This field is read only and available only for resource-level + * pricing. + */ + @JsonProperty(value = "inherited", access = JsonProperty.Access.WRITE_ONLY) + private Inherited inherited; + + /* + * The id of the scope inherited from. "Null" if not inherited. This field is only available for resource-level + * pricing. + */ + @JsonProperty(value = "inheritedFrom", access = JsonProperty.Access.WRITE_ONLY) + private String inheritedFrom; + + /* + * This field is available for subscription-level only, and reflects the coverage status of the resources under the + * subscription. Please note: The "pricingTier" field reflects the plan status of the subscription. However, since + * the plan status can also be defined at the resource level, there might be misalignment between the + * subscription's plan status and the resource status. This field helps indicate the coverage status of the + * resources. + */ + @JsonProperty(value = "resourcesCoverageStatus", access = JsonProperty.Access.WRITE_ONLY) + private ResourcesCoverageStatus resourcesCoverageStatus; + + /* + * Optional. List of extensions offered under a plan. + */ + @JsonProperty(value = "extensions") + private List extensions; + /* * Optional. True if the plan is deprecated. If there are replacing plans they will appear in `replacedBy` property */ @@ -55,21 +103,17 @@ public final class PricingProperties { @JsonProperty(value = "replacedBy", access = JsonProperty.Access.WRITE_ONLY) private List replacedBy; - /* - * Optional. List of extensions offered under a plan. + /** + * Creates an instance of PricingProperties class. */ - @JsonProperty(value = "extensions") - private List extensions; - - /** Creates an instance of PricingProperties class. */ public PricingProperties() { } /** - * Get the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing - * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers - * basic security features. - * + * Get the pricingTier property: Indicates whether the Defender plan is enabled on the selected scope. Microsoft + * Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced + * security capabilities, while the free tier offers basic security features. + * * @return the pricingTier value. */ public PricingTier pricingTier() { @@ -77,10 +121,10 @@ public PricingTier pricingTier() { } /** - * Set the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing - * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers - * basic security features. - * + * Set the pricingTier property: Indicates whether the Defender plan is enabled on the selected scope. Microsoft + * Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced + * security capabilities, while the free tier offers basic security features. + * * @param pricingTier the pricingTier value to set. * @return the PricingProperties object itself. */ @@ -90,9 +134,11 @@ public PricingProperties withPricingTier(PricingTier pricingTier) { } /** - * Get the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one sub-plan - * is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. - * + * Get the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one + * sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is + * applied. For VirtualMachines plan, available sub plans are 'P1' & 'P2', where for resource level only 'P1' + * sub plan is supported. + * * @return the subPlan value. */ public String subPlan() { @@ -100,9 +146,11 @@ public String subPlan() { } /** - * Set the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one sub-plan - * is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. - * + * Set the subPlan property: The sub-plan selected for a Standard pricing configuration, when more than one + * sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is + * applied. For VirtualMachines plan, available sub plans are 'P1' & 'P2', where for resource level only 'P1' + * sub plan is supported. + * * @param subPlan the subPlan value to set. * @return the PricingProperties object itself. */ @@ -114,7 +162,7 @@ public PricingProperties withSubPlan(String subPlan) { /** * Get the freeTrialRemainingTime property: The duration left for the subscriptions free trial period - in ISO 8601 * format (e.g. P3Y6M4DT12H30M5S). - * + * * @return the freeTrialRemainingTime value. */ public Duration freeTrialRemainingTime() { @@ -124,7 +172,7 @@ public Duration freeTrialRemainingTime() { /** * Get the enablementTime property: Optional. If `pricingTier` is `Standard` then this property holds the date of * the last time the `pricingTier` was set to `Standard`, when available (e.g 2023-03-01T12:42:42.1921106Z). - * + * * @return the enablementTime value. */ public OffsetDateTime enablementTime() { @@ -132,28 +180,70 @@ public OffsetDateTime enablementTime() { } /** - * Get the deprecated property: Optional. True if the plan is deprecated. If there are replacing plans they will - * appear in `replacedBy` property. - * - * @return the deprecated value. + * Get the enforce property: If set to "False", it allows the descendants of this scope to override the pricing + * configuration set on this scope (allows setting inherited="False"). If set to "True", it prevents overrides and + * forces this pricing configuration on all the descendants of this scope. This field is only available for + * subscription-level pricing. + * + * @return the enforce value. */ - public Boolean deprecated() { - return this.deprecated; + public Enforce enforce() { + return this.enforce; } /** - * Get the replacedBy property: Optional. List of plans that replace this plan. This property exists only if this - * plan is deprecated. - * - * @return the replacedBy value. + * Set the enforce property: If set to "False", it allows the descendants of this scope to override the pricing + * configuration set on this scope (allows setting inherited="False"). If set to "True", it prevents overrides and + * forces this pricing configuration on all the descendants of this scope. This field is only available for + * subscription-level pricing. + * + * @param enforce the enforce value to set. + * @return the PricingProperties object itself. */ - public List replacedBy() { - return this.replacedBy; + public PricingProperties withEnforce(Enforce enforce) { + this.enforce = enforce; + return this; + } + + /** + * Get the inherited property: "inherited" = "True" indicates that the current scope inherits its pricing + * configuration from its parent. The ID of the parent scope that provides the inherited configuration is displayed + * in the "inheritedFrom" field. On the other hand, "inherited" = "False" indicates that the current scope has its + * own pricing configuration explicitly set, and does not inherit from its parent. This field is read only and + * available only for resource-level pricing. + * + * @return the inherited value. + */ + public Inherited inherited() { + return this.inherited; + } + + /** + * Get the inheritedFrom property: The id of the scope inherited from. "Null" if not inherited. This field is only + * available for resource-level pricing. + * + * @return the inheritedFrom value. + */ + public String inheritedFrom() { + return this.inheritedFrom; + } + + /** + * Get the resourcesCoverageStatus property: This field is available for subscription-level only, and reflects the + * coverage status of the resources under the subscription. Please note: The "pricingTier" field reflects the plan + * status of the subscription. However, since the plan status can also be defined at the resource level, there + * might be misalignment between the subscription's plan status and the resource status. This field helps indicate + * the coverage status of the resources. + * + * @return the resourcesCoverageStatus value. + */ + public ResourcesCoverageStatus resourcesCoverageStatus() { + return this.resourcesCoverageStatus; } /** * Get the extensions property: Optional. List of extensions offered under a plan. - * + * * @return the extensions value. */ public List extensions() { @@ -162,7 +252,7 @@ public List extensions() { /** * Set the extensions property: Optional. List of extensions offered under a plan. - * + * * @param extensions the extensions value to set. * @return the PricingProperties object itself. */ @@ -171,16 +261,35 @@ public PricingProperties withExtensions(List extensions) { return this; } + /** + * Get the deprecated property: Optional. True if the plan is deprecated. If there are replacing plans they will + * appear in `replacedBy` property. + * + * @return the deprecated value. + */ + public Boolean deprecated() { + return this.deprecated; + } + + /** + * Get the replacedBy property: Optional. List of plans that replace this plan. This property exists only if this + * plan is deprecated. + * + * @return the replacedBy value. + */ + public List replacedBy() { + return this.replacedBy; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (pricingTier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property pricingTier in model PricingProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property pricingTier in model PricingProperties")); } if (extensions() != null) { extensions().forEach(e -> e.validate()); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentInner.java index 308a6f823cec..f954272f0662 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.State; import com.fasterxml.jackson.annotation.JsonProperty; -/** Regulatory compliance assessment details and state. */ +/** + * Regulatory compliance assessment details and state. + */ @Fluent public final class RegulatoryComplianceAssessmentInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class RegulatoryComplianceAssessmentInner extends ProxyResource { @JsonProperty(value = "properties") private RegulatoryComplianceAssessmentProperties innerProperties; - /** Creates an instance of RegulatoryComplianceAssessmentInner class. */ + /** + * Creates an instance of RegulatoryComplianceAssessmentInner class. + */ public RegulatoryComplianceAssessmentInner() { } /** * Get the innerProperties property: Regulatory compliance assessment data. - * + * * @return the innerProperties value. */ private RegulatoryComplianceAssessmentProperties innerProperties() { @@ -33,7 +37,7 @@ private RegulatoryComplianceAssessmentProperties innerProperties() { /** * Get the description property: The description of the regulatory compliance assessment. - * + * * @return the description value. */ public String description() { @@ -42,7 +46,7 @@ public String description() { /** * Get the assessmentType property: The expected type of assessment contained in the AssessmentDetailsLink. - * + * * @return the assessmentType value. */ public String assessmentType() { @@ -52,7 +56,7 @@ public String assessmentType() { /** * Get the assessmentDetailsLink property: Link to more detailed assessment results data. The response type will be * according to the assessmentType field. - * + * * @return the assessmentDetailsLink value. */ public String assessmentDetailsLink() { @@ -61,7 +65,7 @@ public String assessmentDetailsLink() { /** * Get the state property: Aggregative state based on the assessment's scanned resources states. - * + * * @return the state value. */ public State state() { @@ -70,7 +74,7 @@ public State state() { /** * Set the state property: Aggregative state based on the assessment's scanned resources states. - * + * * @param state the state value to set. * @return the RegulatoryComplianceAssessmentInner object itself. */ @@ -84,7 +88,7 @@ public RegulatoryComplianceAssessmentInner withState(State state) { /** * Get the passedResources property: The given assessment's related resources count with passed state. - * + * * @return the passedResources value. */ public Integer passedResources() { @@ -93,7 +97,7 @@ public Integer passedResources() { /** * Get the failedResources property: The given assessment's related resources count with failed state. - * + * * @return the failedResources value. */ public Integer failedResources() { @@ -102,7 +106,7 @@ public Integer failedResources() { /** * Get the skippedResources property: The given assessment's related resources count with skipped state. - * + * * @return the skippedResources value. */ public Integer skippedResources() { @@ -111,7 +115,7 @@ public Integer skippedResources() { /** * Get the unsupportedResources property: The given assessment's related resources count with unsupported state. - * + * * @return the unsupportedResources value. */ public Integer unsupportedResources() { @@ -120,7 +124,7 @@ public Integer unsupportedResources() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentProperties.java index 71a2f73ca151..693742fff110 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceAssessmentProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.models.State; import com.fasterxml.jackson.annotation.JsonProperty; -/** Regulatory compliance assessment data. */ +/** + * Regulatory compliance assessment data. + */ @Fluent public final class RegulatoryComplianceAssessmentProperties { /* @@ -59,13 +61,15 @@ public final class RegulatoryComplianceAssessmentProperties { @JsonProperty(value = "unsupportedResources", access = JsonProperty.Access.WRITE_ONLY) private Integer unsupportedResources; - /** Creates an instance of RegulatoryComplianceAssessmentProperties class. */ + /** + * Creates an instance of RegulatoryComplianceAssessmentProperties class. + */ public RegulatoryComplianceAssessmentProperties() { } /** * Get the description property: The description of the regulatory compliance assessment. - * + * * @return the description value. */ public String description() { @@ -74,7 +78,7 @@ public String description() { /** * Get the assessmentType property: The expected type of assessment contained in the AssessmentDetailsLink. - * + * * @return the assessmentType value. */ public String assessmentType() { @@ -84,7 +88,7 @@ public String assessmentType() { /** * Get the assessmentDetailsLink property: Link to more detailed assessment results data. The response type will be * according to the assessmentType field. - * + * * @return the assessmentDetailsLink value. */ public String assessmentDetailsLink() { @@ -93,7 +97,7 @@ public String assessmentDetailsLink() { /** * Get the state property: Aggregative state based on the assessment's scanned resources states. - * + * * @return the state value. */ public State state() { @@ -102,7 +106,7 @@ public State state() { /** * Set the state property: Aggregative state based on the assessment's scanned resources states. - * + * * @param state the state value to set. * @return the RegulatoryComplianceAssessmentProperties object itself. */ @@ -113,7 +117,7 @@ public RegulatoryComplianceAssessmentProperties withState(State state) { /** * Get the passedResources property: The given assessment's related resources count with passed state. - * + * * @return the passedResources value. */ public Integer passedResources() { @@ -122,7 +126,7 @@ public Integer passedResources() { /** * Get the failedResources property: The given assessment's related resources count with failed state. - * + * * @return the failedResources value. */ public Integer failedResources() { @@ -131,7 +135,7 @@ public Integer failedResources() { /** * Get the skippedResources property: The given assessment's related resources count with skipped state. - * + * * @return the skippedResources value. */ public Integer skippedResources() { @@ -140,7 +144,7 @@ public Integer skippedResources() { /** * Get the unsupportedResources property: The given assessment's related resources count with unsupported state. - * + * * @return the unsupportedResources value. */ public Integer unsupportedResources() { @@ -149,7 +153,7 @@ public Integer unsupportedResources() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlInner.java index 44b3715c5fc6..b92479007f61 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.State; import com.fasterxml.jackson.annotation.JsonProperty; -/** Regulatory compliance control details and state. */ +/** + * Regulatory compliance control details and state. + */ @Fluent public final class RegulatoryComplianceControlInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class RegulatoryComplianceControlInner extends ProxyResource { @JsonProperty(value = "properties") private RegulatoryComplianceControlProperties innerProperties; - /** Creates an instance of RegulatoryComplianceControlInner class. */ + /** + * Creates an instance of RegulatoryComplianceControlInner class. + */ public RegulatoryComplianceControlInner() { } /** * Get the innerProperties property: Regulatory compliance control data. - * + * * @return the innerProperties value. */ private RegulatoryComplianceControlProperties innerProperties() { @@ -33,7 +37,7 @@ private RegulatoryComplianceControlProperties innerProperties() { /** * Get the description property: The description of the regulatory compliance control. - * + * * @return the description value. */ public String description() { @@ -42,7 +46,7 @@ public String description() { /** * Get the state property: Aggregative state based on the control's supported assessments states. - * + * * @return the state value. */ public State state() { @@ -51,7 +55,7 @@ public State state() { /** * Set the state property: Aggregative state based on the control's supported assessments states. - * + * * @param state the state value to set. * @return the RegulatoryComplianceControlInner object itself. */ @@ -66,7 +70,7 @@ public RegulatoryComplianceControlInner withState(State state) { /** * Get the passedAssessments property: The number of supported regulatory compliance assessments of the given * control with a passed state. - * + * * @return the passedAssessments value. */ public Integer passedAssessments() { @@ -76,7 +80,7 @@ public Integer passedAssessments() { /** * Get the failedAssessments property: The number of supported regulatory compliance assessments of the given * control with a failed state. - * + * * @return the failedAssessments value. */ public Integer failedAssessments() { @@ -86,7 +90,7 @@ public Integer failedAssessments() { /** * Get the skippedAssessments property: The number of supported regulatory compliance assessments of the given * control with a skipped state. - * + * * @return the skippedAssessments value. */ public Integer skippedAssessments() { @@ -95,7 +99,7 @@ public Integer skippedAssessments() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlProperties.java index fc016649b89a..07fd3539ba94 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceControlProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.models.State; import com.fasterxml.jackson.annotation.JsonProperty; -/** Regulatory compliance control data. */ +/** + * Regulatory compliance control data. + */ @Fluent public final class RegulatoryComplianceControlProperties { /* @@ -41,13 +43,15 @@ public final class RegulatoryComplianceControlProperties { @JsonProperty(value = "skippedAssessments", access = JsonProperty.Access.WRITE_ONLY) private Integer skippedAssessments; - /** Creates an instance of RegulatoryComplianceControlProperties class. */ + /** + * Creates an instance of RegulatoryComplianceControlProperties class. + */ public RegulatoryComplianceControlProperties() { } /** * Get the description property: The description of the regulatory compliance control. - * + * * @return the description value. */ public String description() { @@ -56,7 +60,7 @@ public String description() { /** * Get the state property: Aggregative state based on the control's supported assessments states. - * + * * @return the state value. */ public State state() { @@ -65,7 +69,7 @@ public State state() { /** * Set the state property: Aggregative state based on the control's supported assessments states. - * + * * @param state the state value to set. * @return the RegulatoryComplianceControlProperties object itself. */ @@ -77,7 +81,7 @@ public RegulatoryComplianceControlProperties withState(State state) { /** * Get the passedAssessments property: The number of supported regulatory compliance assessments of the given * control with a passed state. - * + * * @return the passedAssessments value. */ public Integer passedAssessments() { @@ -87,7 +91,7 @@ public Integer passedAssessments() { /** * Get the failedAssessments property: The number of supported regulatory compliance assessments of the given * control with a failed state. - * + * * @return the failedAssessments value. */ public Integer failedAssessments() { @@ -97,7 +101,7 @@ public Integer failedAssessments() { /** * Get the skippedAssessments property: The number of supported regulatory compliance assessments of the given * control with a skipped state. - * + * * @return the skippedAssessments value. */ public Integer skippedAssessments() { @@ -106,7 +110,7 @@ public Integer skippedAssessments() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardInner.java index 462389336ec0..cb2a3663524d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.State; import com.fasterxml.jackson.annotation.JsonProperty; -/** Regulatory compliance standard details and state. */ +/** + * Regulatory compliance standard details and state. + */ @Fluent public final class RegulatoryComplianceStandardInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class RegulatoryComplianceStandardInner extends ProxyResource { @JsonProperty(value = "properties") private RegulatoryComplianceStandardProperties innerProperties; - /** Creates an instance of RegulatoryComplianceStandardInner class. */ + /** + * Creates an instance of RegulatoryComplianceStandardInner class. + */ public RegulatoryComplianceStandardInner() { } /** * Get the innerProperties property: Regulatory compliance standard data. - * + * * @return the innerProperties value. */ private RegulatoryComplianceStandardProperties innerProperties() { @@ -33,7 +37,7 @@ private RegulatoryComplianceStandardProperties innerProperties() { /** * Get the state property: Aggregative state based on the standard's supported controls states. - * + * * @return the state value. */ public State state() { @@ -42,7 +46,7 @@ public State state() { /** * Set the state property: Aggregative state based on the standard's supported controls states. - * + * * @param state the state value to set. * @return the RegulatoryComplianceStandardInner object itself. */ @@ -57,7 +61,7 @@ public RegulatoryComplianceStandardInner withState(State state) { /** * Get the passedControls property: The number of supported regulatory compliance controls of the given standard * with a passed state. - * + * * @return the passedControls value. */ public Integer passedControls() { @@ -67,7 +71,7 @@ public Integer passedControls() { /** * Get the failedControls property: The number of supported regulatory compliance controls of the given standard * with a failed state. - * + * * @return the failedControls value. */ public Integer failedControls() { @@ -77,7 +81,7 @@ public Integer failedControls() { /** * Get the skippedControls property: The number of supported regulatory compliance controls of the given standard * with a skipped state. - * + * * @return the skippedControls value. */ public Integer skippedControls() { @@ -87,7 +91,7 @@ public Integer skippedControls() { /** * Get the unsupportedControls property: The number of regulatory compliance controls of the given standard which * are unsupported by automated assessments. - * + * * @return the unsupportedControls value. */ public Integer unsupportedControls() { @@ -96,7 +100,7 @@ public Integer unsupportedControls() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardProperties.java index a70b722ae82f..399380675aac 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RegulatoryComplianceStandardProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.models.State; import com.fasterxml.jackson.annotation.JsonProperty; -/** Regulatory compliance standard data. */ +/** + * Regulatory compliance standard data. + */ @Fluent public final class RegulatoryComplianceStandardProperties { /* @@ -42,13 +44,15 @@ public final class RegulatoryComplianceStandardProperties { @JsonProperty(value = "unsupportedControls", access = JsonProperty.Access.WRITE_ONLY) private Integer unsupportedControls; - /** Creates an instance of RegulatoryComplianceStandardProperties class. */ + /** + * Creates an instance of RegulatoryComplianceStandardProperties class. + */ public RegulatoryComplianceStandardProperties() { } /** * Get the state property: Aggregative state based on the standard's supported controls states. - * + * * @return the state value. */ public State state() { @@ -57,7 +61,7 @@ public State state() { /** * Set the state property: Aggregative state based on the standard's supported controls states. - * + * * @param state the state value to set. * @return the RegulatoryComplianceStandardProperties object itself. */ @@ -69,7 +73,7 @@ public RegulatoryComplianceStandardProperties withState(State state) { /** * Get the passedControls property: The number of supported regulatory compliance controls of the given standard * with a passed state. - * + * * @return the passedControls value. */ public Integer passedControls() { @@ -79,7 +83,7 @@ public Integer passedControls() { /** * Get the failedControls property: The number of supported regulatory compliance controls of the given standard * with a failed state. - * + * * @return the failedControls value. */ public Integer failedControls() { @@ -89,7 +93,7 @@ public Integer failedControls() { /** * Get the skippedControls property: The number of supported regulatory compliance controls of the given standard * with a skipped state. - * + * * @return the skippedControls value. */ public Integer skippedControls() { @@ -99,7 +103,7 @@ public Integer skippedControls() { /** * Get the unsupportedControls property: The number of regulatory compliance controls of the given standard which * are unsupported by automated assessments. - * + * * @return the unsupportedControls value. */ public Integer unsupportedControls() { @@ -108,7 +112,7 @@ public Integer unsupportedControls() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RuleResultsInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RuleResultsInner.java index 2737512d5442..7ccd3cff0ea8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RuleResultsInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RuleResultsInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.RuleResultsProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Rule results. */ +/** + * Rule results. + */ @Fluent public final class RuleResultsInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class RuleResultsInner extends ProxyResource { @JsonProperty(value = "properties") private RuleResultsProperties properties; - /** Creates an instance of RuleResultsInner class. */ + /** + * Creates an instance of RuleResultsInner class. + */ public RuleResultsInner() { } /** * Get the properties property: Rule results properties. - * + * * @return the properties value. */ public RuleResultsProperties properties() { @@ -33,7 +37,7 @@ public RuleResultsProperties properties() { /** * Set the properties property: Rule results properties. - * + * * @param properties the properties value to set. * @return the RuleResultsInner object itself. */ @@ -44,7 +48,7 @@ public RuleResultsInner withProperties(RuleResultsProperties properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RulesResultsInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RulesResultsInner.java index 2463dd2b01fa..ea3f8d28ad6b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RulesResultsInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/RulesResultsInner.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of rules results. */ +/** + * A list of rules results. + */ @Fluent public final class RulesResultsInner { /* @@ -17,13 +19,15 @@ public final class RulesResultsInner { @JsonProperty(value = "value") private List value; - /** Creates an instance of RulesResultsInner class. */ + /** + * Creates an instance of RulesResultsInner class. + */ public RulesResultsInner() { } /** * Get the value property: List of rule results. - * + * * @return the value value. */ public List value() { @@ -32,7 +36,7 @@ public List value() { /** * Set the value property: List of rule results. - * + * * @param value the value value to set. * @return the RulesResultsInner object itself. */ @@ -43,7 +47,7 @@ public RulesResultsInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanInner.java index 55dba8acba1d..72374ef25f0f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.ScanProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A vulnerability assessment scan record. */ +/** + * A vulnerability assessment scan record. + */ @Fluent public final class ScanInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class ScanInner extends ProxyResource { @JsonProperty(value = "properties") private ScanProperties properties; - /** Creates an instance of ScanInner class. */ + /** + * Creates an instance of ScanInner class. + */ public ScanInner() { } /** * Get the properties property: A vulnerability assessment scan record properties. - * + * * @return the properties value. */ public ScanProperties properties() { @@ -33,7 +37,7 @@ public ScanProperties properties() { /** * Set the properties property: A vulnerability assessment scan record properties. - * + * * @param properties the properties value to set. * @return the ScanInner object itself. */ @@ -44,7 +48,7 @@ public ScanInner withProperties(ScanProperties properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultInner.java index 2878009933cd..b43faa716bd6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.ScanResultProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A vulnerability assessment scan result for a single rule. */ +/** + * A vulnerability assessment scan result for a single rule. + */ @Fluent public final class ScanResultInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class ScanResultInner extends ProxyResource { @JsonProperty(value = "properties") private ScanResultProperties properties; - /** Creates an instance of ScanResultInner class. */ + /** + * Creates an instance of ScanResultInner class. + */ public ScanResultInner() { } /** * Get the properties property: A vulnerability assessment scan result properties for a single rule. - * + * * @return the properties value. */ public ScanResultProperties properties() { @@ -33,7 +37,7 @@ public ScanResultProperties properties() { /** * Set the properties property: A vulnerability assessment scan result properties for a single rule. - * + * * @param properties the properties value to set. * @return the ScanResultInner object itself. */ @@ -44,7 +48,7 @@ public ScanResultInner withProperties(ScanResultProperties properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultsInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultsInner.java index 5a1807b5830c..90d05e1ce0c1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultsInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScanResultsInner.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of vulnerability assessment scan results. */ +/** + * A list of vulnerability assessment scan results. + */ @Fluent public final class ScanResultsInner { /* @@ -17,13 +19,15 @@ public final class ScanResultsInner { @JsonProperty(value = "value") private List value; - /** Creates an instance of ScanResultsInner class. */ + /** + * Creates an instance of ScanResultsInner class. + */ public ScanResultsInner() { } /** * Get the value property: List of vulnerability assessment scan results. - * + * * @return the value value. */ public List value() { @@ -32,7 +36,7 @@ public List value() { /** * Set the value property: List of vulnerability assessment scan results. - * + * * @param value the value value to set. * @return the ScanResultsInner object itself. */ @@ -43,7 +47,7 @@ public ScanResultsInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScansInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScansInner.java index 18b1d47cef6a..250deedf95ac 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScansInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScansInner.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of vulnerability assessment scan records. */ +/** + * A list of vulnerability assessment scan records. + */ @Fluent public final class ScansInner { /* @@ -17,13 +19,15 @@ public final class ScansInner { @JsonProperty(value = "value") private List value; - /** Creates an instance of ScansInner class. */ + /** + * Creates an instance of ScansInner class. + */ public ScansInner() { } /** * Get the value property: List of vulnerability assessment scan records. - * + * * @return the value value. */ public List value() { @@ -32,7 +36,7 @@ public List value() { /** * Set the value property: List of vulnerability assessment scan records. - * + * * @param value the value value to set. * @return the ScansInner object itself. */ @@ -43,7 +47,7 @@ public ScansInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScoreDetails.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScoreDetails.java index 86bc7f839e8f..3189d73d2403 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScoreDetails.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/ScoreDetails.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Calculation result data. */ +/** + * Calculation result data. + */ @Immutable public final class ScoreDetails { /* @@ -28,13 +30,15 @@ public final class ScoreDetails { @JsonProperty(value = "percentage", access = JsonProperty.Access.WRITE_ONLY) private Double percentage; - /** Creates an instance of ScoreDetails class. */ + /** + * Creates an instance of ScoreDetails class. + */ public ScoreDetails() { } /** * Get the max property: Maximum score available. - * + * * @return the max value. */ public Integer max() { @@ -43,7 +47,7 @@ public Integer max() { /** * Get the current property: Current score. - * + * * @return the current value. */ public Double current() { @@ -53,7 +57,7 @@ public Double current() { /** * Get the percentage property: Ratio of the current score divided by the maximum. Rounded to 4 digits after the * decimal point. - * + * * @return the percentage value. */ public Double percentage() { @@ -62,7 +66,7 @@ public Double percentage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemInner.java index 01753634ece2..f667855532f8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Information about the security control. */ +/** + * Information about the security control. + */ @Immutable public final class SecureScoreControlDefinitionItemInner extends ProxyResource { /* @@ -20,13 +22,15 @@ public final class SecureScoreControlDefinitionItemInner extends ProxyResource { @JsonProperty(value = "properties") private SecureScoreControlDefinitionItemProperties innerProperties; - /** Creates an instance of SecureScoreControlDefinitionItemInner class. */ + /** + * Creates an instance of SecureScoreControlDefinitionItemInner class. + */ public SecureScoreControlDefinitionItemInner() { } /** * Get the innerProperties property: Security Control Definition Properties. - * + * * @return the innerProperties value. */ private SecureScoreControlDefinitionItemProperties innerProperties() { @@ -35,7 +39,7 @@ private SecureScoreControlDefinitionItemProperties innerProperties() { /** * Get the displayName property: User friendly display name of the control. - * + * * @return the displayName value. */ public String displayName() { @@ -44,7 +48,7 @@ public String displayName() { /** * Get the description property: User friendly description of the control. - * + * * @return the description value. */ public String description() { @@ -53,7 +57,7 @@ public String description() { /** * Get the maxScore property: Maximum control score (0..10). - * + * * @return the maxScore value. */ public Integer maxScore() { @@ -62,7 +66,7 @@ public Integer maxScore() { /** * Get the source property: Source object from which the control was created. - * + * * @return the source value. */ public SecureScoreControlDefinitionSource source() { @@ -72,7 +76,7 @@ public SecureScoreControlDefinitionSource source() { /** * Get the assessmentDefinitions property: Array of assessments metadata IDs that are included in this security * control. - * + * * @return the assessmentDefinitions value. */ public List assessmentDefinitions() { @@ -81,7 +85,7 @@ public List assessmentDefinitions() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemProperties.java index 85b8e148b797..86186c34049b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDefinitionItemProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Security Control Definition Properties. */ +/** + * Security Control Definition Properties. + */ @Immutable public final class SecureScoreControlDefinitionItemProperties { /* @@ -43,13 +45,15 @@ public final class SecureScoreControlDefinitionItemProperties { @JsonProperty(value = "assessmentDefinitions", access = JsonProperty.Access.WRITE_ONLY) private List assessmentDefinitions; - /** Creates an instance of SecureScoreControlDefinitionItemProperties class. */ + /** + * Creates an instance of SecureScoreControlDefinitionItemProperties class. + */ public SecureScoreControlDefinitionItemProperties() { } /** * Get the displayName property: User friendly display name of the control. - * + * * @return the displayName value. */ public String displayName() { @@ -58,7 +62,7 @@ public String displayName() { /** * Get the description property: User friendly description of the control. - * + * * @return the description value. */ public String description() { @@ -67,7 +71,7 @@ public String description() { /** * Get the maxScore property: Maximum control score (0..10). - * + * * @return the maxScore value. */ public Integer maxScore() { @@ -76,7 +80,7 @@ public Integer maxScore() { /** * Get the source property: Source object from which the control was created. - * + * * @return the source value. */ public SecureScoreControlDefinitionSource source() { @@ -86,7 +90,7 @@ public SecureScoreControlDefinitionSource source() { /** * Get the assessmentDefinitions property: Array of assessments metadata IDs that are included in this security * control. - * + * * @return the assessmentDefinitions value. */ public List assessmentDefinitions() { @@ -95,7 +99,7 @@ public List assessmentDefinitions() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDetailsInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDetailsInner.java index bb6d92135d58..14ddcbb0eab4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDetailsInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlDetailsInner.java @@ -8,7 +8,9 @@ import com.azure.core.management.ProxyResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** Details of the security control, its score, and the health status of the relevant resources. */ +/** + * Details of the security control, its score, and the health status of the relevant resources. + */ @Fluent public final class SecureScoreControlDetailsInner extends ProxyResource { /* @@ -17,13 +19,15 @@ public final class SecureScoreControlDetailsInner extends ProxyResource { @JsonProperty(value = "properties") private SecureScoreControlScoreDetailsInner innerProperties; - /** Creates an instance of SecureScoreControlDetailsInner class. */ + /** + * Creates an instance of SecureScoreControlDetailsInner class. + */ public SecureScoreControlDetailsInner() { } /** * Get the innerProperties property: Calculation result data in control level. - * + * * @return the innerProperties value. */ private SecureScoreControlScoreDetailsInner innerProperties() { @@ -32,7 +36,7 @@ private SecureScoreControlScoreDetailsInner innerProperties() { /** * Get the displayName property: User friendly display name of the control. - * + * * @return the displayName value. */ public String displayName() { @@ -41,7 +45,7 @@ public String displayName() { /** * Get the healthyResourceCount property: Number of healthy resources in the control. - * + * * @return the healthyResourceCount value. */ public Integer healthyResourceCount() { @@ -50,7 +54,7 @@ public Integer healthyResourceCount() { /** * Get the unhealthyResourceCount property: Number of unhealthy resources in the control. - * + * * @return the unhealthyResourceCount value. */ public Integer unhealthyResourceCount() { @@ -59,7 +63,7 @@ public Integer unhealthyResourceCount() { /** * Get the notApplicableResourceCount property: Number of not applicable resources in the control. - * + * * @return the notApplicableResourceCount value. */ public Integer notApplicableResourceCount() { @@ -69,7 +73,7 @@ public Integer notApplicableResourceCount() { /** * Get the weight property: The relative weight for this specific control in each of your subscriptions. Used when * calculating an aggregated score for this control across all of your subscriptions. - * + * * @return the weight value. */ public Long weight() { @@ -78,7 +82,7 @@ public Long weight() { /** * Get the definition property: Information about the security control. - * + * * @return the definition value. */ public SecureScoreControlDefinitionItemInner definition() { @@ -87,7 +91,7 @@ public SecureScoreControlDefinitionItemInner definition() { /** * Set the definition property: Information about the security control. - * + * * @param definition the definition value to set. * @return the SecureScoreControlDetailsInner object itself. */ @@ -101,7 +105,7 @@ public SecureScoreControlDetailsInner withDefinition(SecureScoreControlDefinitio /** * Get the max property: Maximum score available. - * + * * @return the max value. */ public Integer max() { @@ -110,7 +114,7 @@ public Integer max() { /** * Get the current property: Current score. - * + * * @return the current value. */ public Double current() { @@ -120,7 +124,7 @@ public Double current() { /** * Get the percentage property: Ratio of the current score divided by the maximum. Rounded to 4 digits after the * decimal point. - * + * * @return the percentage value. */ public Double percentage() { @@ -129,7 +133,7 @@ public Double percentage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlScoreDetailsInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlScoreDetailsInner.java index 2b4dc29cf1f4..af4f558bfa4d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlScoreDetailsInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreControlScoreDetailsInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Calculation result data in control level. */ +/** + * Calculation result data in control level. + */ @Fluent public final class SecureScoreControlScoreDetailsInner { /* @@ -53,13 +55,15 @@ public final class SecureScoreControlScoreDetailsInner { @JsonProperty(value = "definition") private SecureScoreControlDefinitionItemInner definition; - /** Creates an instance of SecureScoreControlScoreDetailsInner class. */ + /** + * Creates an instance of SecureScoreControlScoreDetailsInner class. + */ public SecureScoreControlScoreDetailsInner() { } /** * Get the displayName property: User friendly display name of the control. - * + * * @return the displayName value. */ public String displayName() { @@ -68,7 +72,7 @@ public String displayName() { /** * Get the innerScore property: Actual score object for the control. - * + * * @return the innerScore value. */ private ScoreDetails innerScore() { @@ -77,7 +81,7 @@ private ScoreDetails innerScore() { /** * Get the healthyResourceCount property: Number of healthy resources in the control. - * + * * @return the healthyResourceCount value. */ public Integer healthyResourceCount() { @@ -86,7 +90,7 @@ public Integer healthyResourceCount() { /** * Get the unhealthyResourceCount property: Number of unhealthy resources in the control. - * + * * @return the unhealthyResourceCount value. */ public Integer unhealthyResourceCount() { @@ -95,7 +99,7 @@ public Integer unhealthyResourceCount() { /** * Get the notApplicableResourceCount property: Number of not applicable resources in the control. - * + * * @return the notApplicableResourceCount value. */ public Integer notApplicableResourceCount() { @@ -105,7 +109,7 @@ public Integer notApplicableResourceCount() { /** * Get the weight property: The relative weight for this specific control in each of your subscriptions. Used when * calculating an aggregated score for this control across all of your subscriptions. - * + * * @return the weight value. */ public Long weight() { @@ -114,7 +118,7 @@ public Long weight() { /** * Get the definition property: Information about the security control. - * + * * @return the definition value. */ public SecureScoreControlDefinitionItemInner definition() { @@ -123,7 +127,7 @@ public SecureScoreControlDefinitionItemInner definition() { /** * Set the definition property: Information about the security control. - * + * * @param definition the definition value to set. * @return the SecureScoreControlScoreDetailsInner object itself. */ @@ -134,7 +138,7 @@ public SecureScoreControlScoreDetailsInner withDefinition(SecureScoreControlDefi /** * Get the max property: Maximum score available. - * + * * @return the max value. */ public Integer max() { @@ -143,7 +147,7 @@ public Integer max() { /** * Get the current property: Current score. - * + * * @return the current value. */ public Double current() { @@ -153,7 +157,7 @@ public Double current() { /** * Get the percentage property: Ratio of the current score divided by the maximum. Rounded to 4 digits after the * decimal point. - * + * * @return the percentage value. */ public Double percentage() { @@ -162,7 +166,7 @@ public Double percentage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemInner.java index c0a9ae516455..92e59606bbe8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemInner.java @@ -8,7 +8,9 @@ import com.azure.core.management.ProxyResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** Secure score item data model. */ +/** + * Secure score item data model. + */ @Immutable public final class SecureScoreItemInner extends ProxyResource { /* @@ -17,13 +19,15 @@ public final class SecureScoreItemInner extends ProxyResource { @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private SecureScoreItemProperties innerProperties; - /** Creates an instance of SecureScoreItemInner class. */ + /** + * Creates an instance of SecureScoreItemInner class. + */ public SecureScoreItemInner() { } /** * Get the innerProperties property: Secure score item. - * + * * @return the innerProperties value. */ private SecureScoreItemProperties innerProperties() { @@ -32,7 +36,7 @@ private SecureScoreItemProperties innerProperties() { /** * Get the displayName property: The initiative’s name. - * + * * @return the displayName value. */ public String displayName() { @@ -42,7 +46,7 @@ public String displayName() { /** * Get the weight property: The relative weight for each subscription. Used when calculating an aggregated secure * score for multiple subscriptions. - * + * * @return the weight value. */ public Long weight() { @@ -51,7 +55,7 @@ public Long weight() { /** * Get the max property: Maximum score available. - * + * * @return the max value. */ public Integer max() { @@ -60,7 +64,7 @@ public Integer max() { /** * Get the current property: Current score. - * + * * @return the current value. */ public Double current() { @@ -70,7 +74,7 @@ public Double current() { /** * Get the percentage property: Ratio of the current score divided by the maximum. Rounded to 4 digits after the * decimal point. - * + * * @return the percentage value. */ public Double percentage() { @@ -79,7 +83,7 @@ public Double percentage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemProperties.java index 889361f4149e..ea45787bafa5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecureScoreItemProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes properties of a calculated secure score. */ +/** + * Describes properties of a calculated secure score. + */ @Immutable public final class SecureScoreItemProperties { /* @@ -29,13 +31,15 @@ public final class SecureScoreItemProperties { @JsonProperty(value = "weight", access = JsonProperty.Access.WRITE_ONLY) private Long weight; - /** Creates an instance of SecureScoreItemProperties class. */ + /** + * Creates an instance of SecureScoreItemProperties class. + */ public SecureScoreItemProperties() { } /** * Get the displayName property: The initiative’s name. - * + * * @return the displayName value. */ public String displayName() { @@ -44,7 +48,7 @@ public String displayName() { /** * Get the innerScore property: score object. - * + * * @return the innerScore value. */ private ScoreDetails innerScore() { @@ -54,7 +58,7 @@ private ScoreDetails innerScore() { /** * Get the weight property: The relative weight for each subscription. Used when calculating an aggregated secure * score for multiple subscriptions. - * + * * @return the weight value. */ public Long weight() { @@ -63,7 +67,7 @@ public Long weight() { /** * Get the max property: Maximum score available. - * + * * @return the max value. */ public Integer max() { @@ -72,7 +76,7 @@ public Integer max() { /** * Get the current property: Current score. - * + * * @return the current value. */ public Double current() { @@ -82,7 +86,7 @@ public Double current() { /** * Get the percentage property: Ratio of the current score divided by the maximum. Rounded to 4 digits after the * decimal point. - * + * * @return the percentage value. */ public Double percentage() { @@ -91,7 +95,7 @@ public Double percentage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataProperties.java index d2452d561791..5904ba31260b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataProperties.java @@ -16,7 +16,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes properties of an assessment metadata. */ +/** + * Describes properties of an assessment metadata. + */ @Fluent public class SecurityAssessmentMetadataProperties { /* @@ -92,13 +94,15 @@ public class SecurityAssessmentMetadataProperties { @JsonProperty(value = "partnerData") private SecurityAssessmentMetadataPartnerData partnerData; - /** Creates an instance of SecurityAssessmentMetadataProperties class. */ + /** + * Creates an instance of SecurityAssessmentMetadataProperties class. + */ public SecurityAssessmentMetadataProperties() { } /** * Get the displayName property: User friendly display name of the assessment. - * + * * @return the displayName value. */ public String displayName() { @@ -107,7 +111,7 @@ public String displayName() { /** * Set the displayName property: User friendly display name of the assessment. - * + * * @param displayName the displayName value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -119,7 +123,7 @@ public SecurityAssessmentMetadataProperties withDisplayName(String displayName) /** * Get the policyDefinitionId property: Azure resource ID of the policy definition that turns this assessment * calculation on. - * + * * @return the policyDefinitionId value. */ public String policyDefinitionId() { @@ -128,7 +132,7 @@ public String policyDefinitionId() { /** * Get the description property: Human readable description of the assessment. - * + * * @return the description value. */ public String description() { @@ -137,7 +141,7 @@ public String description() { /** * Set the description property: Human readable description of the assessment. - * + * * @param description the description value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -149,7 +153,7 @@ public SecurityAssessmentMetadataProperties withDescription(String description) /** * Get the remediationDescription property: Human readable description of what you should do to mitigate this * security issue. - * + * * @return the remediationDescription value. */ public String remediationDescription() { @@ -159,7 +163,7 @@ public String remediationDescription() { /** * Set the remediationDescription property: Human readable description of what you should do to mitigate this * security issue. - * + * * @param remediationDescription the remediationDescription value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -170,7 +174,7 @@ public SecurityAssessmentMetadataProperties withRemediationDescription(String re /** * Get the categories property: The categories property. - * + * * @return the categories value. */ public List categories() { @@ -179,7 +183,7 @@ public List categories() { /** * Set the categories property: The categories property. - * + * * @param categories the categories value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -190,7 +194,7 @@ public SecurityAssessmentMetadataProperties withCategories(List cate /** * Get the severity property: The severity level of the assessment. - * + * * @return the severity value. */ public Severity severity() { @@ -199,7 +203,7 @@ public Severity severity() { /** * Set the severity property: The severity level of the assessment. - * + * * @param severity the severity value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -210,7 +214,7 @@ public SecurityAssessmentMetadataProperties withSeverity(Severity severity) { /** * Get the userImpact property: The user impact of the assessment. - * + * * @return the userImpact value. */ public UserImpact userImpact() { @@ -219,7 +223,7 @@ public UserImpact userImpact() { /** * Set the userImpact property: The user impact of the assessment. - * + * * @param userImpact the userImpact value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -230,7 +234,7 @@ public SecurityAssessmentMetadataProperties withUserImpact(UserImpact userImpact /** * Get the implementationEffort property: The implementation effort required to remediate this assessment. - * + * * @return the implementationEffort value. */ public ImplementationEffort implementationEffort() { @@ -239,7 +243,7 @@ public ImplementationEffort implementationEffort() { /** * Set the implementationEffort property: The implementation effort required to remediate this assessment. - * + * * @param implementationEffort the implementationEffort value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -250,7 +254,7 @@ public SecurityAssessmentMetadataProperties withImplementationEffort(Implementat /** * Get the threats property: The threats property. - * + * * @return the threats value. */ public List threats() { @@ -259,7 +263,7 @@ public List threats() { /** * Set the threats property: The threats property. - * + * * @param threats the threats value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -270,7 +274,7 @@ public SecurityAssessmentMetadataProperties withThreats(List threats) { /** * Get the preview property: True if this assessment is in preview release status. - * + * * @return the preview value. */ public Boolean preview() { @@ -279,7 +283,7 @@ public Boolean preview() { /** * Set the preview property: True if this assessment is in preview release status. - * + * * @param preview the preview value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -291,7 +295,7 @@ public SecurityAssessmentMetadataProperties withPreview(Boolean preview) { /** * Get the assessmentType property: BuiltIn if the assessment based on built-in Azure Policy definition, Custom if * the assessment based on custom Azure Policy definition. - * + * * @return the assessmentType value. */ public AssessmentType assessmentType() { @@ -301,7 +305,7 @@ public AssessmentType assessmentType() { /** * Set the assessmentType property: BuiltIn if the assessment based on built-in Azure Policy definition, Custom if * the assessment based on custom Azure Policy definition. - * + * * @param assessmentType the assessmentType value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -312,7 +316,7 @@ public SecurityAssessmentMetadataProperties withAssessmentType(AssessmentType as /** * Get the partnerData property: Describes the partner that created the assessment. - * + * * @return the partnerData value. */ public SecurityAssessmentMetadataPartnerData partnerData() { @@ -321,7 +325,7 @@ public SecurityAssessmentMetadataPartnerData partnerData() { /** * Set the partnerData property: Describes the partner that created the assessment. - * + * * @param partnerData the partnerData value to set. * @return the SecurityAssessmentMetadataProperties object itself. */ @@ -332,27 +336,21 @@ public SecurityAssessmentMetadataProperties withPartnerData(SecurityAssessmentMe /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model SecurityAssessmentMetadataProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property displayName in model SecurityAssessmentMetadataProperties")); } if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model SecurityAssessmentMetadataProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property severity in model SecurityAssessmentMetadataProperties")); } if (assessmentType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property assessmentType in model SecurityAssessmentMetadataProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property assessmentType in model SecurityAssessmentMetadataProperties")); } if (partnerData() != null) { partnerData().validate(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataPropertiesResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataPropertiesResponse.java index eb080f0c54c3..3d30e4db6209 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataPropertiesResponse.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataPropertiesResponse.java @@ -18,7 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes properties of an assessment metadata response. */ +/** + * Describes properties of an assessment metadata response. + */ @Fluent public final class SecurityAssessmentMetadataPropertiesResponse extends SecurityAssessmentMetadataProperties { /* @@ -45,13 +47,15 @@ public final class SecurityAssessmentMetadataPropertiesResponse extends Security @JsonProperty(value = "techniques") private List techniques; - /** Creates an instance of SecurityAssessmentMetadataPropertiesResponse class. */ + /** + * Creates an instance of SecurityAssessmentMetadataPropertiesResponse class. + */ public SecurityAssessmentMetadataPropertiesResponse() { } /** * Get the publishDates property: The publishDates property. - * + * * @return the publishDates value. */ public SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates() { @@ -60,19 +64,19 @@ public SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates() { /** * Set the publishDates property: The publishDates property. - * + * * @param publishDates the publishDates value to set. * @return the SecurityAssessmentMetadataPropertiesResponse object itself. */ - public SecurityAssessmentMetadataPropertiesResponse withPublishDates( - SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates) { + public SecurityAssessmentMetadataPropertiesResponse + withPublishDates(SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates) { this.publishDates = publishDates; return this; } /** * Get the plannedDeprecationDate property: The plannedDeprecationDate property. - * + * * @return the plannedDeprecationDate value. */ public String plannedDeprecationDate() { @@ -81,7 +85,7 @@ public String plannedDeprecationDate() { /** * Set the plannedDeprecationDate property: The plannedDeprecationDate property. - * + * * @param plannedDeprecationDate the plannedDeprecationDate value to set. * @return the SecurityAssessmentMetadataPropertiesResponse object itself. */ @@ -92,7 +96,7 @@ public SecurityAssessmentMetadataPropertiesResponse withPlannedDeprecationDate(S /** * Get the tactics property: The tactics property. - * + * * @return the tactics value. */ public List tactics() { @@ -101,7 +105,7 @@ public List tactics() { /** * Set the tactics property: The tactics property. - * + * * @param tactics the tactics value to set. * @return the SecurityAssessmentMetadataPropertiesResponse object itself. */ @@ -112,7 +116,7 @@ public SecurityAssessmentMetadataPropertiesResponse withTactics(List ta /** * Get the techniques property: The techniques property. - * + * * @return the techniques value. */ public List techniques() { @@ -121,7 +125,7 @@ public List techniques() { /** * Set the techniques property: The techniques property. - * + * * @param techniques the techniques value to set. * @return the SecurityAssessmentMetadataPropertiesResponse object itself. */ @@ -130,88 +134,110 @@ public SecurityAssessmentMetadataPropertiesResponse withTechniques(List categories) { super.withCategories(categories); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentMetadataPropertiesResponse withSeverity(Severity severity) { super.withSeverity(severity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentMetadataPropertiesResponse withUserImpact(UserImpact userImpact) { super.withUserImpact(userImpact); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public SecurityAssessmentMetadataPropertiesResponse withImplementationEffort( - ImplementationEffort implementationEffort) { + public SecurityAssessmentMetadataPropertiesResponse + withImplementationEffort(ImplementationEffort implementationEffort) { super.withImplementationEffort(implementationEffort); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentMetadataPropertiesResponse withThreats(List threats) { super.withThreats(threats); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentMetadataPropertiesResponse withPreview(Boolean preview) { super.withPreview(preview); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentMetadataPropertiesResponse withAssessmentType(AssessmentType assessmentType) { super.withAssessmentType(assessmentType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public SecurityAssessmentMetadataPropertiesResponse withPartnerData( - SecurityAssessmentMetadataPartnerData partnerData) { + public SecurityAssessmentMetadataPropertiesResponse + withPartnerData(SecurityAssessmentMetadataPartnerData partnerData) { super.withPartnerData(partnerData); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataResponseInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataResponseInner.java index 1167a0a33df6..eb0cb48a1e91 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataResponseInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentMetadataResponseInner.java @@ -19,7 +19,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Security assessment metadata response. */ +/** + * Security assessment metadata response. + */ @Fluent public final class SecurityAssessmentMetadataResponseInner extends ProxyResource { /* @@ -28,13 +30,15 @@ public final class SecurityAssessmentMetadataResponseInner extends ProxyResource @JsonProperty(value = "properties") private SecurityAssessmentMetadataPropertiesResponse innerProperties; - /** Creates an instance of SecurityAssessmentMetadataResponseInner class. */ + /** + * Creates an instance of SecurityAssessmentMetadataResponseInner class. + */ public SecurityAssessmentMetadataResponseInner() { } /** * Get the innerProperties property: Describes properties of an assessment metadata response. - * + * * @return the innerProperties value. */ private SecurityAssessmentMetadataPropertiesResponse innerProperties() { @@ -43,7 +47,7 @@ private SecurityAssessmentMetadataPropertiesResponse innerProperties() { /** * Get the publishDates property: The publishDates property. - * + * * @return the publishDates value. */ public SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates() { @@ -52,12 +56,12 @@ public SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates() { /** * Set the publishDates property: The publishDates property. - * + * * @param publishDates the publishDates value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ - public SecurityAssessmentMetadataResponseInner withPublishDates( - SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates) { + public SecurityAssessmentMetadataResponseInner + withPublishDates(SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates) { if (this.innerProperties() == null) { this.innerProperties = new SecurityAssessmentMetadataPropertiesResponse(); } @@ -67,7 +71,7 @@ public SecurityAssessmentMetadataResponseInner withPublishDates( /** * Get the plannedDeprecationDate property: The plannedDeprecationDate property. - * + * * @return the plannedDeprecationDate value. */ public String plannedDeprecationDate() { @@ -76,7 +80,7 @@ public String plannedDeprecationDate() { /** * Set the plannedDeprecationDate property: The plannedDeprecationDate property. - * + * * @param plannedDeprecationDate the plannedDeprecationDate value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -90,7 +94,7 @@ public SecurityAssessmentMetadataResponseInner withPlannedDeprecationDate(String /** * Get the tactics property: The tactics property. - * + * * @return the tactics value. */ public List tactics() { @@ -99,7 +103,7 @@ public List tactics() { /** * Set the tactics property: The tactics property. - * + * * @param tactics the tactics value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -113,7 +117,7 @@ public SecurityAssessmentMetadataResponseInner withTactics(List tactics /** * Get the techniques property: The techniques property. - * + * * @return the techniques value. */ public List techniques() { @@ -122,7 +126,7 @@ public List techniques() { /** * Set the techniques property: The techniques property. - * + * * @param techniques the techniques value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -136,7 +140,7 @@ public SecurityAssessmentMetadataResponseInner withTechniques(List t /** * Get the displayName property: User friendly display name of the assessment. - * + * * @return the displayName value. */ public String displayName() { @@ -145,7 +149,7 @@ public String displayName() { /** * Set the displayName property: User friendly display name of the assessment. - * + * * @param displayName the displayName value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -160,7 +164,7 @@ public SecurityAssessmentMetadataResponseInner withDisplayName(String displayNam /** * Get the policyDefinitionId property: Azure resource ID of the policy definition that turns this assessment * calculation on. - * + * * @return the policyDefinitionId value. */ public String policyDefinitionId() { @@ -169,7 +173,7 @@ public String policyDefinitionId() { /** * Get the description property: Human readable description of the assessment. - * + * * @return the description value. */ public String description() { @@ -178,7 +182,7 @@ public String description() { /** * Set the description property: Human readable description of the assessment. - * + * * @param description the description value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -193,7 +197,7 @@ public SecurityAssessmentMetadataResponseInner withDescription(String descriptio /** * Get the remediationDescription property: Human readable description of what you should do to mitigate this * security issue. - * + * * @return the remediationDescription value. */ public String remediationDescription() { @@ -203,7 +207,7 @@ public String remediationDescription() { /** * Set the remediationDescription property: Human readable description of what you should do to mitigate this * security issue. - * + * * @param remediationDescription the remediationDescription value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -217,7 +221,7 @@ public SecurityAssessmentMetadataResponseInner withRemediationDescription(String /** * Get the categories property: The categories property. - * + * * @return the categories value. */ public List categories() { @@ -226,7 +230,7 @@ public List categories() { /** * Set the categories property: The categories property. - * + * * @param categories the categories value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -240,7 +244,7 @@ public SecurityAssessmentMetadataResponseInner withCategories(List c /** * Get the severity property: The severity level of the assessment. - * + * * @return the severity value. */ public Severity severity() { @@ -249,7 +253,7 @@ public Severity severity() { /** * Set the severity property: The severity level of the assessment. - * + * * @param severity the severity value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -263,7 +267,7 @@ public SecurityAssessmentMetadataResponseInner withSeverity(Severity severity) { /** * Get the userImpact property: The user impact of the assessment. - * + * * @return the userImpact value. */ public UserImpact userImpact() { @@ -272,7 +276,7 @@ public UserImpact userImpact() { /** * Set the userImpact property: The user impact of the assessment. - * + * * @param userImpact the userImpact value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -286,7 +290,7 @@ public SecurityAssessmentMetadataResponseInner withUserImpact(UserImpact userImp /** * Get the implementationEffort property: The implementation effort required to remediate this assessment. - * + * * @return the implementationEffort value. */ public ImplementationEffort implementationEffort() { @@ -295,7 +299,7 @@ public ImplementationEffort implementationEffort() { /** * Set the implementationEffort property: The implementation effort required to remediate this assessment. - * + * * @param implementationEffort the implementationEffort value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -309,7 +313,7 @@ public SecurityAssessmentMetadataResponseInner withImplementationEffort(Implemen /** * Get the threats property: The threats property. - * + * * @return the threats value. */ public List threats() { @@ -318,7 +322,7 @@ public List threats() { /** * Set the threats property: The threats property. - * + * * @param threats the threats value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -332,7 +336,7 @@ public SecurityAssessmentMetadataResponseInner withThreats(List threats /** * Get the preview property: True if this assessment is in preview release status. - * + * * @return the preview value. */ public Boolean preview() { @@ -341,7 +345,7 @@ public Boolean preview() { /** * Set the preview property: True if this assessment is in preview release status. - * + * * @param preview the preview value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -356,7 +360,7 @@ public SecurityAssessmentMetadataResponseInner withPreview(Boolean preview) { /** * Get the assessmentType property: BuiltIn if the assessment based on built-in Azure Policy definition, Custom if * the assessment based on custom Azure Policy definition. - * + * * @return the assessmentType value. */ public AssessmentType assessmentType() { @@ -366,7 +370,7 @@ public AssessmentType assessmentType() { /** * Set the assessmentType property: BuiltIn if the assessment based on built-in Azure Policy definition, Custom if * the assessment based on custom Azure Policy definition. - * + * * @param assessmentType the assessmentType value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -380,7 +384,7 @@ public SecurityAssessmentMetadataResponseInner withAssessmentType(AssessmentType /** * Get the partnerData property: Describes the partner that created the assessment. - * + * * @return the partnerData value. */ public SecurityAssessmentMetadataPartnerData partnerData() { @@ -389,7 +393,7 @@ public SecurityAssessmentMetadataPartnerData partnerData() { /** * Set the partnerData property: Describes the partner that created the assessment. - * + * * @param partnerData the partnerData value to set. * @return the SecurityAssessmentMetadataResponseInner object itself. */ @@ -403,7 +407,7 @@ public SecurityAssessmentMetadataResponseInner withPartnerData(SecurityAssessmen /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentProperties.java index d5d7b67530e4..7c76f5f704f8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentProperties.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes properties of an assessment. */ +/** + * Describes properties of an assessment. + */ @Fluent public final class SecurityAssessmentProperties extends SecurityAssessmentPropertiesBase { /* @@ -22,13 +24,15 @@ public final class SecurityAssessmentProperties extends SecurityAssessmentProper @JsonProperty(value = "status", required = true) private AssessmentStatus status; - /** Creates an instance of SecurityAssessmentProperties class. */ + /** + * Creates an instance of SecurityAssessmentProperties class. + */ public SecurityAssessmentProperties() { } /** * Get the status property: The result of the assessment. - * + * * @return the status value. */ public AssessmentStatus status() { @@ -37,7 +41,7 @@ public AssessmentStatus status() { /** * Set the status property: The result of the assessment. - * + * * @param status the status value to set. * @return the SecurityAssessmentProperties object itself. */ @@ -46,28 +50,36 @@ public SecurityAssessmentProperties withStatus(AssessmentStatus status) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentProperties withResourceDetails(ResourceDetails resourceDetails) { super.withResourceDetails(resourceDetails); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentProperties withAdditionalData(Map additionalData) { super.withAdditionalData(additionalData); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentProperties withMetadata(SecurityAssessmentMetadataProperties metadata) { super.withMetadata(metadata); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentProperties withPartnersData(SecurityAssessmentPartnerData partnersData) { super.withPartnersData(partnersData); @@ -76,17 +88,15 @@ public SecurityAssessmentProperties withPartnersData(SecurityAssessmentPartnerDa /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model SecurityAssessmentProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property status in model SecurityAssessmentProperties")); } else { status().validate(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentPropertiesResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentPropertiesResponse.java index 9c4c6cdec8b2..7847eb919414 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentPropertiesResponse.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentPropertiesResponse.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes properties of an assessment. */ +/** + * Describes properties of an assessment. + */ @Fluent public final class SecurityAssessmentPropertiesResponse extends SecurityAssessmentPropertiesBase { /* @@ -22,13 +24,15 @@ public final class SecurityAssessmentPropertiesResponse extends SecurityAssessme @JsonProperty(value = "status", required = true) private AssessmentStatusResponse status; - /** Creates an instance of SecurityAssessmentPropertiesResponse class. */ + /** + * Creates an instance of SecurityAssessmentPropertiesResponse class. + */ public SecurityAssessmentPropertiesResponse() { } /** * Get the status property: The result of the assessment. - * + * * @return the status value. */ public AssessmentStatusResponse status() { @@ -37,7 +41,7 @@ public AssessmentStatusResponse status() { /** * Set the status property: The result of the assessment. - * + * * @param status the status value to set. * @return the SecurityAssessmentPropertiesResponse object itself. */ @@ -46,28 +50,36 @@ public SecurityAssessmentPropertiesResponse withStatus(AssessmentStatusResponse return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentPropertiesResponse withResourceDetails(ResourceDetails resourceDetails) { super.withResourceDetails(resourceDetails); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentPropertiesResponse withAdditionalData(Map additionalData) { super.withAdditionalData(additionalData); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentPropertiesResponse withMetadata(SecurityAssessmentMetadataProperties metadata) { super.withMetadata(metadata); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityAssessmentPropertiesResponse withPartnersData(SecurityAssessmentPartnerData partnersData) { super.withPartnersData(partnersData); @@ -76,17 +88,15 @@ public SecurityAssessmentPropertiesResponse withPartnersData(SecurityAssessmentP /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model SecurityAssessmentPropertiesResponse")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property status in model SecurityAssessmentPropertiesResponse")); } else { status().validate(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentResponseInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentResponseInner.java index f3579b78ef47..4400e64eb587 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentResponseInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentResponseInner.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Security assessment on a resource - response format. */ +/** + * Security assessment on a resource - response format. + */ @Fluent public final class SecurityAssessmentResponseInner extends ProxyResource { /* @@ -22,13 +24,15 @@ public final class SecurityAssessmentResponseInner extends ProxyResource { @JsonProperty(value = "properties") private SecurityAssessmentPropertiesResponse innerProperties; - /** Creates an instance of SecurityAssessmentResponseInner class. */ + /** + * Creates an instance of SecurityAssessmentResponseInner class. + */ public SecurityAssessmentResponseInner() { } /** * Get the innerProperties property: Describes properties of an assessment. - * + * * @return the innerProperties value. */ private SecurityAssessmentPropertiesResponse innerProperties() { @@ -37,7 +41,7 @@ private SecurityAssessmentPropertiesResponse innerProperties() { /** * Get the status property: The result of the assessment. - * + * * @return the status value. */ public AssessmentStatusResponse status() { @@ -46,7 +50,7 @@ public AssessmentStatusResponse status() { /** * Set the status property: The result of the assessment. - * + * * @param status the status value to set. * @return the SecurityAssessmentResponseInner object itself. */ @@ -60,7 +64,7 @@ public SecurityAssessmentResponseInner withStatus(AssessmentStatusResponse statu /** * Get the resourceDetails property: Details of the resource that was assessed. - * + * * @return the resourceDetails value. */ public ResourceDetails resourceDetails() { @@ -69,7 +73,7 @@ public ResourceDetails resourceDetails() { /** * Set the resourceDetails property: Details of the resource that was assessed. - * + * * @param resourceDetails the resourceDetails value to set. * @return the SecurityAssessmentResponseInner object itself. */ @@ -83,7 +87,7 @@ public SecurityAssessmentResponseInner withResourceDetails(ResourceDetails resou /** * Get the displayName property: User friendly display name of the assessment. - * + * * @return the displayName value. */ public String displayName() { @@ -92,7 +96,7 @@ public String displayName() { /** * Get the additionalData property: Additional data regarding the assessment. - * + * * @return the additionalData value. */ public Map additionalData() { @@ -101,7 +105,7 @@ public Map additionalData() { /** * Set the additionalData property: Additional data regarding the assessment. - * + * * @param additionalData the additionalData value to set. * @return the SecurityAssessmentResponseInner object itself. */ @@ -115,7 +119,7 @@ public SecurityAssessmentResponseInner withAdditionalData(Map ad /** * Get the links property: Links relevant to the assessment. - * + * * @return the links value. */ public AssessmentLinks links() { @@ -124,7 +128,7 @@ public AssessmentLinks links() { /** * Get the metadata property: Describes properties of an assessment metadata. - * + * * @return the metadata value. */ public SecurityAssessmentMetadataProperties metadata() { @@ -133,7 +137,7 @@ public SecurityAssessmentMetadataProperties metadata() { /** * Set the metadata property: Describes properties of an assessment metadata. - * + * * @param metadata the metadata value to set. * @return the SecurityAssessmentResponseInner object itself. */ @@ -147,7 +151,7 @@ public SecurityAssessmentResponseInner withMetadata(SecurityAssessmentMetadataPr /** * Get the partnersData property: Data regarding 3rd party partner integration. - * + * * @return the partnersData value. */ public SecurityAssessmentPartnerData partnersData() { @@ -156,7 +160,7 @@ public SecurityAssessmentPartnerData partnersData() { /** * Set the partnersData property: Data regarding 3rd party partner integration. - * + * * @param partnersData the partnersData value to set. * @return the SecurityAssessmentResponseInner object itself. */ @@ -170,7 +174,7 @@ public SecurityAssessmentResponseInner withPartnersData(SecurityAssessmentPartne /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorInner.java index a58a7ab73eb4..3c61bfdcb308 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorInner.java @@ -15,7 +15,9 @@ import java.util.List; import java.util.Map; -/** The security connector resource. */ +/** + * The security connector resource. + */ @Fluent public final class SecurityConnectorInner extends Resource { /* @@ -30,13 +32,15 @@ public final class SecurityConnectorInner extends Resource { @JsonProperty(value = "properties") private SecurityConnectorProperties innerProperties; - /** Creates an instance of SecurityConnectorInner class. */ + /** + * Creates an instance of SecurityConnectorInner class. + */ public SecurityConnectorInner() { } /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -45,21 +49,25 @@ public SystemData systemData() { /** * Get the innerProperties property: Security connector data. - * + * * @return the innerProperties value. */ private SecurityConnectorProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityConnectorInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SecurityConnectorInner withTags(Map tags) { super.withTags(tags); @@ -69,7 +77,7 @@ public SecurityConnectorInner withTags(Map tags) { /** * Get the hierarchyIdentifier property: The multi cloud resource identifier (account id in case of AWS connector, * project number in case of GCP connector). - * + * * @return the hierarchyIdentifier value. */ public String hierarchyIdentifier() { @@ -79,7 +87,7 @@ public String hierarchyIdentifier() { /** * Set the hierarchyIdentifier property: The multi cloud resource identifier (account id in case of AWS connector, * project number in case of GCP connector). - * + * * @param hierarchyIdentifier the hierarchyIdentifier value to set. * @return the SecurityConnectorInner object itself. */ @@ -94,7 +102,7 @@ public SecurityConnectorInner withHierarchyIdentifier(String hierarchyIdentifier /** * Get the hierarchyIdentifierTrialEndDate property: The date on which the trial period will end, if applicable. * Trial period exists for 30 days after upgrading to payed offerings. - * + * * @return the hierarchyIdentifierTrialEndDate value. */ public OffsetDateTime hierarchyIdentifierTrialEndDate() { @@ -103,7 +111,7 @@ public OffsetDateTime hierarchyIdentifierTrialEndDate() { /** * Get the environmentName property: The multi cloud resource's cloud name. - * + * * @return the environmentName value. */ public CloudName environmentName() { @@ -112,7 +120,7 @@ public CloudName environmentName() { /** * Set the environmentName property: The multi cloud resource's cloud name. - * + * * @param environmentName the environmentName value to set. * @return the SecurityConnectorInner object itself. */ @@ -126,7 +134,7 @@ public SecurityConnectorInner withEnvironmentName(CloudName environmentName) { /** * Get the offerings property: A collection of offerings for the security connector. - * + * * @return the offerings value. */ public List offerings() { @@ -135,7 +143,7 @@ public List offerings() { /** * Set the offerings property: A collection of offerings for the security connector. - * + * * @param offerings the offerings value to set. * @return the SecurityConnectorInner object itself. */ @@ -149,7 +157,7 @@ public SecurityConnectorInner withOfferings(List offerings) { /** * Get the environmentData property: The security connector environment data. - * + * * @return the environmentData value. */ public EnvironmentData environmentData() { @@ -158,7 +166,7 @@ public EnvironmentData environmentData() { /** * Set the environmentData property: The security connector environment data. - * + * * @param environmentData the environmentData value to set. * @return the SecurityConnectorInner object itself. */ @@ -172,7 +180,7 @@ public SecurityConnectorInner withEnvironmentData(EnvironmentData environmentDat /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorProperties.java index df14a0076cf6..914b410bbf87 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityConnectorProperties.java @@ -12,7 +12,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** A set of properties that defines the security connector configuration. */ +/** + * A set of properties that defines the security connector configuration. + */ @Fluent public final class SecurityConnectorProperties { /* @@ -47,14 +49,16 @@ public final class SecurityConnectorProperties { @JsonProperty(value = "environmentData") private EnvironmentData environmentData; - /** Creates an instance of SecurityConnectorProperties class. */ + /** + * Creates an instance of SecurityConnectorProperties class. + */ public SecurityConnectorProperties() { } /** * Get the hierarchyIdentifier property: The multi cloud resource identifier (account id in case of AWS connector, * project number in case of GCP connector). - * + * * @return the hierarchyIdentifier value. */ public String hierarchyIdentifier() { @@ -64,7 +68,7 @@ public String hierarchyIdentifier() { /** * Set the hierarchyIdentifier property: The multi cloud resource identifier (account id in case of AWS connector, * project number in case of GCP connector). - * + * * @param hierarchyIdentifier the hierarchyIdentifier value to set. * @return the SecurityConnectorProperties object itself. */ @@ -76,7 +80,7 @@ public SecurityConnectorProperties withHierarchyIdentifier(String hierarchyIdent /** * Get the hierarchyIdentifierTrialEndDate property: The date on which the trial period will end, if applicable. * Trial period exists for 30 days after upgrading to payed offerings. - * + * * @return the hierarchyIdentifierTrialEndDate value. */ public OffsetDateTime hierarchyIdentifierTrialEndDate() { @@ -85,7 +89,7 @@ public OffsetDateTime hierarchyIdentifierTrialEndDate() { /** * Get the environmentName property: The multi cloud resource's cloud name. - * + * * @return the environmentName value. */ public CloudName environmentName() { @@ -94,7 +98,7 @@ public CloudName environmentName() { /** * Set the environmentName property: The multi cloud resource's cloud name. - * + * * @param environmentName the environmentName value to set. * @return the SecurityConnectorProperties object itself. */ @@ -105,7 +109,7 @@ public SecurityConnectorProperties withEnvironmentName(CloudName environmentName /** * Get the offerings property: A collection of offerings for the security connector. - * + * * @return the offerings value. */ public List offerings() { @@ -114,7 +118,7 @@ public List offerings() { /** * Set the offerings property: A collection of offerings for the security connector. - * + * * @param offerings the offerings value to set. * @return the SecurityConnectorProperties object itself. */ @@ -125,7 +129,7 @@ public SecurityConnectorProperties withOfferings(List offerings) /** * Get the environmentData property: The security connector environment data. - * + * * @return the environmentData value. */ public EnvironmentData environmentData() { @@ -134,7 +138,7 @@ public EnvironmentData environmentData() { /** * Set the environmentData property: The security connector environment data. - * + * * @param environmentData the environmentData value to set. * @return the SecurityConnectorProperties object itself. */ @@ -145,7 +149,7 @@ public SecurityConnectorProperties withEnvironmentData(EnvironmentData environme /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactInner.java index 0606139e3bf2..c8e234311656 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactInner.java @@ -6,11 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.security.models.SecurityContactPropertiesAlertNotifications; +import com.azure.resourcemanager.security.models.NotificationsSource; import com.azure.resourcemanager.security.models.SecurityContactPropertiesNotificationsByRole; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** Contact details and configurations for notifications coming from Microsoft Defender for Cloud. */ +/** + * Contact details and configurations for notifications coming from Microsoft Defender for Cloud. + */ @Fluent public final class SecurityContactInner extends ProxyResource { /* @@ -19,13 +22,15 @@ public final class SecurityContactInner extends ProxyResource { @JsonProperty(value = "properties") private SecurityContactProperties innerProperties; - /** Creates an instance of SecurityContactInner class. */ + /** + * Creates an instance of SecurityContactInner class. + */ public SecurityContactInner() { } /** * Get the innerProperties property: Security contact data. - * + * * @return the innerProperties value. */ private SecurityContactProperties innerProperties() { @@ -35,7 +40,7 @@ private SecurityContactProperties innerProperties() { /** * Get the emails property: List of email addresses which will get notifications from Microsoft Defender for Cloud * by the configurations defined in this security contact. - * + * * @return the emails value. */ public String emails() { @@ -45,7 +50,7 @@ public String emails() { /** * Set the emails property: List of email addresses which will get notifications from Microsoft Defender for Cloud * by the configurations defined in this security contact. - * + * * @param emails the emails value to set. * @return the SecurityContactInner object itself. */ @@ -59,7 +64,7 @@ public SecurityContactInner withEmails(String emails) { /** * Get the phone property: The security contact's phone number. - * + * * @return the phone value. */ public String phone() { @@ -68,7 +73,7 @@ public String phone() { /** * Set the phone property: The security contact's phone number. - * + * * @param phone the phone value to set. * @return the SecurityContactInner object itself. */ @@ -81,32 +86,55 @@ public SecurityContactInner withPhone(String phone) { } /** - * Get the alertNotifications property: Defines whether to send email notifications about new security alerts. - * - * @return the alertNotifications value. + * Get the isEnabled property: Indicates whether the security contact is enabled. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); + } + + /** + * Set the isEnabled property: Indicates whether the security contact is enabled. + * + * @param isEnabled the isEnabled value to set. + * @return the SecurityContactInner object itself. + */ + public SecurityContactInner withIsEnabled(Boolean isEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SecurityContactProperties(); + } + this.innerProperties().withIsEnabled(isEnabled); + return this; + } + + /** + * Get the notificationsSources property: A collection of sources types which evaluate the email notification. + * + * @return the notificationsSources value. */ - public SecurityContactPropertiesAlertNotifications alertNotifications() { - return this.innerProperties() == null ? null : this.innerProperties().alertNotifications(); + public List notificationsSources() { + return this.innerProperties() == null ? null : this.innerProperties().notificationsSources(); } /** - * Set the alertNotifications property: Defines whether to send email notifications about new security alerts. - * - * @param alertNotifications the alertNotifications value to set. + * Set the notificationsSources property: A collection of sources types which evaluate the email notification. + * + * @param notificationsSources the notificationsSources value to set. * @return the SecurityContactInner object itself. */ - public SecurityContactInner withAlertNotifications(SecurityContactPropertiesAlertNotifications alertNotifications) { + public SecurityContactInner withNotificationsSources(List notificationsSources) { if (this.innerProperties() == null) { this.innerProperties = new SecurityContactProperties(); } - this.innerProperties().withAlertNotifications(alertNotifications); + this.innerProperties().withNotificationsSources(notificationsSources); return this; } /** * Get the notificationsByRole property: Defines whether to send email notifications from Microsoft Defender for * Cloud to persons with specific RBAC roles on the subscription. - * + * * @return the notificationsByRole value. */ public SecurityContactPropertiesNotificationsByRole notificationsByRole() { @@ -116,12 +144,12 @@ public SecurityContactPropertiesNotificationsByRole notificationsByRole() { /** * Set the notificationsByRole property: Defines whether to send email notifications from Microsoft Defender for * Cloud to persons with specific RBAC roles on the subscription. - * + * * @param notificationsByRole the notificationsByRole value to set. * @return the SecurityContactInner object itself. */ - public SecurityContactInner withNotificationsByRole( - SecurityContactPropertiesNotificationsByRole notificationsByRole) { + public SecurityContactInner + withNotificationsByRole(SecurityContactPropertiesNotificationsByRole notificationsByRole) { if (this.innerProperties() == null) { this.innerProperties = new SecurityContactProperties(); } @@ -131,7 +159,7 @@ public SecurityContactInner withNotificationsByRole( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactProperties.java index 34c16a792122..068536412e20 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityContactProperties.java @@ -5,11 +5,14 @@ package com.azure.resourcemanager.security.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.security.models.SecurityContactPropertiesAlertNotifications; +import com.azure.resourcemanager.security.models.NotificationsSource; import com.azure.resourcemanager.security.models.SecurityContactPropertiesNotificationsByRole; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** Describes security contact properties. */ +/** + * Describes security contact properties. + */ @Fluent public final class SecurityContactProperties { /* @@ -26,10 +29,16 @@ public final class SecurityContactProperties { private String phone; /* - * Defines whether to send email notifications about new security alerts + * Indicates whether the security contact is enabled. */ - @JsonProperty(value = "alertNotifications") - private SecurityContactPropertiesAlertNotifications alertNotifications; + @JsonProperty(value = "isEnabled") + private Boolean isEnabled; + + /* + * A collection of sources types which evaluate the email notification. + */ + @JsonProperty(value = "notificationsSources") + private List notificationsSources; /* * Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC @@ -38,14 +47,16 @@ public final class SecurityContactProperties { @JsonProperty(value = "notificationsByRole") private SecurityContactPropertiesNotificationsByRole notificationsByRole; - /** Creates an instance of SecurityContactProperties class. */ + /** + * Creates an instance of SecurityContactProperties class. + */ public SecurityContactProperties() { } /** * Get the emails property: List of email addresses which will get notifications from Microsoft Defender for Cloud * by the configurations defined in this security contact. - * + * * @return the emails value. */ public String emails() { @@ -55,7 +66,7 @@ public String emails() { /** * Set the emails property: List of email addresses which will get notifications from Microsoft Defender for Cloud * by the configurations defined in this security contact. - * + * * @param emails the emails value to set. * @return the SecurityContactProperties object itself. */ @@ -66,7 +77,7 @@ public SecurityContactProperties withEmails(String emails) { /** * Get the phone property: The security contact's phone number. - * + * * @return the phone value. */ public String phone() { @@ -75,7 +86,7 @@ public String phone() { /** * Set the phone property: The security contact's phone number. - * + * * @param phone the phone value to set. * @return the SecurityContactProperties object itself. */ @@ -85,30 +96,49 @@ public SecurityContactProperties withPhone(String phone) { } /** - * Get the alertNotifications property: Defines whether to send email notifications about new security alerts. - * - * @return the alertNotifications value. + * Get the isEnabled property: Indicates whether the security contact is enabled. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Set the isEnabled property: Indicates whether the security contact is enabled. + * + * @param isEnabled the isEnabled value to set. + * @return the SecurityContactProperties object itself. + */ + public SecurityContactProperties withIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Get the notificationsSources property: A collection of sources types which evaluate the email notification. + * + * @return the notificationsSources value. */ - public SecurityContactPropertiesAlertNotifications alertNotifications() { - return this.alertNotifications; + public List notificationsSources() { + return this.notificationsSources; } /** - * Set the alertNotifications property: Defines whether to send email notifications about new security alerts. - * - * @param alertNotifications the alertNotifications value to set. + * Set the notificationsSources property: A collection of sources types which evaluate the email notification. + * + * @param notificationsSources the notificationsSources value to set. * @return the SecurityContactProperties object itself. */ - public SecurityContactProperties withAlertNotifications( - SecurityContactPropertiesAlertNotifications alertNotifications) { - this.alertNotifications = alertNotifications; + public SecurityContactProperties withNotificationsSources(List notificationsSources) { + this.notificationsSources = notificationsSources; return this; } /** * Get the notificationsByRole property: Defines whether to send email notifications from Microsoft Defender for * Cloud to persons with specific RBAC roles on the subscription. - * + * * @return the notificationsByRole value. */ public SecurityContactPropertiesNotificationsByRole notificationsByRole() { @@ -118,24 +148,24 @@ public SecurityContactPropertiesNotificationsByRole notificationsByRole() { /** * Set the notificationsByRole property: Defines whether to send email notifications from Microsoft Defender for * Cloud to persons with specific RBAC roles on the subscription. - * + * * @param notificationsByRole the notificationsByRole value to set. * @return the SecurityContactProperties object itself. */ - public SecurityContactProperties withNotificationsByRole( - SecurityContactPropertiesNotificationsByRole notificationsByRole) { + public SecurityContactProperties + withNotificationsByRole(SecurityContactPropertiesNotificationsByRole notificationsByRole) { this.notificationsByRole = notificationsByRole; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (alertNotifications() != null) { - alertNotifications().validate(); + if (notificationsSources() != null) { + notificationsSources().forEach(e -> e.validate()); } if (notificationsByRole() != null) { notificationsByRole().validate(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorInner.java index 74c332b17887..f879cf9eb6b7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.models.Identity; import com.fasterxml.jackson.annotation.JsonProperty; -/** Security operator under a given subscription and pricing. */ +/** + * Security operator under a given subscription and pricing. + */ @Fluent public final class SecurityOperatorInner extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class SecurityOperatorInner extends ProxyResource { @JsonProperty(value = "identity") private Identity identity; - /** Creates an instance of SecurityOperatorInner class. */ + /** + * Creates an instance of SecurityOperatorInner class. + */ public SecurityOperatorInner() { } /** * Get the identity property: Identity for the resource. - * + * * @return the identity value. */ public Identity identity() { @@ -33,7 +37,7 @@ public Identity identity() { /** * Set the identity property: Identity for the resource. - * + * * @param identity the identity value to set. * @return the SecurityOperatorInner object itself. */ @@ -44,7 +48,7 @@ public SecurityOperatorInner withIdentity(Identity identity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorListInner.java index de1c00d24b3b..196d2f65dfd1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorListInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorListInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of SecurityOperator response. */ +/** + * List of SecurityOperator response. + */ @Fluent public final class SecurityOperatorListInner { /* @@ -18,13 +20,15 @@ public final class SecurityOperatorListInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of SecurityOperatorListInner class. */ + /** + * Creates an instance of SecurityOperatorListInner class. + */ public SecurityOperatorListInner() { } /** * Get the value property: List of SecurityOperator configurations. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: List of SecurityOperator configurations. - * + * * @param value the value value to set. * @return the SecurityOperatorListInner object itself. */ @@ -44,14 +48,13 @@ public SecurityOperatorListInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SecurityOperatorListInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model SecurityOperatorListInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionInner.java index 8428e621636d..062b8b0c2c1b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.security.models.SecurityFamily; import com.fasterxml.jackson.annotation.JsonProperty; -/** The SecuritySolution model. */ +/** + * The SecuritySolution model. + */ @Fluent public final class SecuritySolutionInner extends ProxyResource { /* @@ -25,13 +27,15 @@ public final class SecuritySolutionInner extends ProxyResource { @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; - /** Creates an instance of SecuritySolutionInner class. */ + /** + * Creates an instance of SecuritySolutionInner class. + */ public SecuritySolutionInner() { } /** * Get the innerProperties property: The properties property. - * + * * @return the innerProperties value. */ private SecuritySolutionProperties innerProperties() { @@ -40,7 +44,7 @@ private SecuritySolutionProperties innerProperties() { /** * Get the location property: Location where the resource is stored. - * + * * @return the location value. */ public String location() { @@ -49,7 +53,7 @@ public String location() { /** * Get the securityFamily property: The security family of the security solution. - * + * * @return the securityFamily value. */ public SecurityFamily securityFamily() { @@ -58,7 +62,7 @@ public SecurityFamily securityFamily() { /** * Set the securityFamily property: The security family of the security solution. - * + * * @param securityFamily the securityFamily value to set. * @return the SecuritySolutionInner object itself. */ @@ -72,7 +76,7 @@ public SecuritySolutionInner withSecurityFamily(SecurityFamily securityFamily) { /** * Get the provisioningState property: The security family provisioning State. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -81,7 +85,7 @@ public ProvisioningState provisioningState() { /** * Set the provisioningState property: The security family provisioning State. - * + * * @param provisioningState the provisioningState value to set. * @return the SecuritySolutionInner object itself. */ @@ -95,7 +99,7 @@ public SecuritySolutionInner withProvisioningState(ProvisioningState provisionin /** * Get the template property: The security solutions' template. - * + * * @return the template value. */ public String template() { @@ -104,7 +108,7 @@ public String template() { /** * Set the template property: The security solutions' template. - * + * * @param template the template value to set. * @return the SecuritySolutionInner object itself. */ @@ -118,7 +122,7 @@ public SecuritySolutionInner withTemplate(String template) { /** * Get the protectionStatus property: The security solutions' status. - * + * * @return the protectionStatus value. */ public String protectionStatus() { @@ -127,7 +131,7 @@ public String protectionStatus() { /** * Set the protectionStatus property: The security solutions' status. - * + * * @param protectionStatus the protectionStatus value to set. * @return the SecuritySolutionInner object itself. */ @@ -141,7 +145,7 @@ public SecuritySolutionInner withProtectionStatus(String protectionStatus) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionProperties.java index bc67143e9d6f..6ade9eea2f7d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.security.models.SecurityFamily; import com.fasterxml.jackson.annotation.JsonProperty; -/** The SecuritySolutionProperties model. */ +/** + * The SecuritySolutionProperties model. + */ @Fluent public final class SecuritySolutionProperties { /* @@ -37,13 +39,15 @@ public final class SecuritySolutionProperties { @JsonProperty(value = "protectionStatus", required = true) private String protectionStatus; - /** Creates an instance of SecuritySolutionProperties class. */ + /** + * Creates an instance of SecuritySolutionProperties class. + */ public SecuritySolutionProperties() { } /** * Get the securityFamily property: The security family of the security solution. - * + * * @return the securityFamily value. */ public SecurityFamily securityFamily() { @@ -52,7 +56,7 @@ public SecurityFamily securityFamily() { /** * Set the securityFamily property: The security family of the security solution. - * + * * @param securityFamily the securityFamily value to set. * @return the SecuritySolutionProperties object itself. */ @@ -63,7 +67,7 @@ public SecuritySolutionProperties withSecurityFamily(SecurityFamily securityFami /** * Get the provisioningState property: The security family provisioning State. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -72,7 +76,7 @@ public ProvisioningState provisioningState() { /** * Set the provisioningState property: The security family provisioning State. - * + * * @param provisioningState the provisioningState value to set. * @return the SecuritySolutionProperties object itself. */ @@ -83,7 +87,7 @@ public SecuritySolutionProperties withProvisioningState(ProvisioningState provis /** * Get the template property: The security solutions' template. - * + * * @return the template value. */ public String template() { @@ -92,7 +96,7 @@ public String template() { /** * Set the template property: The security solutions' template. - * + * * @param template the template value to set. * @return the SecuritySolutionProperties object itself. */ @@ -103,7 +107,7 @@ public SecuritySolutionProperties withTemplate(String template) { /** * Get the protectionStatus property: The security solutions' status. - * + * * @return the protectionStatus value. */ public String protectionStatus() { @@ -112,7 +116,7 @@ public String protectionStatus() { /** * Set the protectionStatus property: The security solutions' status. - * + * * @param protectionStatus the protectionStatus value to set. * @return the SecuritySolutionProperties object itself. */ @@ -123,33 +127,25 @@ public SecuritySolutionProperties withProtectionStatus(String protectionStatus) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (securityFamily() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property securityFamily in model SecuritySolutionProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property securityFamily in model SecuritySolutionProperties")); } if (provisioningState() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property provisioningState in model SecuritySolutionProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property provisioningState in model SecuritySolutionProperties")); } if (template() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property template in model SecuritySolutionProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property template in model SecuritySolutionProperties")); } if (protectionStatus() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property protectionStatus in model SecuritySolutionProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property protectionStatus in model SecuritySolutionProperties")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionsReferenceDataListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionsReferenceDataListInner.java index be2aebaf7be4..812ad1b2dbce 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionsReferenceDataListInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecuritySolutionsReferenceDataListInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The SecuritySolutionsReferenceDataList model. */ +/** + * The SecuritySolutionsReferenceDataList model. + */ @Fluent public final class SecuritySolutionsReferenceDataListInner { /* @@ -18,13 +20,15 @@ public final class SecuritySolutionsReferenceDataListInner { @JsonProperty(value = "value") private List value; - /** Creates an instance of SecuritySolutionsReferenceDataListInner class. */ + /** + * Creates an instance of SecuritySolutionsReferenceDataListInner class. + */ public SecuritySolutionsReferenceDataListInner() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the SecuritySolutionsReferenceDataListInner object itself. */ @@ -44,7 +48,7 @@ public SecuritySolutionsReferenceDataListInner withValue(List value; - /** Creates an instance of ServerVulnerabilityAssessmentsListInner class. */ + /** + * Creates an instance of ServerVulnerabilityAssessmentsListInner class. + */ public ServerVulnerabilityAssessmentsListInner() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -32,7 +36,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the ServerVulnerabilityAssessmentsListInner object itself. */ @@ -43,7 +47,7 @@ public ServerVulnerabilityAssessmentsListInner withValue(List topologyResources() { @@ -68,7 +72,7 @@ public List topologyResources() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/TopologyResourceProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/TopologyResourceProperties.java index daa7e08a0025..f224815c4710 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/TopologyResourceProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/TopologyResourceProperties.java @@ -10,7 +10,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** The TopologyResourceProperties model. */ +/** + * The TopologyResourceProperties model. + */ @Immutable public final class TopologyResourceProperties { /* @@ -25,13 +27,15 @@ public final class TopologyResourceProperties { @JsonProperty(value = "topologyResources", access = JsonProperty.Access.WRITE_ONLY) private List topologyResources; - /** Creates an instance of TopologyResourceProperties class. */ + /** + * Creates an instance of TopologyResourceProperties class. + */ public TopologyResourceProperties() { } /** * Get the calculatedDateTime property: The UTC time on which the topology was calculated. - * + * * @return the calculatedDateTime value. */ public OffsetDateTime calculatedDateTime() { @@ -40,7 +44,7 @@ public OffsetDateTime calculatedDateTime() { /** * Get the topologyResources property: Azure resources which are part of this topology resource. - * + * * @return the topologyResources value. */ public List topologyResources() { @@ -49,7 +53,7 @@ public List topologyResources() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/UpdateIoTSecuritySolutionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/UpdateIoTSecuritySolutionProperties.java index f2bf349d65c3..f8585aed96b8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/UpdateIoTSecuritySolutionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/UpdateIoTSecuritySolutionProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Update Security Solution setting data. */ +/** + * Update Security Solution setting data. + */ @Fluent public final class UpdateIoTSecuritySolutionProperties { /* @@ -25,13 +27,15 @@ public final class UpdateIoTSecuritySolutionProperties { @JsonProperty(value = "recommendationsConfiguration") private List recommendationsConfiguration; - /** Creates an instance of UpdateIoTSecuritySolutionProperties class. */ + /** + * Creates an instance of UpdateIoTSecuritySolutionProperties class. + */ public UpdateIoTSecuritySolutionProperties() { } /** * Get the userDefinedResources property: Properties of the IoT Security solution's user defined resources. - * + * * @return the userDefinedResources value. */ public UserDefinedResourcesProperties userDefinedResources() { @@ -40,19 +44,19 @@ public UserDefinedResourcesProperties userDefinedResources() { /** * Set the userDefinedResources property: Properties of the IoT Security solution's user defined resources. - * + * * @param userDefinedResources the userDefinedResources value to set. * @return the UpdateIoTSecuritySolutionProperties object itself. */ - public UpdateIoTSecuritySolutionProperties withUserDefinedResources( - UserDefinedResourcesProperties userDefinedResources) { + public UpdateIoTSecuritySolutionProperties + withUserDefinedResources(UserDefinedResourcesProperties userDefinedResources) { this.userDefinedResources = userDefinedResources; return this; } /** * Get the recommendationsConfiguration property: List of the configuration status for each recommendation type. - * + * * @return the recommendationsConfiguration value. */ public List recommendationsConfiguration() { @@ -61,19 +65,19 @@ public List recommendationsConfiguration( /** * Set the recommendationsConfiguration property: List of the configuration status for each recommendation type. - * + * * @param recommendationsConfiguration the recommendationsConfiguration value to set. * @return the UpdateIoTSecuritySolutionProperties object itself. */ - public UpdateIoTSecuritySolutionProperties withRecommendationsConfiguration( - List recommendationsConfiguration) { + public UpdateIoTSecuritySolutionProperties + withRecommendationsConfiguration(List recommendationsConfiguration) { this.recommendationsConfiguration = recommendationsConfiguration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingInner.java index d6be77efcba1..cc8dd71e1fbd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingInner.java @@ -8,7 +8,9 @@ import com.azure.core.management.ProxyResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configures where to store the OMS agent data for workspaces under a scope. */ +/** + * Configures where to store the OMS agent data for workspaces under a scope. + */ @Fluent public final class WorkspaceSettingInner extends ProxyResource { /* @@ -17,13 +19,15 @@ public final class WorkspaceSettingInner extends ProxyResource { @JsonProperty(value = "properties") private WorkspaceSettingProperties innerProperties; - /** Creates an instance of WorkspaceSettingInner class. */ + /** + * Creates an instance of WorkspaceSettingInner class. + */ public WorkspaceSettingInner() { } /** * Get the innerProperties property: Workspace setting data. - * + * * @return the innerProperties value. */ private WorkspaceSettingProperties innerProperties() { @@ -32,7 +36,7 @@ private WorkspaceSettingProperties innerProperties() { /** * Get the workspaceId property: The full Azure ID of the workspace to save the data in. - * + * * @return the workspaceId value. */ public String workspaceId() { @@ -41,7 +45,7 @@ public String workspaceId() { /** * Set the workspaceId property: The full Azure ID of the workspace to save the data in. - * + * * @param workspaceId the workspaceId value to set. * @return the WorkspaceSettingInner object itself. */ @@ -54,9 +58,9 @@ public WorkspaceSettingInner withWorkspaceId(String workspaceId) { } /** - * Get the scope property: All the VMs in this scope will send their security data to the mentioned workspace unless - * overridden by a setting with more specific scope. - * + * Get the scope property: All the VMs in this scope will send their security data to the mentioned workspace + * unless overridden by a setting with more specific scope. + * * @return the scope value. */ public String scope() { @@ -64,9 +68,9 @@ public String scope() { } /** - * Set the scope property: All the VMs in this scope will send their security data to the mentioned workspace unless - * overridden by a setting with more specific scope. - * + * Set the scope property: All the VMs in this scope will send their security data to the mentioned workspace + * unless overridden by a setting with more specific scope. + * * @param scope the scope value to set. * @return the WorkspaceSettingInner object itself. */ @@ -80,7 +84,7 @@ public WorkspaceSettingInner withScope(String scope) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingProperties.java index 4b9e5b362af5..3a142a2ce6fe 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/WorkspaceSettingProperties.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Workspace setting data. */ +/** + * Workspace setting data. + */ @Fluent public final class WorkspaceSettingProperties { /* @@ -24,13 +26,15 @@ public final class WorkspaceSettingProperties { @JsonProperty(value = "scope", required = true) private String scope; - /** Creates an instance of WorkspaceSettingProperties class. */ + /** + * Creates an instance of WorkspaceSettingProperties class. + */ public WorkspaceSettingProperties() { } /** * Get the workspaceId property: The full Azure ID of the workspace to save the data in. - * + * * @return the workspaceId value. */ public String workspaceId() { @@ -39,7 +43,7 @@ public String workspaceId() { /** * Set the workspaceId property: The full Azure ID of the workspace to save the data in. - * + * * @param workspaceId the workspaceId value to set. * @return the WorkspaceSettingProperties object itself. */ @@ -49,9 +53,9 @@ public WorkspaceSettingProperties withWorkspaceId(String workspaceId) { } /** - * Get the scope property: All the VMs in this scope will send their security data to the mentioned workspace unless - * overridden by a setting with more specific scope. - * + * Get the scope property: All the VMs in this scope will send their security data to the mentioned workspace + * unless overridden by a setting with more specific scope. + * * @return the scope value. */ public String scope() { @@ -59,9 +63,9 @@ public String scope() { } /** - * Set the scope property: All the VMs in this scope will send their security data to the mentioned workspace unless - * overridden by a setting with more specific scope. - * + * Set the scope property: All the VMs in this scope will send their security data to the mentioned workspace + * unless overridden by a setting with more specific scope. + * * @param scope the scope value to set. * @return the WorkspaceSettingProperties object itself. */ @@ -72,21 +76,17 @@ public WorkspaceSettingProperties withScope(String scope) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (workspaceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property workspaceId in model WorkspaceSettingProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property workspaceId in model WorkspaceSettingProperties")); } if (scope() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property scope in model WorkspaceSettingProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property scope in model WorkspaceSettingProperties")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/package-info.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/package-info.java index c572ad42092c..f1e5e652b0f2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/package-info.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for SecurityCenter. API spec for Microsoft.Security (Azure Security Center) - * resource provider. + * Package containing the inner data models for SecurityCenter. + * API spec for Microsoft.Security (Azure Security Center) resource provider. */ package com.azure.resourcemanager.security.fluent.models; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/package-info.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/package-info.java index e13426491bd0..3de5e2298809 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/package-info.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for SecurityCenter. API spec for Microsoft.Security (Azure Security Center) - * resource provider. + * Package containing the service clients for SecurityCenter. + * API spec for Microsoft.Security (Azure Security Center) resource provider. */ package com.azure.resourcemanager.security.fluent; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupImpl.java index dac890dface4..d3f0626e89a5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupImpl.java @@ -19,10 +19,8 @@ import java.util.Collections; import java.util.List; -public final class AdaptiveApplicationControlGroupImpl - implements AdaptiveApplicationControlGroup, - AdaptiveApplicationControlGroup.Definition, - AdaptiveApplicationControlGroup.Update { +public final class AdaptiveApplicationControlGroupImpl implements AdaptiveApplicationControlGroup, + AdaptiveApplicationControlGroup.Definition, AdaptiveApplicationControlGroup.Update { private AdaptiveApplicationControlGroupInner innerObject; private final com.azure.resourcemanager.security.SecurityManager serviceManager; @@ -116,27 +114,19 @@ public AdaptiveApplicationControlGroupImpl withExistingLocation(String ascLocati } public AdaptiveApplicationControlGroup create() { - this.innerObject = - serviceManager - .serviceClient() - .getAdaptiveApplicationControls() - .putWithResponse(ascLocation, groupName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdaptiveApplicationControls() + .putWithResponse(ascLocation, groupName, this.innerModel(), Context.NONE).getValue(); return this; } public AdaptiveApplicationControlGroup create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAdaptiveApplicationControls() - .putWithResponse(ascLocation, groupName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdaptiveApplicationControls() + .putWithResponse(ascLocation, groupName, this.innerModel(), context).getValue(); return this; } - AdaptiveApplicationControlGroupImpl( - String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + AdaptiveApplicationControlGroupImpl(String name, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = new AdaptiveApplicationControlGroupInner(); this.serviceManager = serviceManager; this.groupName = name; @@ -147,51 +137,34 @@ public AdaptiveApplicationControlGroupImpl update() { } public AdaptiveApplicationControlGroup apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAdaptiveApplicationControls() - .putWithResponse(ascLocation, groupName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdaptiveApplicationControls() + .putWithResponse(ascLocation, groupName, this.innerModel(), Context.NONE).getValue(); return this; } public AdaptiveApplicationControlGroup apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAdaptiveApplicationControls() - .putWithResponse(ascLocation, groupName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdaptiveApplicationControls() + .putWithResponse(ascLocation, groupName, this.innerModel(), context).getValue(); return this; } - AdaptiveApplicationControlGroupImpl( - AdaptiveApplicationControlGroupInner innerObject, + AdaptiveApplicationControlGroupImpl(AdaptiveApplicationControlGroupInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.ascLocation = Utils.getValueFromIdByName(innerObject.id(), "locations"); - this.groupName = Utils.getValueFromIdByName(innerObject.id(), "applicationWhitelistings"); + this.ascLocation = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "locations"); + this.groupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applicationWhitelistings"); } public AdaptiveApplicationControlGroup refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAdaptiveApplicationControls() - .getWithResponse(ascLocation, groupName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdaptiveApplicationControls() + .getWithResponse(ascLocation, groupName, Context.NONE).getValue(); return this; } public AdaptiveApplicationControlGroup refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAdaptiveApplicationControls() - .getWithResponse(ascLocation, groupName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdaptiveApplicationControls() + .getWithResponse(ascLocation, groupName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupsImpl.java index ed7a53c75298..346368a85781 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlGroupsImpl.java @@ -17,8 +17,7 @@ public final class AdaptiveApplicationControlGroupsImpl implements AdaptiveAppli private final com.azure.resourcemanager.security.SecurityManager serviceManager; - AdaptiveApplicationControlGroupsImpl( - AdaptiveApplicationControlGroupsInner innerObject, + AdaptiveApplicationControlGroupsImpl(AdaptiveApplicationControlGroupsInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,12 +26,9 @@ public final class AdaptiveApplicationControlGroupsImpl implements AdaptiveAppli public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AdaptiveApplicationControlGroupImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new AdaptiveApplicationControlGroupImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsClientImpl.java index f5377cd34583..fd7da17576c0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsClientImpl.java @@ -29,24 +29,28 @@ import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupsInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AdaptiveApplicationControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in AdaptiveApplicationControlsClient. + */ public final class AdaptiveApplicationControlsClientImpl implements AdaptiveApplicationControlsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AdaptiveApplicationControlsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AdaptiveApplicationControlsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AdaptiveApplicationControlsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - AdaptiveApplicationControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AdaptiveApplicationControlsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,109 +61,77 @@ public final class AdaptiveApplicationControlsClientImpl implements AdaptiveAppl @Host("{$host}") @ServiceInterface(name = "SecurityCenterAdapti") public interface AdaptiveApplicationControlsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @QueryParam("includePathRecommendations") Boolean includePathRecommendations, - @QueryParam("summary") Boolean summary, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("summary") Boolean summary, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("groupName") String groupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @PathParam("groupName") String groupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("groupName") String groupName, - @QueryParam("api-version") String apiVersion, + Mono> put(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @PathParam("groupName") String groupName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AdaptiveApplicationControlGroupInner body, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("groupName") String groupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @PathParam("groupName") String groupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of application control machine groups for the subscription. - * + * * @param includePathRecommendations Include the policy rules. * @param summary Return output in a summarized form. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of application control machine groups for the subscription along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - Boolean includePathRecommendations, Boolean summary) { + private Mono> + listWithResponseAsync(Boolean includePathRecommendations, Boolean summary) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - apiVersion, - includePathRecommendations, - summary, - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + includePathRecommendations, summary, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of application control machine groups for the subscription. - * + * * @param includePathRecommendations Include the policy rules. * @param summary Return output in a summarized form. * @param context The context to associate with this operation. @@ -167,44 +139,33 @@ private Mono> listWithResponseAs * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of application control machine groups for the subscription along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - Boolean includePathRecommendations, Boolean summary, Context context) { + private Mono> + listWithResponseAsync(Boolean includePathRecommendations, Boolean summary, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - apiVersion, - includePathRecommendations, - summary, - accept, - context); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + includePathRecommendations, summary, accept, context); } /** * Gets a list of application control machine groups for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of application control machine groups for the subscription on successful completion of {@link - * Mono}. + * @return a list of application control machine groups for the subscription on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync() { @@ -216,7 +177,7 @@ private Mono listAsync() { /** * Gets a list of application control machine groups for the subscription. - * + * * @param includePathRecommendations Include the policy rules. * @param summary Return output in a summarized form. * @param context The context to associate with this operation. @@ -226,14 +187,14 @@ private Mono listAsync() { * @return a list of application control machine groups for the subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - Boolean includePathRecommendations, Boolean summary, Context context) { + public Response listWithResponse(Boolean includePathRecommendations, + Boolean summary, Context context) { return listWithResponseAsync(includePathRecommendations, summary, context).block(); } /** * Gets a list of application control machine groups for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of application control machine groups for the subscription. @@ -247,30 +208,26 @@ public AdaptiveApplicationControlGroupsInner list() { /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application control VM/server group along with {@link Response} on successful completion of {@link - * Mono}. + * @return an application control VM/server group along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String ascLocation, String groupName) { + private Mono> getWithResponseAsync(String ascLocation, + String groupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -281,47 +238,34 @@ private Mono> getWithResponseAsyn final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - groupName, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, + groupName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application control VM/server group along with {@link Response} on successful completion of {@link - * Mono}. + * @return an application control VM/server group along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String ascLocation, String groupName, Context context) { + private Mono> getWithResponseAsync(String ascLocation, + String groupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -332,22 +276,15 @@ private Mono> getWithResponseAsyn final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - groupName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, groupName, + apiVersion, accept, context); } /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -361,9 +298,9 @@ private Mono getAsync(String ascLocation, /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -372,16 +309,16 @@ private Mono getAsync(String ascLocation, * @return an application control VM/server group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String ascLocation, String groupName, Context context) { + public Response getWithResponse(String ascLocation, String groupName, + Context context) { return getWithResponseAsync(ascLocation, groupName, context).block(); } /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -395,9 +332,9 @@ public AdaptiveApplicationControlGroupInner get(String ascLocation, String group /** * Update an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -406,19 +343,15 @@ public AdaptiveApplicationControlGroupInner get(String ascLocation, String group * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( - String ascLocation, String groupName, AdaptiveApplicationControlGroupInner body) { + private Mono> putWithResponseAsync(String ascLocation, + String groupName, AdaptiveApplicationControlGroupInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -434,26 +367,16 @@ private Mono> putWithResponseAsyn final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .put( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - groupName, - apiVersion, - body, - accept, - context)) + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, + groupName, apiVersion, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param body The body parameter. * @param context The context to associate with this operation. @@ -463,19 +386,15 @@ private Mono> putWithResponseAsyn * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( - String ascLocation, String groupName, AdaptiveApplicationControlGroupInner body, Context context) { + private Mono> putWithResponseAsync(String ascLocation, + String groupName, AdaptiveApplicationControlGroupInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -491,23 +410,15 @@ private Mono> putWithResponseAsyn final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .put( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - groupName, - apiVersion, - body, - accept, - context); + return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, groupName, + apiVersion, body, accept, context); } /** * Update an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -516,16 +427,16 @@ private Mono> putWithResponseAsyn * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync( - String ascLocation, String groupName, AdaptiveApplicationControlGroupInner body) { + private Mono putAsync(String ascLocation, String groupName, + AdaptiveApplicationControlGroupInner body) { return putWithResponseAsync(ascLocation, groupName, body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Update an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param body The body parameter. * @param context The context to associate with this operation. @@ -535,16 +446,16 @@ private Mono putAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( - String ascLocation, String groupName, AdaptiveApplicationControlGroupInner body, Context context) { + public Response putWithResponse(String ascLocation, String groupName, + AdaptiveApplicationControlGroupInner body, Context context) { return putWithResponseAsync(ascLocation, groupName, body, context).block(); } /** * Update an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -553,16 +464,16 @@ public Response putWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdaptiveApplicationControlGroupInner put( - String ascLocation, String groupName, AdaptiveApplicationControlGroupInner body) { + public AdaptiveApplicationControlGroupInner put(String ascLocation, String groupName, + AdaptiveApplicationControlGroupInner body) { return putWithResponse(ascLocation, groupName, body, Context.NONE).getValue(); } /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -572,16 +483,12 @@ public AdaptiveApplicationControlGroupInner put( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String ascLocation, String groupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -592,25 +499,16 @@ private Mono> deleteWithResponseAsync(String ascLocation, String final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - groupName, - apiVersion, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + ascLocation, groupName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -621,16 +519,12 @@ private Mono> deleteWithResponseAsync(String ascLocation, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String ascLocation, String groupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -641,22 +535,15 @@ private Mono> deleteWithResponseAsync(String ascLocation, String final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - groupName, - apiVersion, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, groupName, + apiVersion, accept, context); } /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -670,9 +557,9 @@ private Mono deleteAsync(String ascLocation, String groupName) { /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -687,9 +574,9 @@ public Response deleteWithResponse(String ascLocation, String groupName, C /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsImpl.java index df7f0426fc39..624149443b06 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveApplicationControlsImpl.java @@ -22,22 +22,18 @@ public final class AdaptiveApplicationControlsImpl implements AdaptiveApplicatio private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AdaptiveApplicationControlsImpl( - AdaptiveApplicationControlsClient innerClient, + public AdaptiveApplicationControlsImpl(AdaptiveApplicationControlsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response listWithResponse( - Boolean includePathRecommendations, Boolean summary, Context context) { - Response inner = - this.serviceClient().listWithResponse(includePathRecommendations, summary, context); + public Response listWithResponse(Boolean includePathRecommendations, + Boolean summary, Context context) { + Response inner + = this.serviceClient().listWithResponse(includePathRecommendations, summary, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AdaptiveApplicationControlGroupsImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,15 +49,12 @@ public AdaptiveApplicationControlGroups list() { } } - public Response getWithResponse( - String ascLocation, String groupName, Context context) { - Response inner = - this.serviceClient().getWithResponse(ascLocation, groupName, context); + public Response getWithResponse(String ascLocation, String groupName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(ascLocation, groupName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AdaptiveApplicationControlGroupImpl(inner.getValue(), this.manager())); } else { return null; @@ -86,85 +79,57 @@ public void deleteByResourceGroup(String ascLocation, String groupName) { } public AdaptiveApplicationControlGroup getById(String id) { - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String groupName = Utils.getValueFromIdByName(id, "applicationWhitelistings"); + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationWhitelistings"); if (groupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", id))); } return this.getWithResponse(ascLocation, groupName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String groupName = Utils.getValueFromIdByName(id, "applicationWhitelistings"); + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationWhitelistings"); if (groupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", id))); } return this.getWithResponse(ascLocation, groupName, context); } public void deleteById(String id) { - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String groupName = Utils.getValueFromIdByName(id, "applicationWhitelistings"); + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationWhitelistings"); if (groupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", id))); } this.deleteByResourceGroupWithResponse(ascLocation, groupName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String groupName = Utils.getValueFromIdByName(id, "applicationWhitelistings"); + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationWhitelistings"); if (groupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'applicationWhitelistings'.", id))); } return this.deleteByResourceGroupWithResponse(ascLocation, groupName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningImpl.java index c07af0ebfddc..b2b9dd401a10 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningImpl.java @@ -17,8 +17,8 @@ public final class AdaptiveNetworkHardeningImpl implements AdaptiveNetworkHarden private final com.azure.resourcemanager.security.SecurityManager serviceManager; - AdaptiveNetworkHardeningImpl( - AdaptiveNetworkHardeningInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + AdaptiveNetworkHardeningImpl(AdaptiveNetworkHardeningInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsClientImpl.java index 923dc53de886..0379942ede44 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AdaptiveNetworkHardeningsClient. */ +/** + * An instance of this class provides access to all the operations defined in AdaptiveNetworkHardeningsClient. + */ public final class AdaptiveNetworkHardeningsClientImpl implements AdaptiveNetworkHardeningsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AdaptiveNetworkHardeningsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AdaptiveNetworkHardeningsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AdaptiveNetworkHardeningsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - AdaptiveNetworkHardeningsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AdaptiveNetworkHardeningsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,97 +70,77 @@ public final class AdaptiveNetworkHardeningsClientImpl implements AdaptiveNetwor @Host("{$host}") @ServiceInterface(name = "SecurityCenterAdapti") public interface AdaptiveNetworkHardeningsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByExtendedResource( - @HostParam("$host") String endpoint, + Mono> listByExtendedResource(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, + @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, @PathParam("resourceName") String resourceName, @PathParam("adaptiveNetworkHardeningResourceName") String adaptiveNetworkHardeningResourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}/{adaptiveNetworkHardeningEnforceAction}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}/{adaptiveNetworkHardeningEnforceAction}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> enforce( - @HostParam("$host") String endpoint, + Mono>> enforce(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, @PathParam("resourceName") String resourceName, @PathParam("adaptiveNetworkHardeningResourceName") String adaptiveNetworkHardeningResourceName, @PathParam("adaptiveNetworkHardeningEnforceAction") String adaptiveNetworkHardeningEnforceAction, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AdaptiveNetworkHardeningEnforceRequest body, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByExtendedResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Adaptive Network Hardenings resources in scope of an extended resource along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of Adaptive Network Hardenings resources in scope of an extended resource along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByExtendedResourceSinglePageAsync( String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -176,35 +160,18 @@ private Mono> listByExtendedResourc final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByExtendedResource( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByExtendedResource(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -212,23 +179,19 @@ private Mono> listByExtendedResourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Adaptive Network Hardenings resources in scope of an extended resource along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of Adaptive Network Hardenings resources in scope of an extended resource along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByExtendedResourceSinglePageAsync( String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -248,32 +211,17 @@ private Mono> listByExtendedResourc final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByExtendedResource( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByExtendedResource(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -281,22 +229,20 @@ private Mono> listByExtendedResourc * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByExtendedResourceAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - return new PagedFlux<>( - () -> - listByExtendedResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName), - nextLink -> listByExtendedResourceNextSinglePageAsync(nextLink)); + private PagedFlux listByExtendedResourceAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { + return new PagedFlux<>(() -> listByExtendedResourceSinglePageAsync(resourceGroupName, resourceNamespace, + resourceType, resourceName), nextLink -> listByExtendedResourceNextSinglePageAsync(nextLink)); } /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -305,23 +251,21 @@ private PagedFlux listByExtendedResourceAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByExtendedResourceAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - return new PagedFlux<>( - () -> - listByExtendedResourceSinglePageAsync( - resourceGroupName, resourceNamespace, resourceType, resourceName, context), + private PagedFlux listByExtendedResourceAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { + return new PagedFlux<>(() -> listByExtendedResourceSinglePageAsync(resourceGroupName, resourceNamespace, + resourceType, resourceName, context), nextLink -> listByExtendedResourceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -329,20 +273,20 @@ private PagedFlux listByExtendedResourceAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + public PagedIterable listByExtendedResource(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { return new PagedIterable<>( listByExtendedResourceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName)); } /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -351,20 +295,20 @@ public PagedIterable listByExtendedResource( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + public PagedIterable listByExtendedResource(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { return new PagedIterable<>( listByExtendedResourceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context)); } /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -373,26 +317,19 @@ public PagedIterable listByExtendedResource( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single Adaptive Network Hardening resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -409,36 +346,23 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } if (adaptiveNetworkHardeningResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -448,27 +372,19 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single Adaptive Network Hardening resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -485,33 +401,22 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } if (adaptiveNetworkHardeningResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, apiVersion, accept, + context); } /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -522,22 +427,17 @@ private Mono> getWithResponseAsync( * @return a single Adaptive Network Hardening resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName) { - return getWithResponseAsync( - resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName) { + return getWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -549,28 +449,17 @@ private Mono getAsync( * @return a single Adaptive Network Hardening resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - Context context) { - return getWithResponseAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - context) - .block(); + public Response getWithResponse(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, context).block(); } /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -581,27 +470,17 @@ public Response getWithResponse( * @return a single Adaptive Network Hardening resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdaptiveNetworkHardeningInner get( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName) { - return getWithResponse( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - Context.NONE) - .getValue(); + public AdaptiveNetworkHardeningInner get(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String adaptiveNetworkHardeningResourceName) { + return getWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, Context.NONE).getValue(); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -613,24 +492,16 @@ public AdaptiveNetworkHardeningInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> enforceWithResponseAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, + private Mono>> enforceWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -647,10 +518,8 @@ private Mono>> enforceWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } if (adaptiveNetworkHardeningResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); } if (body == null) { return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); @@ -661,30 +530,17 @@ private Mono>> enforceWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .enforce( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - adaptiveNetworkHardeningEnforceAction, - apiVersion, - body, - accept, - context)) + .withContext(context -> service.enforce(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, + adaptiveNetworkHardeningEnforceAction, apiVersion, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -697,25 +553,16 @@ private Mono>> enforceWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> enforceWithResponseAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context) { + private Mono>> enforceWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, + AdaptiveNetworkHardeningEnforceRequest body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -732,10 +579,8 @@ private Mono>> enforceWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } if (adaptiveNetworkHardeningResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter adaptiveNetworkHardeningResourceName is required and cannot be null.")); } if (body == null) { return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); @@ -746,27 +591,16 @@ private Mono>> enforceWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .enforce( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - adaptiveNetworkHardeningEnforceAction, - apiVersion, - body, - accept, - context); + return service.enforce(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, + adaptiveNetworkHardeningEnforceAction, apiVersion, body, accept, context); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -778,32 +612,20 @@ private Mono>> enforceWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginEnforceAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, + private PollerFlux, Void> beginEnforceAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body) { - Mono>> mono = - enforceWithResponseAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono = enforceWithResponseAsync(resourceGroupName, resourceNamespace, + resourceType, resourceName, adaptiveNetworkHardeningResourceName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -816,34 +638,21 @@ private PollerFlux, Void> beginEnforceAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginEnforceAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context) { + private PollerFlux, Void> beginEnforceAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, + AdaptiveNetworkHardeningEnforceRequest body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - enforceWithResponseAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body, - context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = enforceWithResponseAsync(resourceGroupName, resourceNamespace, + resourceType, resourceName, adaptiveNetworkHardeningResourceName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -855,29 +664,18 @@ private PollerFlux, Void> beginEnforceAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginEnforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, + public SyncPoller, Void> beginEnforce(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body) { - return this - .beginEnforceAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body) - .getSyncPoller(); + return this.beginEnforceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body).getSyncPoller(); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -890,31 +688,18 @@ public SyncPoller, Void> beginEnforce( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginEnforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context) { - return this - .beginEnforceAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body, - context) - .getSyncPoller(); + public SyncPoller, Void> beginEnforce(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, + AdaptiveNetworkHardeningEnforceRequest body, Context context) { + return this.beginEnforceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body, context).getSyncPoller(); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -926,29 +711,17 @@ public SyncPoller, Void> beginEnforce( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono enforceAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body) { - return beginEnforceAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono enforceAsync(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body) { + return beginEnforceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -961,31 +734,18 @@ private Mono enforceAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono enforceAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, + private Mono enforceAsync(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body, Context context) { - return beginEnforceAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body, - context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginEnforceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -996,28 +756,17 @@ private Mono enforceAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body) { - enforceAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body) - .block(); + public void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body) { + enforceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body).block(); } /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -1029,100 +778,70 @@ public void enforce( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context) { - enforceAsync( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body, - context) - .block(); + public void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body, Context context) { + enforceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response for ListAdaptiveNetworkHardenings API service call along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExtendedResourceNextSinglePageAsync( - String nextLink) { + private Mono> + listByExtendedResourceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByExtendedResourceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response for ListAdaptiveNetworkHardenings API service call along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExtendedResourceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByExtendedResourceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByExtendedResourceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByExtendedResourceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsImpl.java index afcb58db5f23..3d5efda8cf10 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdaptiveNetworkHardeningsImpl.java @@ -22,74 +22,42 @@ public final class AdaptiveNetworkHardeningsImpl implements AdaptiveNetworkHarde private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AdaptiveNetworkHardeningsImpl( - AdaptiveNetworkHardeningsClient innerClient, + public AdaptiveNetworkHardeningsImpl(AdaptiveNetworkHardeningsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - PagedIterable inner = - this - .serviceClient() - .listByExtendedResource(resourceGroupName, resourceNamespace, resourceType, resourceName); - return Utils.mapPage(inner, inner1 -> new AdaptiveNetworkHardeningImpl(inner1, this.manager())); + public PagedIterable listByExtendedResource(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { + PagedIterable inner = this.serviceClient() + .listByExtendedResource(resourceGroupName, resourceNamespace, resourceType, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AdaptiveNetworkHardeningImpl(inner1, this.manager())); } - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - PagedIterable inner = - this - .serviceClient() - .listByExtendedResource(resourceGroupName, resourceNamespace, resourceType, resourceName, context); - return Utils.mapPage(inner, inner1 -> new AdaptiveNetworkHardeningImpl(inner1, this.manager())); + public PagedIterable listByExtendedResource(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { + PagedIterable inner = this.serviceClient() + .listByExtendedResource(resourceGroupName, resourceNamespace, resourceType, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AdaptiveNetworkHardeningImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - context); + public Response getWithResponse(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AdaptiveNetworkHardeningImpl(inner.getValue(), this.manager())); } else { return null; } } - public AdaptiveNetworkHardening get( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName) { - AdaptiveNetworkHardeningInner inner = - this - .serviceClient() - .get( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName); + public AdaptiveNetworkHardening get(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String adaptiveNetworkHardeningResourceName) { + AdaptiveNetworkHardeningInner inner = this.serviceClient().get(resourceGroupName, resourceNamespace, + resourceType, resourceName, adaptiveNetworkHardeningResourceName); if (inner != null) { return new AdaptiveNetworkHardeningImpl(inner, this.manager()); } else { @@ -97,42 +65,16 @@ public AdaptiveNetworkHardening get( } } - public void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body) { - this - .serviceClient() - .enforce( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body); + public void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body) { + this.serviceClient().enforce(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body); } - public void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context) { - this - .serviceClient() - .enforce( - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - adaptiveNetworkHardeningResourceName, - body, - context); + public void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body, Context context) { + this.serviceClient().enforce(resourceGroupName, resourceNamespace, resourceType, resourceName, + adaptiveNetworkHardeningResourceName, body, context); } private AdaptiveNetworkHardeningsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionSettingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionSettingImpl.java index 42c6609f6803..320725dcb85b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionSettingImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionSettingImpl.java @@ -14,8 +14,7 @@ public final class AdvancedThreatProtectionSettingImpl private final com.azure.resourcemanager.security.SecurityManager serviceManager; - AdvancedThreatProtectionSettingImpl( - AdvancedThreatProtectionSettingInner innerObject, + AdvancedThreatProtectionSettingImpl(AdvancedThreatProtectionSettingInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -53,22 +52,14 @@ public AdvancedThreatProtectionSettingImpl withExistingResourceId(String resourc } public AdvancedThreatProtectionSetting create() { - this.innerObject = - serviceManager - .serviceClient() - .getAdvancedThreatProtections() - .createWithResponse(resourceId, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdvancedThreatProtections() + .createWithResponse(resourceId, this.innerModel(), Context.NONE).getValue(); return this; } public AdvancedThreatProtectionSetting create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAdvancedThreatProtections() - .createWithResponse(resourceId, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdvancedThreatProtections() + .createWithResponse(resourceId, this.innerModel(), context).getValue(); return this; } @@ -78,22 +69,14 @@ public AdvancedThreatProtectionSetting create(Context context) { } public AdvancedThreatProtectionSetting refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAdvancedThreatProtections() - .getWithResponse(resourceId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdvancedThreatProtections() + .getWithResponse(resourceId, Context.NONE).getValue(); return this; } public AdvancedThreatProtectionSetting refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAdvancedThreatProtections() - .getWithResponse(resourceId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAdvancedThreatProtections() + .getWithResponse(resourceId, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsClientImpl.java index 1efa34e343b0..d9251b4a7474 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsClientImpl.java @@ -27,24 +27,28 @@ import com.azure.resourcemanager.security.fluent.models.AdvancedThreatProtectionSettingInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AdvancedThreatProtectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionsClient. + */ public final class AdvancedThreatProtectionsClientImpl implements AdvancedThreatProtectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AdvancedThreatProtectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AdvancedThreatProtectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AdvancedThreatProtectionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - AdvancedThreatProtectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AdvancedThreatProtectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -55,49 +59,42 @@ public final class AdvancedThreatProtectionsClientImpl implements AdvancedThreat @Host("{$host}") @ServiceInterface(name = "SecurityCenterAdvanc") public interface AdvancedThreatProtectionsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("settingName") String settingName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("settingName") String settingName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, + Mono> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, @PathParam("settingName") String settingName, @BodyParam("application/json") AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Advanced Threat Protection settings for the specified resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -113,23 +110,21 @@ private Mono> getWithResponseAsyn /** * Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Advanced Threat Protection settings for the specified resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceId, Context context) { + private Mono> getWithResponseAsync(String resourceId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -143,13 +138,13 @@ private Mono> getWithResponseAsyn /** * Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Advanced Threat Protection settings for the specified resource on successful completion of {@link - * Mono}. + * @return the Advanced Threat Protection settings for the specified resource on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceId) { @@ -158,7 +153,7 @@ private Mono getAsync(String resourceId) { /** * Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,7 +168,7 @@ public Response getWithResponse(String res /** * Gets the Advanced Threat Protection settings for the specified resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -187,32 +182,28 @@ public AdvancedThreatProtectionSettingInner get(String resourceId) { /** * Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param resourceId The identifier of the resource. * @param advancedThreatProtectionSetting Advanced Threat Protection Settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Advanced Threat Protection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Advanced Threat Protection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceId, AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting) { + private Mono> createWithResponseAsync(String resourceId, + AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (advancedThreatProtectionSetting == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionSetting is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter advancedThreatProtectionSetting is required and cannot be null.")); } else { advancedThreatProtectionSetting.validate(); } @@ -220,49 +211,36 @@ private Mono> createWithResponseA final String settingName = "current"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - apiVersion, - resourceId, - settingName, - advancedThreatProtectionSetting, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, resourceId, settingName, + advancedThreatProtectionSetting, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param resourceId The identifier of the resource. * @param advancedThreatProtectionSetting Advanced Threat Protection Settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Advanced Threat Protection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Advanced Threat Protection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceId, AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting, Context context) { + private Mono> createWithResponseAsync(String resourceId, + AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (advancedThreatProtectionSetting == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionSetting is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter advancedThreatProtectionSetting is required and cannot be null.")); } else { advancedThreatProtectionSetting.validate(); } @@ -270,20 +248,13 @@ private Mono> createWithResponseA final String settingName = "current"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - apiVersion, - resourceId, - settingName, - advancedThreatProtectionSetting, - accept, - context); + return service.create(this.client.getEndpoint(), apiVersion, resourceId, settingName, + advancedThreatProtectionSetting, accept, context); } /** * Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param resourceId The identifier of the resource. * @param advancedThreatProtectionSetting Advanced Threat Protection Settings. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -292,15 +263,15 @@ private Mono> createWithResponseA * @return the Advanced Threat Protection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceId, AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting) { + private Mono createAsync(String resourceId, + AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting) { return createWithResponseAsync(resourceId, advancedThreatProtectionSetting) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param resourceId The identifier of the resource. * @param advancedThreatProtectionSetting Advanced Threat Protection Settings. * @param context The context to associate with this operation. @@ -310,14 +281,14 @@ private Mono createAsync( * @return the Advanced Threat Protection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceId, AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting, Context context) { + public Response createWithResponse(String resourceId, + AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting, Context context) { return createWithResponseAsync(resourceId, advancedThreatProtectionSetting, context).block(); } /** * Creates or updates the Advanced Threat Protection settings on a specified resource. - * + * * @param resourceId The identifier of the resource. * @param advancedThreatProtectionSetting Advanced Threat Protection Settings. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -326,8 +297,8 @@ public Response createWithResponse( * @return the Advanced Threat Protection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdvancedThreatProtectionSettingInner create( - String resourceId, AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting) { + public AdvancedThreatProtectionSettingInner create(String resourceId, + AdvancedThreatProtectionSettingInner advancedThreatProtectionSetting) { return createWithResponse(resourceId, advancedThreatProtectionSetting, Context.NONE).getValue(); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsImpl.java index 90cde665e788..f16d95c1fbe2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AdvancedThreatProtectionsImpl.java @@ -20,21 +20,17 @@ public final class AdvancedThreatProtectionsImpl implements AdvancedThreatProtec private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AdvancedThreatProtectionsImpl( - AdvancedThreatProtectionsClient innerClient, + public AdvancedThreatProtectionsImpl(AdvancedThreatProtectionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public Response getWithResponse(String resourceId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceId, context); + Response inner + = this.serviceClient().getWithResponse(resourceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AdvancedThreatProtectionSettingImpl(inner.getValue(), this.manager())); } else { return null; @@ -51,33 +47,21 @@ public AdvancedThreatProtectionSetting get(String resourceId) { } public AdvancedThreatProtectionSetting getById(String id) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", - "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } return this.getWithResponse(resourceId, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", - "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } return this.getWithResponse(resourceId, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsClientImpl.java index f24350eb7d52..3aabd1ad5c27 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsClientImpl.java @@ -38,17 +38,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AlertsClient. */ +/** + * An instance of this class provides access to all the operations defined in AlertsClient. + */ public final class AlertsClientImpl implements AlertsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AlertsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AlertsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AlertsClientImpl(SecurityCenterImpl client) { @@ -63,257 +69,175 @@ public final class AlertsClientImpl implements AlertsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterAlerts") public interface AlertsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/alerts") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSubscriptionLevelByRegion( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @HeaderParam("Accept") String accept, - Context context); + Mono> listSubscriptionLevelByRegion(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listResourceGroupLevelByRegion( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listResourceGroupLevelByRegion(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getSubscriptionLevel( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}") - @ExpectedResponses({200}) + Mono> getSubscriptionLevel(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("alertName") String alertName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getResourceGroupLevel( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss") - @ExpectedResponses({204}) + Mono> getResourceGroupLevel(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @PathParam("alertName") String alertName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateSubscriptionLevelStateToDismiss( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve") - @ExpectedResponses({204}) + Mono> updateSubscriptionLevelStateToDismiss(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("alertName") String alertName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateSubscriptionLevelStateToResolve( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate") - @ExpectedResponses({204}) + Mono> updateSubscriptionLevelStateToResolve(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("alertName") String alertName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateSubscriptionLevelStateToActivate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/inProgress") - @ExpectedResponses({204}) + Mono> updateSubscriptionLevelStateToActivate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("alertName") String alertName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/inProgress") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateSubscriptionLevelStateToInProgress( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve") - @ExpectedResponses({204}) + Mono> updateSubscriptionLevelStateToInProgress(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("alertName") String alertName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateResourceGroupLevelStateToResolve( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss") - @ExpectedResponses({204}) + Mono> updateResourceGroupLevelStateToResolve(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @PathParam("alertName") String alertName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateResourceGroupLevelStateToDismiss( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate") - @ExpectedResponses({204}) + Mono> updateResourceGroupLevelStateToDismiss(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @PathParam("alertName") String alertName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateResourceGroupLevelStateToActivate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/inProgress") - @ExpectedResponses({204}) + Mono> updateResourceGroupLevelStateToActivate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @PathParam("alertName") String alertName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/inProgress") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateResourceGroupLevelStateToInProgress( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @PathParam("alertName") String alertName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/default/simulate") - @ExpectedResponses({202}) + Mono> updateResourceGroupLevelStateToInProgress(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @PathParam("alertName") String alertName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/default/simulate") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> simulate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> simulate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, @BodyParam("application/json") AlertSimulatorRequestBody alertSimulatorRequestBody, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSubscriptionLevelByRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listResourceGroupLevelByRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List all the alerts that are associated with the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security alerts along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -321,39 +245,26 @@ Mono> listResourceGroupLevelByRegionNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all the alerts that are associated with the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -363,36 +274,24 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all the alerts that are associated with the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security alerts as paginated response with {@link PagedFlux}. @@ -404,7 +303,7 @@ private PagedFlux listAsync() { /** * List all the alerts that are associated with the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -413,13 +312,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List all the alerts that are associated with the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security alerts as paginated response with {@link PagedIterable}. @@ -431,7 +330,7 @@ public PagedIterable list() { /** * List all the alerts that are associated with the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,9 +344,9 @@ public PagedIterable list(Context context) { /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -456,16 +355,12 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -474,33 +369,18 @@ private Mono> listByResourceGroupSinglePageAsync(Strin final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -508,19 +388,15 @@ private Mono> listByResourceGroupSinglePageAsync(Strin * @return list of security alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -530,29 +406,17 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -560,16 +424,15 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -578,16 +441,15 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -600,9 +462,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -616,9 +478,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName, C /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -627,16 +489,12 @@ public PagedIterable listByResourceGroup(String resourceGroupName, C @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSubscriptionLevelByRegionSinglePageAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -644,33 +502,18 @@ private Mono> listSubscriptionLevelByRegionSinglePageA final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSubscriptionLevelByRegion( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listSubscriptionLevelByRegion(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -678,19 +521,15 @@ private Mono> listSubscriptionLevelByRegionSinglePageA * @return list of security alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSubscriptionLevelByRegionSinglePageAsync( - String ascLocation, Context context) { + private Mono> listSubscriptionLevelByRegionSinglePageAsync(String ascLocation, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -699,24 +538,17 @@ private Mono> listSubscriptionLevelByRegionSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listSubscriptionLevelByRegion( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), ascLocation, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listSubscriptionLevelByRegion(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + ascLocation, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -724,16 +556,15 @@ private Mono> listSubscriptionLevelByRegionSinglePageA */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSubscriptionLevelByRegionAsync(String ascLocation) { - return new PagedFlux<>( - () -> listSubscriptionLevelByRegionSinglePageAsync(ascLocation), + return new PagedFlux<>(() -> listSubscriptionLevelByRegionSinglePageAsync(ascLocation), nextLink -> listSubscriptionLevelByRegionNextSinglePageAsync(nextLink)); } /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -742,16 +573,15 @@ private PagedFlux listSubscriptionLevelByRegionAsync(String ascLocat */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSubscriptionLevelByRegionAsync(String ascLocation, Context context) { - return new PagedFlux<>( - () -> listSubscriptionLevelByRegionSinglePageAsync(ascLocation, context), + return new PagedFlux<>(() -> listSubscriptionLevelByRegionSinglePageAsync(ascLocation, context), nextLink -> listSubscriptionLevelByRegionNextSinglePageAsync(nextLink, context)); } /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -764,9 +594,9 @@ public PagedIterable listSubscriptionLevelByRegion(String ascLocatio /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -780,30 +610,26 @@ public PagedIterable listSubscriptionLevelByRegion(String ascLocatio /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listResourceGroupLevelByRegionSinglePageAsync( - String ascLocation, String resourceGroupName) { + private Mono> listResourceGroupLevelByRegionSinglePageAsync(String ascLocation, + String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -815,36 +641,20 @@ private Mono> listResourceGroupLevelByRegionSinglePage final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listResourceGroupLevelByRegion( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listResourceGroupLevelByRegion(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -852,19 +662,15 @@ private Mono> listResourceGroupLevelByRegionSinglePage * @return list of security alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listResourceGroupLevelByRegionSinglePageAsync( - String ascLocation, String resourceGroupName, Context context) { + private Mono> listResourceGroupLevelByRegionSinglePageAsync(String ascLocation, + String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -877,32 +683,19 @@ private Mono> listResourceGroupLevelByRegionSinglePage final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listResourceGroupLevelByRegion( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listResourceGroupLevelByRegion(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + ascLocation, resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -910,18 +703,17 @@ private Mono> listResourceGroupLevelByRegionSinglePage */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listResourceGroupLevelByRegionAsync(String ascLocation, String resourceGroupName) { - return new PagedFlux<>( - () -> listResourceGroupLevelByRegionSinglePageAsync(ascLocation, resourceGroupName), + return new PagedFlux<>(() -> listResourceGroupLevelByRegionSinglePageAsync(ascLocation, resourceGroupName), nextLink -> listResourceGroupLevelByRegionNextSinglePageAsync(nextLink)); } /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -929,8 +721,8 @@ private PagedFlux listResourceGroupLevelByRegionAsync(String ascLoca * @return list of security alerts as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listResourceGroupLevelByRegionAsync( - String ascLocation, String resourceGroupName, Context context) { + private PagedFlux listResourceGroupLevelByRegionAsync(String ascLocation, String resourceGroupName, + Context context) { return new PagedFlux<>( () -> listResourceGroupLevelByRegionSinglePageAsync(ascLocation, resourceGroupName, context), nextLink -> listResourceGroupLevelByRegionNextSinglePageAsync(nextLink, context)); @@ -938,11 +730,11 @@ private PagedFlux listResourceGroupLevelByRegionAsync( /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -955,11 +747,11 @@ public PagedIterable listResourceGroupLevelByRegion(String ascLocati /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -967,36 +759,32 @@ public PagedIterable listResourceGroupLevelByRegion(String ascLocati * @return list of security alerts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listResourceGroupLevelByRegion( - String ascLocation, String resourceGroupName, Context context) { + public PagedIterable listResourceGroupLevelByRegion(String ascLocation, String resourceGroupName, + Context context) { return new PagedIterable<>(listResourceGroupLevelByRegionAsync(ascLocation, resourceGroupName, context)); } /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an alert that is associated with a subscription along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSubscriptionLevelWithResponseAsync(String ascLocation, String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1007,47 +795,34 @@ private Mono> getSubscriptionLevelWithResponseAsync(String final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getSubscriptionLevel( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context)) + .withContext(context -> service.getSubscriptionLevel(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an alert that is associated with a subscription along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSubscriptionLevelWithResponseAsync( - String ascLocation, String alertName, Context context) { + private Mono> getSubscriptionLevelWithResponseAsync(String ascLocation, String alertName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1058,22 +833,15 @@ private Mono> getSubscriptionLevelWithResponseAsync( final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getSubscriptionLevel( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context); + return service.getSubscriptionLevel(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + ascLocation, alertName, accept, context); } /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1088,9 +856,9 @@ private Mono getSubscriptionLevelAsync(String ascLocation, String al /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1099,16 +867,16 @@ private Mono getSubscriptionLevelAsync(String ascLocation, String al * @return an alert that is associated with a subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSubscriptionLevelWithResponse( - String ascLocation, String alertName, Context context) { + public Response getSubscriptionLevelWithResponse(String ascLocation, String alertName, + Context context) { return getSubscriptionLevelWithResponseAsync(ascLocation, alertName, context).block(); } /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1122,32 +890,28 @@ public AlertInner getSubscriptionLevel(String ascLocation, String alertName) { /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an alert that is associated a resource group or a resource in a resource group along with {@link - * Response} on successful completion of {@link Mono}. + * @return an alert that is associated a resource group or a resource in a resource group along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourceGroupLevelWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono> getResourceGroupLevelWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1162,50 +926,36 @@ private Mono> getResourceGroupLevelWithResponseAsync( final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getResourceGroupLevel( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context)) + .withContext(context -> service.getResourceGroupLevel(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an alert that is associated a resource group or a resource in a resource group along with {@link - * Response} on successful completion of {@link Mono}. + * @return an alert that is associated a resource group or a resource in a resource group along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourceGroupLevelWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName, Context context) { + private Mono> getResourceGroupLevelWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1220,67 +970,59 @@ private Mono> getResourceGroupLevelWithResponseAsync( final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getResourceGroupLevel( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context); + return service.getResourceGroupLevel(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, ascLocation, alertName, accept, context); } /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an alert that is associated a resource group or a resource in a resource group on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getResourceGroupLevelAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono getResourceGroupLevelAsync(String resourceGroupName, String ascLocation, + String alertName) { return getResourceGroupLevelWithResponseAsync(resourceGroupName, ascLocation, alertName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an alert that is associated a resource group or a resource in a resource group along with {@link - * Response}. + * @return an alert that is associated a resource group or a resource in a resource group along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getResourceGroupLevelWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { + public Response getResourceGroupLevelWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context) { return getResourceGroupLevelWithResponseAsync(resourceGroupName, ascLocation, alertName, context).block(); } /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1294,9 +1036,9 @@ public AlertInner getResourceGroupLevel(String resourceGroupName, String ascLoca /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1304,19 +1046,15 @@ public AlertInner getResourceGroupLevel(String resourceGroupName, String ascLoca * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToDismissWithResponseAsync( - String ascLocation, String alertName) { + private Mono> updateSubscriptionLevelStateToDismissWithResponseAsync(String ascLocation, + String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1327,25 +1065,16 @@ private Mono> updateSubscriptionLevelStateToDismissWithResponseAs final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateSubscriptionLevelStateToDismiss( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context)) + .withContext(context -> service.updateSubscriptionLevelStateToDismiss(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1354,19 +1083,15 @@ private Mono> updateSubscriptionLevelStateToDismissWithResponseAs * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToDismissWithResponseAsync( - String ascLocation, String alertName, Context context) { + private Mono> updateSubscriptionLevelStateToDismissWithResponseAsync(String ascLocation, + String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1377,22 +1102,15 @@ private Mono> updateSubscriptionLevelStateToDismissWithResponseAs final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateSubscriptionLevelStateToDismiss( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context); + return service.updateSubscriptionLevelStateToDismiss(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1407,9 +1125,9 @@ private Mono updateSubscriptionLevelStateToDismissAsync(String ascLocation /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1418,16 +1136,16 @@ private Mono updateSubscriptionLevelStateToDismissAsync(String ascLocation * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateSubscriptionLevelStateToDismissWithResponse( - String ascLocation, String alertName, Context context) { + public Response updateSubscriptionLevelStateToDismissWithResponse(String ascLocation, String alertName, + Context context) { return updateSubscriptionLevelStateToDismissWithResponseAsync(ascLocation, alertName, context).block(); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1440,9 +1158,9 @@ public void updateSubscriptionLevelStateToDismiss(String ascLocation, String ale /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1450,19 +1168,15 @@ public void updateSubscriptionLevelStateToDismiss(String ascLocation, String ale * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToResolveWithResponseAsync( - String ascLocation, String alertName) { + private Mono> updateSubscriptionLevelStateToResolveWithResponseAsync(String ascLocation, + String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1473,25 +1187,16 @@ private Mono> updateSubscriptionLevelStateToResolveWithResponseAs final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateSubscriptionLevelStateToResolve( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context)) + .withContext(context -> service.updateSubscriptionLevelStateToResolve(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1500,19 +1205,15 @@ private Mono> updateSubscriptionLevelStateToResolveWithResponseAs * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToResolveWithResponseAsync( - String ascLocation, String alertName, Context context) { + private Mono> updateSubscriptionLevelStateToResolveWithResponseAsync(String ascLocation, + String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1523,22 +1224,15 @@ private Mono> updateSubscriptionLevelStateToResolveWithResponseAs final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateSubscriptionLevelStateToResolve( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context); + return service.updateSubscriptionLevelStateToResolve(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1553,9 +1247,9 @@ private Mono updateSubscriptionLevelStateToResolveAsync(String ascLocation /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1564,16 +1258,16 @@ private Mono updateSubscriptionLevelStateToResolveAsync(String ascLocation * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateSubscriptionLevelStateToResolveWithResponse( - String ascLocation, String alertName, Context context) { + public Response updateSubscriptionLevelStateToResolveWithResponse(String ascLocation, String alertName, + Context context) { return updateSubscriptionLevelStateToResolveWithResponseAsync(ascLocation, alertName, context).block(); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1586,9 +1280,9 @@ public void updateSubscriptionLevelStateToResolve(String ascLocation, String ale /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1596,19 +1290,15 @@ public void updateSubscriptionLevelStateToResolve(String ascLocation, String ale * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToActivateWithResponseAsync( - String ascLocation, String alertName) { + private Mono> updateSubscriptionLevelStateToActivateWithResponseAsync(String ascLocation, + String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1619,25 +1309,16 @@ private Mono> updateSubscriptionLevelStateToActivateWithResponseA final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateSubscriptionLevelStateToActivate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context)) + .withContext(context -> service.updateSubscriptionLevelStateToActivate(this.client.getEndpoint(), + apiVersion, this.client.getSubscriptionId(), ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1646,19 +1327,15 @@ private Mono> updateSubscriptionLevelStateToActivateWithResponseA * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToActivateWithResponseAsync( - String ascLocation, String alertName, Context context) { + private Mono> updateSubscriptionLevelStateToActivateWithResponseAsync(String ascLocation, + String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1669,22 +1346,15 @@ private Mono> updateSubscriptionLevelStateToActivateWithResponseA final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateSubscriptionLevelStateToActivate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context); + return service.updateSubscriptionLevelStateToActivate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1699,9 +1369,9 @@ private Mono updateSubscriptionLevelStateToActivateAsync(String ascLocatio /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1710,16 +1380,16 @@ private Mono updateSubscriptionLevelStateToActivateAsync(String ascLocatio * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateSubscriptionLevelStateToActivateWithResponse( - String ascLocation, String alertName, Context context) { + public Response updateSubscriptionLevelStateToActivateWithResponse(String ascLocation, String alertName, + Context context) { return updateSubscriptionLevelStateToActivateWithResponseAsync(ascLocation, alertName, context).block(); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1732,9 +1402,9 @@ public void updateSubscriptionLevelStateToActivate(String ascLocation, String al /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1742,19 +1412,15 @@ public void updateSubscriptionLevelStateToActivate(String ascLocation, String al * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToInProgressWithResponseAsync( - String ascLocation, String alertName) { + private Mono> updateSubscriptionLevelStateToInProgressWithResponseAsync(String ascLocation, + String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1765,25 +1431,16 @@ private Mono> updateSubscriptionLevelStateToInProgressWithRespons final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateSubscriptionLevelStateToInProgress( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context)) + .withContext(context -> service.updateSubscriptionLevelStateToInProgress(this.client.getEndpoint(), + apiVersion, this.client.getSubscriptionId(), ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1792,19 +1449,15 @@ private Mono> updateSubscriptionLevelStateToInProgressWithRespons * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelStateToInProgressWithResponseAsync( - String ascLocation, String alertName, Context context) { + private Mono> updateSubscriptionLevelStateToInProgressWithResponseAsync(String ascLocation, + String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -1815,22 +1468,15 @@ private Mono> updateSubscriptionLevelStateToInProgressWithRespons final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateSubscriptionLevelStateToInProgress( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertName, - accept, - context); + return service.updateSubscriptionLevelStateToInProgress(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1845,9 +1491,9 @@ private Mono updateSubscriptionLevelStateToInProgressAsync(String ascLocat /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1856,16 +1502,16 @@ private Mono updateSubscriptionLevelStateToInProgressAsync(String ascLocat * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateSubscriptionLevelStateToInProgressWithResponse( - String ascLocation, String alertName, Context context) { + public Response updateSubscriptionLevelStateToInProgressWithResponse(String ascLocation, String alertName, + Context context) { return updateSubscriptionLevelStateToInProgressWithResponseAsync(ascLocation, alertName, context).block(); } /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1878,11 +1524,11 @@ public void updateSubscriptionLevelStateToInProgress(String ascLocation, String /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1890,19 +1536,15 @@ public void updateSubscriptionLevelStateToInProgress(String ascLocation, String * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToResolveWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono> updateResourceGroupLevelStateToResolveWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1918,27 +1560,18 @@ private Mono> updateResourceGroupLevelStateToResolveWithResponseA final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateResourceGroupLevelStateToResolve( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context)) + context -> service.updateResourceGroupLevelStateToResolve(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1947,19 +1580,15 @@ private Mono> updateResourceGroupLevelStateToResolveWithResponseA * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToResolveWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName, Context context) { + private Mono> updateResourceGroupLevelStateToResolveWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1974,25 +1603,17 @@ private Mono> updateResourceGroupLevelStateToResolveWithResponseA final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateResourceGroupLevelStateToResolve( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context); + return service.updateResourceGroupLevelStateToResolve(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2000,19 +1621,19 @@ private Mono> updateResourceGroupLevelStateToResolveWithResponseA * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateResourceGroupLevelStateToResolveAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono updateResourceGroupLevelStateToResolveAsync(String resourceGroupName, String ascLocation, + String alertName) { return updateResourceGroupLevelStateToResolveWithResponseAsync(resourceGroupName, ascLocation, alertName) .flatMap(ignored -> Mono.empty()); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2021,20 +1642,19 @@ private Mono updateResourceGroupLevelStateToResolveAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateResourceGroupLevelStateToResolveWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return updateResourceGroupLevelStateToResolveWithResponseAsync( - resourceGroupName, ascLocation, alertName, context) - .block(); + public Response updateResourceGroupLevelStateToResolveWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return updateResourceGroupLevelStateToResolveWithResponseAsync(resourceGroupName, ascLocation, alertName, + context).block(); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2047,11 +1667,11 @@ public void updateResourceGroupLevelStateToResolve(String resourceGroupName, Str /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2059,19 +1679,15 @@ public void updateResourceGroupLevelStateToResolve(String resourceGroupName, Str * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToDismissWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono> updateResourceGroupLevelStateToDismissWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2087,27 +1703,18 @@ private Mono> updateResourceGroupLevelStateToDismissWithResponseA final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateResourceGroupLevelStateToDismiss( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context)) + context -> service.updateResourceGroupLevelStateToDismiss(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2116,19 +1723,15 @@ private Mono> updateResourceGroupLevelStateToDismissWithResponseA * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToDismissWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName, Context context) { + private Mono> updateResourceGroupLevelStateToDismissWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2143,25 +1746,17 @@ private Mono> updateResourceGroupLevelStateToDismissWithResponseA final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateResourceGroupLevelStateToDismiss( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context); + return service.updateResourceGroupLevelStateToDismiss(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2169,19 +1764,19 @@ private Mono> updateResourceGroupLevelStateToDismissWithResponseA * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateResourceGroupLevelStateToDismissAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono updateResourceGroupLevelStateToDismissAsync(String resourceGroupName, String ascLocation, + String alertName) { return updateResourceGroupLevelStateToDismissWithResponseAsync(resourceGroupName, ascLocation, alertName) .flatMap(ignored -> Mono.empty()); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2190,20 +1785,19 @@ private Mono updateResourceGroupLevelStateToDismissAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateResourceGroupLevelStateToDismissWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return updateResourceGroupLevelStateToDismissWithResponseAsync( - resourceGroupName, ascLocation, alertName, context) - .block(); + public Response updateResourceGroupLevelStateToDismissWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return updateResourceGroupLevelStateToDismissWithResponseAsync(resourceGroupName, ascLocation, alertName, + context).block(); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2216,11 +1810,11 @@ public void updateResourceGroupLevelStateToDismiss(String resourceGroupName, Str /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2228,19 +1822,15 @@ public void updateResourceGroupLevelStateToDismiss(String resourceGroupName, Str * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToActivateWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono> updateResourceGroupLevelStateToActivateWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2256,27 +1846,18 @@ private Mono> updateResourceGroupLevelStateToActivateWithResponse final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateResourceGroupLevelStateToActivate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context)) + context -> service.updateResourceGroupLevelStateToActivate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2285,19 +1866,15 @@ private Mono> updateResourceGroupLevelStateToActivateWithResponse * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToActivateWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName, Context context) { + private Mono> updateResourceGroupLevelStateToActivateWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2312,25 +1889,17 @@ private Mono> updateResourceGroupLevelStateToActivateWithResponse final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateResourceGroupLevelStateToActivate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context); + return service.updateResourceGroupLevelStateToActivate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2338,19 +1907,19 @@ private Mono> updateResourceGroupLevelStateToActivateWithResponse * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateResourceGroupLevelStateToActivateAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono updateResourceGroupLevelStateToActivateAsync(String resourceGroupName, String ascLocation, + String alertName) { return updateResourceGroupLevelStateToActivateWithResponseAsync(resourceGroupName, ascLocation, alertName) .flatMap(ignored -> Mono.empty()); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2359,38 +1928,37 @@ private Mono updateResourceGroupLevelStateToActivateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateResourceGroupLevelStateToActivateWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return updateResourceGroupLevelStateToActivateWithResponseAsync( - resourceGroupName, ascLocation, alertName, context) - .block(); + public Response updateResourceGroupLevelStateToActivateWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return updateResourceGroupLevelStateToActivateWithResponseAsync(resourceGroupName, ascLocation, alertName, + context).block(); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateResourceGroupLevelStateToActivate( - String resourceGroupName, String ascLocation, String alertName) { + public void updateResourceGroupLevelStateToActivate(String resourceGroupName, String ascLocation, + String alertName) { updateResourceGroupLevelStateToActivateWithResponse(resourceGroupName, ascLocation, alertName, Context.NONE); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2398,19 +1966,15 @@ public void updateResourceGroupLevelStateToActivate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToInProgressWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono> updateResourceGroupLevelStateToInProgressWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2426,27 +1990,18 @@ private Mono> updateResourceGroupLevelStateToInProgressWithRespon final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateResourceGroupLevelStateToInProgress( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context)) + context -> service.updateResourceGroupLevelStateToInProgress(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2455,19 +2010,15 @@ private Mono> updateResourceGroupLevelStateToInProgressWithRespon * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelStateToInProgressWithResponseAsync( - String resourceGroupName, String ascLocation, String alertName, Context context) { + private Mono> updateResourceGroupLevelStateToInProgressWithResponseAsync(String resourceGroupName, + String ascLocation, String alertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2482,25 +2033,17 @@ private Mono> updateResourceGroupLevelStateToInProgressWithRespon final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateResourceGroupLevelStateToInProgress( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - alertName, - accept, - context); + return service.updateResourceGroupLevelStateToInProgress(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, alertName, accept, context); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2508,19 +2051,19 @@ private Mono> updateResourceGroupLevelStateToInProgressWithRespon * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateResourceGroupLevelStateToInProgressAsync( - String resourceGroupName, String ascLocation, String alertName) { + private Mono updateResourceGroupLevelStateToInProgressAsync(String resourceGroupName, String ascLocation, + String alertName) { return updateResourceGroupLevelStateToInProgressWithResponseAsync(resourceGroupName, ascLocation, alertName) .flatMap(ignored -> Mono.empty()); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2529,36 +2072,35 @@ private Mono updateResourceGroupLevelStateToInProgressAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateResourceGroupLevelStateToInProgressWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return updateResourceGroupLevelStateToInProgressWithResponseAsync( - resourceGroupName, ascLocation, alertName, context) - .block(); + public Response updateResourceGroupLevelStateToInProgressWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return updateResourceGroupLevelStateToInProgressWithResponseAsync(resourceGroupName, ascLocation, alertName, + context).block(); } /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateResourceGroupLevelStateToInProgress( - String resourceGroupName, String ascLocation, String alertName) { + public void updateResourceGroupLevelStateToInProgress(String resourceGroupName, String ascLocation, + String alertName) { updateResourceGroupLevelStateToInProgressWithResponse(resourceGroupName, ascLocation, alertName, Context.NONE); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2566,53 +2108,38 @@ public void updateResourceGroupLevelStateToInProgress( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> simulateWithResponseAsync( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody) { + private Mono>> simulateWithResponseAsync(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (alertSimulatorRequestBody == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertSimulatorRequestBody is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertSimulatorRequestBody is required and cannot be null.")); } else { alertSimulatorRequestBody.validate(); } final String apiVersion = "2022-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .simulate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertSimulatorRequestBody, - accept, - context)) + .withContext(context -> service.simulate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, alertSimulatorRequestBody, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2621,50 +2148,37 @@ private Mono>> simulateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> simulateWithResponseAsync( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody, Context context) { + private Mono>> simulateWithResponseAsync(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (alertSimulatorRequestBody == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertSimulatorRequestBody is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertSimulatorRequestBody is required and cannot be null.")); } else { alertSimulatorRequestBody.validate(); } final String apiVersion = "2022-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .simulate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - alertSimulatorRequestBody, - accept, - context); + return service.simulate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), ascLocation, + alertSimulatorRequestBody, accept, context); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2672,20 +2186,18 @@ private Mono>> simulateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginSimulateAsync( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody) { + private PollerFlux, Void> beginSimulateAsync(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody) { Mono>> mono = simulateWithResponseAsync(ascLocation, alertSimulatorRequestBody); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2694,21 +2206,20 @@ private PollerFlux, Void> beginSimulateAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginSimulateAsync( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody, Context context) { + private PollerFlux, Void> beginSimulateAsync(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - simulateWithResponseAsync(ascLocation, alertSimulatorRequestBody, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = simulateWithResponseAsync(ascLocation, alertSimulatorRequestBody, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2716,16 +2227,16 @@ private PollerFlux, Void> beginSimulateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginSimulate( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody) { + public SyncPoller, Void> beginSimulate(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody) { return this.beginSimulateAsync(ascLocation, alertSimulatorRequestBody).getSyncPoller(); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2734,16 +2245,16 @@ public SyncPoller, Void> beginSimulate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginSimulate( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody, Context context) { + public SyncPoller, Void> beginSimulate(String ascLocation, + AlertSimulatorRequestBody alertSimulatorRequestBody, Context context) { return this.beginSimulateAsync(ascLocation, alertSimulatorRequestBody, context).getSyncPoller(); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2752,16 +2263,15 @@ public SyncPoller, Void> beginSimulate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono simulateAsync(String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody) { - return beginSimulateAsync(ascLocation, alertSimulatorRequestBody) - .last() + return beginSimulateAsync(ascLocation, alertSimulatorRequestBody).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2770,18 +2280,17 @@ private Mono simulateAsync(String ascLocation, AlertSimulatorRequestBody a * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono simulateAsync( - String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody, Context context) { - return beginSimulateAsync(ascLocation, alertSimulatorRequestBody, context) - .last() + private Mono simulateAsync(String ascLocation, AlertSimulatorRequestBody alertSimulatorRequestBody, + Context context) { + return beginSimulateAsync(ascLocation, alertSimulatorRequestBody, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2794,9 +2303,9 @@ public void simulate(String ascLocation, AlertSimulatorRequestBody alertSimulato /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2810,9 +2319,10 @@ public void simulate(String ascLocation, AlertSimulatorRequestBody alertSimulato /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2824,31 +2334,22 @@ private Mono> listNextSinglePageAsync(String nextLink) return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2861,31 +2362,22 @@ private Mono> listNextSinglePageAsync(String nextLink, return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2897,32 +2389,24 @@ private Mono> listByResourceGroupNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2935,31 +2419,22 @@ private Mono> listByResourceGroupNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2971,33 +2446,23 @@ private Mono> listSubscriptionLevelByRegionNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listSubscriptionLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext( + context -> service.listSubscriptionLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3005,37 +2470,28 @@ private Mono> listSubscriptionLevelByRegionNextSingleP * @return list of security alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSubscriptionLevelByRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listSubscriptionLevelByRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSubscriptionLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listSubscriptionLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3047,33 +2503,23 @@ private Mono> listResourceGroupLevelByRegionNextSingle return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listResourceGroupLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext( + context -> service.listResourceGroupLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3081,29 +2527,19 @@ private Mono> listResourceGroupLevelByRegionNextSingle * @return list of security alerts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listResourceGroupLevelByRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listResourceGroupLevelByRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listResourceGroupLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listResourceGroupLevelByRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsImpl.java index 2256ce9a09cd..cc9acb48a619 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsImpl.java @@ -29,55 +29,52 @@ public AlertsImpl(AlertsClient innerClient, com.azure.resourcemanager.security.S public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } public PagedIterable listSubscriptionLevelByRegion(String ascLocation) { PagedIterable inner = this.serviceClient().listSubscriptionLevelByRegion(ascLocation); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } public PagedIterable listSubscriptionLevelByRegion(String ascLocation, Context context) { PagedIterable inner = this.serviceClient().listSubscriptionLevelByRegion(ascLocation, context); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } public PagedIterable listResourceGroupLevelByRegion(String ascLocation, String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listResourceGroupLevelByRegion(ascLocation, resourceGroupName); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listResourceGroupLevelByRegion(ascLocation, resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } - public PagedIterable listResourceGroupLevelByRegion( - String ascLocation, String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listResourceGroupLevelByRegion(ascLocation, resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); + public PagedIterable listResourceGroupLevelByRegion(String ascLocation, String resourceGroupName, + Context context) { + PagedIterable inner + = this.serviceClient().listResourceGroupLevelByRegion(ascLocation, resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); } public Response getSubscriptionLevelWithResponse(String ascLocation, String alertName, Context context) { - Response inner = - this.serviceClient().getSubscriptionLevelWithResponse(ascLocation, alertName, context); + Response inner + = this.serviceClient().getSubscriptionLevelWithResponse(ascLocation, alertName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AlertImpl(inner.getValue(), this.manager())); } else { return null; @@ -93,15 +90,12 @@ public Alert getSubscriptionLevel(String ascLocation, String alertName) { } } - public Response getResourceGroupLevelWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - Response inner = - this.serviceClient().getResourceGroupLevelWithResponse(resourceGroupName, ascLocation, alertName, context); + public Response getResourceGroupLevelWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context) { + Response inner = this.serviceClient().getResourceGroupLevelWithResponse(resourceGroupName, + ascLocation, alertName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AlertImpl(inner.getValue(), this.manager())); } else { return null; @@ -117,8 +111,8 @@ public Alert getResourceGroupLevel(String resourceGroupName, String ascLocation, } } - public Response updateSubscriptionLevelStateToDismissWithResponse( - String ascLocation, String alertName, Context context) { + public Response updateSubscriptionLevelStateToDismissWithResponse(String ascLocation, String alertName, + Context context) { return this.serviceClient().updateSubscriptionLevelStateToDismissWithResponse(ascLocation, alertName, context); } @@ -126,8 +120,8 @@ public void updateSubscriptionLevelStateToDismiss(String ascLocation, String ale this.serviceClient().updateSubscriptionLevelStateToDismiss(ascLocation, alertName); } - public Response updateSubscriptionLevelStateToResolveWithResponse( - String ascLocation, String alertName, Context context) { + public Response updateSubscriptionLevelStateToResolveWithResponse(String ascLocation, String alertName, + Context context) { return this.serviceClient().updateSubscriptionLevelStateToResolveWithResponse(ascLocation, alertName, context); } @@ -135,8 +129,8 @@ public void updateSubscriptionLevelStateToResolve(String ascLocation, String ale this.serviceClient().updateSubscriptionLevelStateToResolve(ascLocation, alertName); } - public Response updateSubscriptionLevelStateToActivateWithResponse( - String ascLocation, String alertName, Context context) { + public Response updateSubscriptionLevelStateToActivateWithResponse(String ascLocation, String alertName, + Context context) { return this.serviceClient().updateSubscriptionLevelStateToActivateWithResponse(ascLocation, alertName, context); } @@ -144,60 +138,55 @@ public void updateSubscriptionLevelStateToActivate(String ascLocation, String al this.serviceClient().updateSubscriptionLevelStateToActivate(ascLocation, alertName); } - public Response updateSubscriptionLevelStateToInProgressWithResponse( - String ascLocation, String alertName, Context context) { - return this - .serviceClient() - .updateSubscriptionLevelStateToInProgressWithResponse(ascLocation, alertName, context); + public Response updateSubscriptionLevelStateToInProgressWithResponse(String ascLocation, String alertName, + Context context) { + return this.serviceClient().updateSubscriptionLevelStateToInProgressWithResponse(ascLocation, alertName, + context); } public void updateSubscriptionLevelStateToInProgress(String ascLocation, String alertName) { this.serviceClient().updateSubscriptionLevelStateToInProgress(ascLocation, alertName); } - public Response updateResourceGroupLevelStateToResolveWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return this - .serviceClient() - .updateResourceGroupLevelStateToResolveWithResponse(resourceGroupName, ascLocation, alertName, context); + public Response updateResourceGroupLevelStateToResolveWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return this.serviceClient().updateResourceGroupLevelStateToResolveWithResponse(resourceGroupName, ascLocation, + alertName, context); } public void updateResourceGroupLevelStateToResolve(String resourceGroupName, String ascLocation, String alertName) { this.serviceClient().updateResourceGroupLevelStateToResolve(resourceGroupName, ascLocation, alertName); } - public Response updateResourceGroupLevelStateToDismissWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return this - .serviceClient() - .updateResourceGroupLevelStateToDismissWithResponse(resourceGroupName, ascLocation, alertName, context); + public Response updateResourceGroupLevelStateToDismissWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return this.serviceClient().updateResourceGroupLevelStateToDismissWithResponse(resourceGroupName, ascLocation, + alertName, context); } public void updateResourceGroupLevelStateToDismiss(String resourceGroupName, String ascLocation, String alertName) { this.serviceClient().updateResourceGroupLevelStateToDismiss(resourceGroupName, ascLocation, alertName); } - public Response updateResourceGroupLevelStateToActivateWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return this - .serviceClient() - .updateResourceGroupLevelStateToActivateWithResponse(resourceGroupName, ascLocation, alertName, context); + public Response updateResourceGroupLevelStateToActivateWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return this.serviceClient().updateResourceGroupLevelStateToActivateWithResponse(resourceGroupName, ascLocation, + alertName, context); } - public void updateResourceGroupLevelStateToActivate( - String resourceGroupName, String ascLocation, String alertName) { + public void updateResourceGroupLevelStateToActivate(String resourceGroupName, String ascLocation, + String alertName) { this.serviceClient().updateResourceGroupLevelStateToActivate(resourceGroupName, ascLocation, alertName); } - public Response updateResourceGroupLevelStateToInProgressWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context) { - return this - .serviceClient() - .updateResourceGroupLevelStateToInProgressWithResponse(resourceGroupName, ascLocation, alertName, context); + public Response updateResourceGroupLevelStateToInProgressWithResponse(String resourceGroupName, + String ascLocation, String alertName, Context context) { + return this.serviceClient().updateResourceGroupLevelStateToInProgressWithResponse(resourceGroupName, + ascLocation, alertName, context); } - public void updateResourceGroupLevelStateToInProgress( - String resourceGroupName, String ascLocation, String alertName) { + public void updateResourceGroupLevelStateToInProgress(String resourceGroupName, String ascLocation, + String alertName) { this.serviceClient().updateResourceGroupLevelStateToInProgress(resourceGroupName, ascLocation, alertName); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRuleImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRuleImpl.java index dba39316deae..5fbf105426f5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRuleImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRuleImpl.java @@ -15,8 +15,8 @@ public final class AlertsSuppressionRuleImpl implements AlertsSuppressionRule { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - AlertsSuppressionRuleImpl( - AlertsSuppressionRuleInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + AlertsSuppressionRuleImpl(AlertsSuppressionRuleInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesClientImpl.java index b6e2af3f8fd6..838c7900c7d5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesClientImpl.java @@ -33,23 +33,28 @@ import com.azure.resourcemanager.security.models.AlertsSuppressionRulesList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AlertsSuppressionRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in AlertsSuppressionRulesClient. + */ public final class AlertsSuppressionRulesClientImpl implements AlertsSuppressionRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AlertsSuppressionRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AlertsSuppressionRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AlertsSuppressionRulesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(AlertsSuppressionRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AlertsSuppressionRulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,162 +65,114 @@ public final class AlertsSuppressionRulesClientImpl implements AlertsSuppression @Host("{$host}") @ServiceInterface(name = "SecurityCenterAlerts") public interface AlertsSuppressionRulesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("AlertType") String alertType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}") - @ExpectedResponses({200}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("AlertType") String alertType, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("alertsSuppressionRuleName") String alertsSuppressionRuleName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("alertsSuppressionRuleName") String alertsSuppressionRuleName, @BodyParam("application/json") AlertsSuppressionRuleInner alertsSuppressionRule, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}") - @ExpectedResponses({204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("alertsSuppressionRuleName") String alertsSuppressionRuleName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List of all the dismiss rules for the given subscription. - * + * * @param alertType Type of the alert to get rules for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String alertType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - alertType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + alertType, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List of all the dismiss rules for the given subscription. - * + * * @param alertType Type of the alert to get rules for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String alertType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), alertType, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List of all the dismiss rules for the given subscription. - * + * * @param alertType Type of the alert to get rules for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -229,7 +186,7 @@ private PagedFlux listAsync(String alertType) { /** * List of all the dismiss rules for the given subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription as paginated response with {@link PagedFlux}. @@ -242,7 +199,7 @@ private PagedFlux listAsync() { /** * List of all the dismiss rules for the given subscription. - * + * * @param alertType Type of the alert to get rules for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,13 +209,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String alertType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(alertType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(alertType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List of all the dismiss rules for the given subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription as paginated response with {@link PagedIterable}. @@ -271,7 +228,7 @@ public PagedIterable list() { /** * List of all the dismiss rules for the given subscription. - * + * * @param alertType Type of the alert to get rules for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,104 +243,78 @@ public PagedIterable list(String alertType, Context /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with {@link - * Response} on successful completion of {@link Mono}. + * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String alertsSuppressionRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (alertsSuppressionRuleName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertsSuppressionRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertsSuppressionRuleName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - alertsSuppressionRuleName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + alertsSuppressionRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with {@link - * Response} on successful completion of {@link Mono}. + * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String alertsSuppressionRuleName, Context context) { + private Mono> getWithResponseAsync(String alertsSuppressionRuleName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (alertsSuppressionRuleName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertsSuppressionRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertsSuppressionRuleName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - alertsSuppressionRuleName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + alertsSuppressionRuleName, accept, context); } /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String alertsSuppressionRuleName) { @@ -392,14 +323,14 @@ private Mono getAsync(String alertsSuppressionRuleNa /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with {@link - * Response}. + * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String alertsSuppressionRuleName, Context context) { @@ -408,7 +339,7 @@ public Response getWithResponse(String alertsSuppres /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -422,7 +353,7 @@ public AlertsSuppressionRuleInner get(String alertsSuppressionRuleName) { /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -431,25 +362,19 @@ public AlertsSuppressionRuleInner get(String alertsSuppressionRuleName) { * @return describes the suppression rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule) { + private Mono> updateWithResponseAsync(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (alertsSuppressionRuleName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertsSuppressionRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertsSuppressionRuleName is required and cannot be null.")); } if (alertsSuppressionRule == null) { return Mono @@ -460,23 +385,14 @@ private Mono> updateWithResponseAsync( final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - alertsSuppressionRuleName, - alertsSuppressionRule, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), alertsSuppressionRuleName, alertsSuppressionRule, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @param context The context to associate with this operation. @@ -486,25 +402,19 @@ private Mono> updateWithResponseAsync( * @return describes the suppression rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule, Context context) { + private Mono> updateWithResponseAsync(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (alertsSuppressionRuleName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertsSuppressionRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertsSuppressionRuleName is required and cannot be null.")); } if (alertsSuppressionRule == null) { return Mono @@ -515,20 +425,13 @@ private Mono> updateWithResponseAsync( final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - alertsSuppressionRuleName, - alertsSuppressionRule, - accept, - context); + return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + alertsSuppressionRuleName, alertsSuppressionRule, accept, context); } /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -537,15 +440,15 @@ private Mono> updateWithResponseAsync( * @return describes the suppression rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule) { + private Mono updateAsync(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule) { return updateWithResponseAsync(alertsSuppressionRuleName, alertsSuppressionRule) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @param context The context to associate with this operation. @@ -555,14 +458,14 @@ private Mono updateAsync( * @return describes the suppression rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule, Context context) { + public Response updateWithResponse(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule, Context context) { return updateWithResponseAsync(alertsSuppressionRuleName, alertsSuppressionRule, context).block(); } /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -571,14 +474,14 @@ public Response updateWithResponse( * @return describes the suppression rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertsSuppressionRuleInner update( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule) { + public AlertsSuppressionRuleInner update(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule) { return updateWithResponse(alertsSuppressionRuleName, alertsSuppressionRule, Context.NONE).getValue(); } /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -588,42 +491,28 @@ public AlertsSuppressionRuleInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String alertsSuppressionRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (alertsSuppressionRuleName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertsSuppressionRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertsSuppressionRuleName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - alertsSuppressionRuleName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), alertsSuppressionRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -634,39 +523,27 @@ private Mono> deleteWithResponseAsync(String alertsSuppressionRul @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String alertsSuppressionRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (alertsSuppressionRuleName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter alertsSuppressionRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter alertsSuppressionRuleName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - alertsSuppressionRuleName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + alertsSuppressionRuleName, accept, context); } /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -680,7 +557,7 @@ private Mono deleteAsync(String alertsSuppressionRuleName) { /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -695,7 +572,7 @@ public Response deleteWithResponse(String alertsSuppressionRuleName, Conte /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -708,14 +585,15 @@ public void delete(String alertsSuppressionRuleName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -723,37 +601,28 @@ private Mono> listNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -761,23 +630,13 @@ private Mono> listNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesImpl.java index fe83aead0087..353fe376e1f6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AlertsSuppressionRulesImpl.java @@ -21,30 +21,27 @@ public final class AlertsSuppressionRulesImpl implements AlertsSuppressionRules private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AlertsSuppressionRulesImpl( - AlertsSuppressionRulesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public AlertsSuppressionRulesImpl(AlertsSuppressionRulesClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new AlertsSuppressionRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertsSuppressionRuleImpl(inner1, this.manager())); } public PagedIterable list(String alertType, Context context) { PagedIterable inner = this.serviceClient().list(alertType, context); - return Utils.mapPage(inner, inner1 -> new AlertsSuppressionRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertsSuppressionRuleImpl(inner1, this.manager())); } public Response getWithResponse(String alertsSuppressionRuleName, Context context) { - Response inner = - this.serviceClient().getWithResponse(alertsSuppressionRuleName, context); + Response inner + = this.serviceClient().getWithResponse(alertsSuppressionRuleName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AlertsSuppressionRuleImpl(inner.getValue(), this.manager())); } else { return null; @@ -60,25 +57,22 @@ public AlertsSuppressionRule get(String alertsSuppressionRuleName) { } } - public Response updateWithResponse( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule, Context context) { - Response inner = - this.serviceClient().updateWithResponse(alertsSuppressionRuleName, alertsSuppressionRule, context); + public Response updateWithResponse(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule, Context context) { + Response inner + = this.serviceClient().updateWithResponse(alertsSuppressionRuleName, alertsSuppressionRule, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AlertsSuppressionRuleImpl(inner.getValue(), this.manager())); } else { return null; } } - public AlertsSuppressionRule update( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule) { - AlertsSuppressionRuleInner inner = - this.serviceClient().update(alertsSuppressionRuleName, alertsSuppressionRule); + public AlertsSuppressionRule update(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule) { + AlertsSuppressionRuleInner inner + = this.serviceClient().update(alertsSuppressionRuleName, alertsSuppressionRule); if (inner != null) { return new AlertsSuppressionRuleImpl(inner, this.manager()); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsClientImpl.java index 6ec6858c8cae..b0d4918e8229 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsClientImpl.java @@ -31,22 +31,28 @@ import com.azure.resourcemanager.security.models.ConnectionType; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AllowedConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in AllowedConnectionsClient. + */ public final class AllowedConnectionsClientImpl implements AllowedConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AllowedConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AllowedConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AllowedConnectionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(AllowedConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AllowedConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,153 +63,111 @@ public final class AllowedConnectionsClientImpl implements AllowedConnectionsCli @Host("{$host}") @ServiceInterface(name = "SecurityCenterAllowe") public interface AllowedConnectionsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHomeRegion( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHomeRegion(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @PathParam("connectionType") ConnectionType connectionType, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @PathParam("connectionType") ConnectionType connectionType, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHomeRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedFlux}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -212,27 +176,27 @@ private PagedFlux listAsync() { /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedFlux}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedIterable}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -241,13 +205,13 @@ public PagedIterable list() { /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedIterable}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -256,28 +220,24 @@ public PagedIterable list(Context context) { /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription and location along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the list of all possible traffic between resources for the subscription and location along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHomeRegionSinglePageAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -285,54 +245,35 @@ private Mono> listByHomeRegionSin final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHomeRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), + ascLocation, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription and location along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the list of all possible traffic between resources for the subscription and location along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionSinglePageAsync( - String ascLocation, Context context) { + private Mono> listByHomeRegionSinglePageAsync(String ascLocation, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -341,66 +282,57 @@ private Mono> listByHomeRegionSin final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHomeRegion( - this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedFlux}. + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink)); } /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedFlux}. + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation, Context context) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation, context), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation, context), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink, context)); } /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation) { @@ -409,15 +341,15 @@ public PagedIterable listByHomeRegion(String as /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation, Context context) { @@ -427,32 +359,28 @@ public PagedIterable listByHomeRegion(String as /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type along with {@link Response} on successful completion of {@link Mono}. + * type along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, ConnectionType connectionType) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, ConnectionType connectionType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -467,51 +395,37 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - connectionType, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, connectionType, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type along with {@link Response} on successful completion of {@link Mono}. + * type along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, ConnectionType connectionType, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, ConnectionType connectionType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -526,36 +440,28 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - connectionType, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, ascLocation, + connectionType, apiVersion, accept, context); } /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type on successful completion of {@link Mono}. + * type on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String ascLocation, ConnectionType connectionType) { + private Mono getAsync(String resourceGroupName, String ascLocation, + ConnectionType connectionType) { return getWithResponseAsync(resourceGroupName, ascLocation, connectionType) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -563,56 +469,57 @@ private Mono getAsync( /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type along with {@link Response}. + * type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ascLocation, ConnectionType connectionType, Context context) { + public Response getWithResponse(String resourceGroupName, String ascLocation, + ConnectionType connectionType, Context context) { return getWithResponseAsync(resourceGroupName, ascLocation, connectionType, context).block(); } /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type. + * type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AllowedConnectionsResourceInner get( - String resourceGroupName, String ascLocation, ConnectionType connectionType) { + public AllowedConnectionsResourceInner get(String resourceGroupName, String ascLocation, + ConnectionType connectionType) { return getWithResponse(resourceGroupName, ascLocation, connectionType, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all possible traffic between Azure resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -620,75 +527,57 @@ private Mono> listNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all possible traffic between Azure resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all possible traffic between Azure resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHomeRegionNextSinglePageAsync(String nextLink) { @@ -696,62 +585,44 @@ private Mono> listByHomeRegionNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all possible traffic between Azure resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByHomeRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsImpl.java index 66d36cb8fb15..783c8fb12d19 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsImpl.java @@ -22,42 +22,43 @@ public final class AllowedConnectionsImpl implements AllowedConnections { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AllowedConnectionsImpl( - AllowedConnectionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public AllowedConnectionsImpl(AllowedConnectionsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation) { PagedIterable inner = this.serviceClient().listByHomeRegion(ascLocation); - return Utils.mapPage(inner, inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation, Context context) { - PagedIterable inner = - this.serviceClient().listByHomeRegion(ascLocation, context); - return Utils.mapPage(inner, inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByHomeRegion(ascLocation, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AllowedConnectionsResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String ascLocation, ConnectionType connectionType, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, ascLocation, connectionType, context); + public Response getWithResponse(String resourceGroupName, String ascLocation, + ConnectionType connectionType, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, ascLocation, connectionType, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AllowedConnectionsResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -65,8 +66,8 @@ public Response getWithResponse( } public AllowedConnectionsResource get(String resourceGroupName, String ascLocation, ConnectionType connectionType) { - AllowedConnectionsResourceInner inner = - this.serviceClient().get(resourceGroupName, ascLocation, connectionType); + AllowedConnectionsResourceInner inner + = this.serviceClient().get(resourceGroupName, ascLocation, connectionType); if (inner != null) { return new AllowedConnectionsResourceImpl(inner, this.manager()); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsResourceImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsResourceImpl.java index f53610805f1b..de4ec6bfedfd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsResourceImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AllowedConnectionsResourceImpl.java @@ -16,8 +16,7 @@ public final class AllowedConnectionsResourceImpl implements AllowedConnectionsR private final com.azure.resourcemanager.security.SecurityManager serviceManager; - AllowedConnectionsResourceImpl( - AllowedConnectionsResourceInner innerObject, + AllowedConnectionsResourceImpl(AllowedConnectionsResourceInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionImpl.java new file mode 100644 index 000000000000..658835896f61 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionImpl.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.resourcemanager.security.fluent.models.ApiCollectionInner; +import com.azure.resourcemanager.security.models.ApiCollection; +import com.azure.resourcemanager.security.models.ProvisioningState; + +public final class ApiCollectionImpl implements ApiCollection { + private ApiCollectionInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + ApiCollectionImpl(ApiCollectionInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String discoveredVia() { + return this.innerModel().discoveredVia(); + } + + public String baseUrl() { + return this.innerModel().baseUrl(); + } + + public Long numberOfApiEndpoints() { + return this.innerModel().numberOfApiEndpoints(); + } + + public Long numberOfInactiveApiEndpoints() { + return this.innerModel().numberOfInactiveApiEndpoints(); + } + + public Long numberOfUnauthenticatedApiEndpoints() { + return this.innerModel().numberOfUnauthenticatedApiEndpoints(); + } + + public Long numberOfExternalApiEndpoints() { + return this.innerModel().numberOfExternalApiEndpoints(); + } + + public Long numberOfApiEndpointsWithSensitiveDataExposed() { + return this.innerModel().numberOfApiEndpointsWithSensitiveDataExposed(); + } + + public String sensitivityLabel() { + return this.innerModel().sensitivityLabel(); + } + + public ApiCollectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsClientImpl.java deleted file mode 100644 index ca575de7d8a7..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsClientImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.security.fluent.ApiCollectionOffboardingsClient; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ApiCollectionOffboardingsClient. */ -public final class ApiCollectionOffboardingsClientImpl implements ApiCollectionOffboardingsClient { - /** The proxy service used to perform REST calls. */ - private final ApiCollectionOffboardingsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of ApiCollectionOffboardingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ApiCollectionOffboardingsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - ApiCollectionOffboardingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterApiCollectionOffboardings to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterApiCol") - public interface ApiCollectionOffboardingsService { - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serviceName") String serviceName, - @PathParam("apiCollectionId") String apiCollectionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serviceName, String apiCollectionId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (apiCollectionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter apiCollectionId is required and cannot be null.")); - } - final String apiVersion = "2022-11-20-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiCollectionId, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (apiCollectionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter apiCollectionId is required and cannot be null.")); - } - final String apiVersion = "2022-11-20-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiCollectionId, - apiVersion, - accept, - context); - } - - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String serviceName, String apiCollectionId) { - return deleteWithResponseAsync(resourceGroupName, serviceName, apiCollectionId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - return deleteWithResponseAsync(resourceGroupName, serviceName, apiCollectionId, context).block(); - } - - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String serviceName, String apiCollectionId) { - deleteWithResponse(resourceGroupName, serviceName, apiCollectionId, Context.NONE); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsImpl.java deleted file mode 100644 index 8e6f9091324b..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOffboardingsImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.ApiCollectionOffboardingsClient; -import com.azure.resourcemanager.security.models.ApiCollectionOffboardings; - -public final class ApiCollectionOffboardingsImpl implements ApiCollectionOffboardings { - private static final ClientLogger LOGGER = new ClientLogger(ApiCollectionOffboardingsImpl.class); - - private final ApiCollectionOffboardingsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public ApiCollectionOffboardingsImpl( - ApiCollectionOffboardingsClient innerClient, - com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response deleteWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, serviceName, apiCollectionId, context); - } - - public void delete(String resourceGroupName, String serviceName, String apiCollectionId) { - this.serviceClient().delete(resourceGroupName, serviceName, apiCollectionId); - } - - private ApiCollectionOffboardingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsClientImpl.java deleted file mode 100644 index f2eab89967ab..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsClientImpl.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.security.fluent.ApiCollectionOnboardingsClient; -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ApiCollectionOnboardingsClient. */ -public final class ApiCollectionOnboardingsClientImpl implements ApiCollectionOnboardingsClient { - /** The proxy service used to perform REST calls. */ - private final ApiCollectionOnboardingsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of ApiCollectionOnboardingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ApiCollectionOnboardingsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(ApiCollectionOnboardingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterApiCollectionOnboardings to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterApiCol") - public interface ApiCollectionOnboardingsService { - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serviceName") String serviceName, - @PathParam("apiCollectionId") String apiCollectionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String serviceName, String apiCollectionId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (apiCollectionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter apiCollectionId is required and cannot be null.")); - } - final String apiVersion = "2022-11-20-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiCollectionId, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (apiCollectionId == null) { - return Mono - .error(new IllegalArgumentException("Parameter apiCollectionId is required and cannot be null.")); - } - final String apiVersion = "2022-11-20-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiCollectionId, - apiVersion, - accept, - context); - } - - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String serviceName, String apiCollectionId) { - return createWithResponseAsync(resourceGroupName, serviceName, apiCollectionId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - return createWithResponseAsync(resourceGroupName, serviceName, apiCollectionId, context).block(); - } - - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApiCollectionResponseInner create(String resourceGroupName, String serviceName, String apiCollectionId) { - return createWithResponse(resourceGroupName, serviceName, apiCollectionId, Context.NONE).getValue(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsImpl.java deleted file mode 100644 index 0fc34f165495..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionOnboardingsImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.ApiCollectionOnboardingsClient; -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; -import com.azure.resourcemanager.security.models.ApiCollectionOnboardings; -import com.azure.resourcemanager.security.models.ApiCollectionResponse; - -public final class ApiCollectionOnboardingsImpl implements ApiCollectionOnboardings { - private static final ClientLogger LOGGER = new ClientLogger(ApiCollectionOnboardingsImpl.class); - - private final ApiCollectionOnboardingsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public ApiCollectionOnboardingsImpl( - ApiCollectionOnboardingsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response createWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - Response inner = - this.serviceClient().createWithResponse(resourceGroupName, serviceName, apiCollectionId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApiCollectionResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApiCollectionResponse create(String resourceGroupName, String serviceName, String apiCollectionId) { - ApiCollectionResponseInner inner = this.serviceClient().create(resourceGroupName, serviceName, apiCollectionId); - if (inner != null) { - return new ApiCollectionResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private ApiCollectionOnboardingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionResponseImpl.java deleted file mode 100644 index 1427fdd1513f..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionResponseImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; -import com.azure.resourcemanager.security.models.ApiCollectionResponse; -import java.util.Collections; -import java.util.Map; - -public final class ApiCollectionResponseImpl implements ApiCollectionResponse { - private ApiCollectionResponseInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - ApiCollectionResponseImpl( - ApiCollectionResponseInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public Map additionalData() { - Map inner = this.innerModel().additionalData(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ApiCollectionResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsClientImpl.java index 08310c38ed47..32347f459c68 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsClientImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.security.implementation; +import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; @@ -11,6 +12,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -23,29 +25,40 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.security.fluent.ApiCollectionsClient; -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; -import com.azure.resourcemanager.security.models.ApiCollectionResponseList; +import com.azure.resourcemanager.security.fluent.models.ApiCollectionInner; +import com.azure.resourcemanager.security.models.ApiCollectionList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ApiCollectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ApiCollectionsClient. + */ public final class ApiCollectionsClientImpl implements ApiCollectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ApiCollectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of ApiCollectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ApiCollectionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(ApiCollectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ApiCollectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,75 +69,384 @@ public final class ApiCollectionsClientImpl implements ApiCollectionsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterApiCol") public interface ApiCollectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/apiCollections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/apiCollections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> listByAzureApiManagementService(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serviceName") String serviceName, - @PathParam("apiCollectionId") String apiCollectionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serviceName") String serviceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByAzureApiManagementService(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serviceName") String serviceName, + @PathParam("apiId") String apiId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> onboardAzureApiManagementApi(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serviceName") String serviceName, + @PathParam("apiId") String apiId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> offboardAzureApiManagementApi(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serviceName") String serviceName, + @PathParam("apiId") String apiId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByAzureApiManagementServiceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String serviceName) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByAzureApiManagementServiceSinglePageAsync(String resourceGroupName, String serviceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -133,62 +455,42 @@ private Mono> listSinglePageAsync( if (serviceName == null) { return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); } - final String apiVersion = "2022-11-20-preview"; + final String apiVersion = "2023-11-15"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByAzureApiManagementService(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, serviceName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String serviceName, Context context) { + private Mono> + listByAzureApiManagementServiceSinglePageAsync(String resourceGroupName, String serviceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -197,147 +499,179 @@ private Mono> listSinglePageAsync( if (serviceName == null) { return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); } - final String apiVersion = "2022-11-20-preview"; + final String apiVersion = "2023-11-15"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + .listByAzureApiManagementService(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, serviceName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedFlux}. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String serviceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, serviceName), nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listByAzureApiManagementServiceAsync(String resourceGroupName, + String serviceName) { + return new PagedFlux<>(() -> listByAzureApiManagementServiceSinglePageAsync(resourceGroupName, serviceName), + nextLink -> listByAzureApiManagementServiceNextSinglePageAsync(nextLink)); } /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedFlux}. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String serviceName, Context context) { + private PagedFlux listByAzureApiManagementServiceAsync(String resourceGroupName, + String serviceName, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, serviceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listByAzureApiManagementServiceSinglePageAsync(resourceGroupName, serviceName, context), + nextLink -> listByAzureApiManagementServiceNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedIterable}. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String serviceName) { - return new PagedIterable<>(listAsync(resourceGroupName, serviceName)); + public PagedIterable listByAzureApiManagementService(String resourceGroupName, + String serviceName) { + return new PagedIterable<>(listByAzureApiManagementServiceAsync(resourceGroupName, serviceName)); } /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedIterable}. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String serviceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, serviceName, context)); + public PagedIterable listByAzureApiManagementService(String resourceGroupName, + String serviceName, Context context) { + return new PagedIterable<>(listByAzureApiManagementServiceAsync(resourceGroupName, serviceName, context)); } /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs along with {@link Response} on - * successful completion of {@link Mono}. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serviceName, String apiCollectionId) { + private Mono> getByAzureApiManagementServiceWithResponseAsync(String resourceGroupName, + String serviceName, String apiId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (apiId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiId is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByAzureApiManagementService(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, serviceName, apiId, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByAzureApiManagementServiceWithResponseAsync(String resourceGroupName, + String serviceName, String apiId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -346,60 +680,393 @@ private Mono> getWithResponseAsync( if (serviceName == null) { return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); } - if (apiCollectionId == null) { + if (apiId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiId is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByAzureApiManagementService(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, serviceName, apiId, apiVersion, accept, context); + } + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByAzureApiManagementServiceAsync(String resourceGroupName, String serviceName, + String apiId) { + return getByAzureApiManagementServiceWithResponseAsync(resourceGroupName, serviceName, apiId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByAzureApiManagementServiceWithResponse(String resourceGroupName, + String serviceName, String apiId, Context context) { + return getByAzureApiManagementServiceWithResponseAsync(resourceGroupName, serviceName, apiId, context).block(); + } + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiCollectionInner getByAzureApiManagementService(String resourceGroupName, String serviceName, + String apiId) { + return getByAzureApiManagementServiceWithResponse(resourceGroupName, serviceName, apiId, Context.NONE) + .getValue(); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an API collection as represented by Microsoft Defender for APIs along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> onboardAzureApiManagementApiWithResponseAsync(String resourceGroupName, + String serviceName, String apiId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter apiCollectionId is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); } - final String apiVersion = "2022-11-20-preview"; + if (apiId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiId is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiCollectionId, - apiVersion, - accept, - context)) + .withContext(context -> service.onboardAzureApiManagementApi(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, serviceName, apiId, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs along with {@link Response} on - * successful completion of {@link Mono}. + * @return an API collection as represented by Microsoft Defender for APIs along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { + private Mono>> onboardAzureApiManagementApiWithResponseAsync(String resourceGroupName, + String serviceName, String apiId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (apiId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiId is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.onboardAzureApiManagementApi(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, serviceName, apiId, apiVersion, accept, context); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ApiCollectionInner> + beginOnboardAzureApiManagementApiAsync(String resourceGroupName, String serviceName, String apiId) { + Mono>> mono + = onboardAzureApiManagementApiWithResponseAsync(resourceGroupName, serviceName, apiId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ApiCollectionInner.class, ApiCollectionInner.class, this.client.getContext()); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ApiCollectionInner> beginOnboardAzureApiManagementApiAsync( + String resourceGroupName, String serviceName, String apiId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = onboardAzureApiManagementApiWithResponseAsync(resourceGroupName, serviceName, apiId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ApiCollectionInner.class, ApiCollectionInner.class, context); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ApiCollectionInner> + beginOnboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId) { + return this.beginOnboardAzureApiManagementApiAsync(resourceGroupName, serviceName, apiId).getSyncPoller(); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ApiCollectionInner> + beginOnboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId, Context context) { + return this.beginOnboardAzureApiManagementApiAsync(resourceGroupName, serviceName, apiId, context) + .getSyncPoller(); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an API collection as represented by Microsoft Defender for APIs on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono onboardAzureApiManagementApiAsync(String resourceGroupName, String serviceName, + String apiId) { + return beginOnboardAzureApiManagementApiAsync(resourceGroupName, serviceName, apiId).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an API collection as represented by Microsoft Defender for APIs on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono onboardAzureApiManagementApiAsync(String resourceGroupName, String serviceName, + String apiId, Context context) { + return beginOnboardAzureApiManagementApiAsync(resourceGroupName, serviceName, apiId, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiCollectionInner onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId) { + return onboardAzureApiManagementApiAsync(resourceGroupName, serviceName, apiId).block(); + } + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an API collection as represented by Microsoft Defender for APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiCollectionInner onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId, + Context context) { + return onboardAzureApiManagementApiAsync(resourceGroupName, serviceName, apiId, context).block(); + } + + /** + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> offboardAzureApiManagementApiWithResponseAsync(String resourceGroupName, + String serviceName, String apiId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -408,165 +1075,301 @@ private Mono> getWithResponseAsync( if (serviceName == null) { return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); } - if (apiCollectionId == null) { + if (apiId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiId is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.offboardAzureApiManagementApi(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, serviceName, apiId, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> offboardAzureApiManagementApiWithResponseAsync(String resourceGroupName, + String serviceName, String apiId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter apiCollectionId is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); } - final String apiVersion = "2022-11-20-preview"; + if (apiId == null) { + return Mono.error(new IllegalArgumentException("Parameter apiId is required and cannot be null.")); + } + final String apiVersion = "2023-11-15"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - serviceName, - apiCollectionId, - apiVersion, - accept, - context); + return service.offboardAzureApiManagementApi(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, serviceName, apiId, apiVersion, accept, context); } /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String serviceName, String apiCollectionId) { - return getWithResponseAsync(resourceGroupName, serviceName, apiCollectionId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono offboardAzureApiManagementApiAsync(String resourceGroupName, String serviceName, String apiId) { + return offboardAzureApiManagementApiWithResponseAsync(resourceGroupName, serviceName, apiId) + .flatMap(ignored -> Mono.empty()); } /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - return getWithResponseAsync(resourceGroupName, serviceName, apiCollectionId, context).block(); + public Response offboardAzureApiManagementApiWithResponse(String resourceGroupName, String serviceName, + String apiId, Context context) { + return offboardAzureApiManagementApiWithResponseAsync(resourceGroupName, serviceName, apiId, context).block(); } /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApiCollectionResponseInner get(String resourceGroupName, String serviceName, String apiCollectionId) { - return getWithResponse(resourceGroupName, serviceName, apiCollectionId, Context.NONE).getValue(); + public void offboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId) { + offboardAzureApiManagementApiWithResponse(resourceGroupName, serviceName, apiId, Context.NONE); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a list of API collections as represented by Defender for APIs along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return page of a list of API collections as represented by Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a list of API collections as represented by Defender for APIs along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return page of a list of API collections as represented by Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return page of a list of API collections as represented by Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return page of a list of API collections as represented by Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return page of a list of API collections as represented by Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByAzureApiManagementServiceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByAzureApiManagementServiceNext(nextLink, this.client.getEndpoint(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return page of a list of API collections as represented by Microsoft Defender for APIs along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAzureApiManagementServiceNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByAzureApiManagementServiceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsImpl.java index 336ea9d21801..812edc7418b6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApiCollectionsImpl.java @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.security.fluent.ApiCollectionsClient; -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; -import com.azure.resourcemanager.security.models.ApiCollectionResponse; +import com.azure.resourcemanager.security.fluent.models.ApiCollectionInner; +import com.azure.resourcemanager.security.models.ApiCollection; import com.azure.resourcemanager.security.models.ApiCollections; public final class ApiCollectionsImpl implements ApiCollections { @@ -21,47 +21,98 @@ public final class ApiCollectionsImpl implements ApiCollections { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public ApiCollectionsImpl( - ApiCollectionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public ApiCollectionsImpl(ApiCollectionsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String serviceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, serviceName); - return Utils.mapPage(inner, inner1 -> new ApiCollectionResponseImpl(inner1, this.manager())); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String serviceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, serviceName, context); - return Utils.mapPage(inner, inner1 -> new ApiCollectionResponseImpl(inner1, this.manager())); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, serviceName, apiCollectionId, context); + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager())); + } + + public PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName) { + PagedIterable inner + = this.serviceClient().listByAzureApiManagementService(resourceGroupName, serviceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager())); + } + + public PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName, + Context context) { + PagedIterable inner + = this.serviceClient().listByAzureApiManagementService(resourceGroupName, serviceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager())); + } + + public Response getByAzureApiManagementServiceWithResponse(String resourceGroupName, + String serviceName, String apiId, Context context) { + Response inner = this.serviceClient() + .getByAzureApiManagementServiceWithResponse(resourceGroupName, serviceName, apiId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApiCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ApiCollection getByAzureApiManagementService(String resourceGroupName, String serviceName, String apiId) { + ApiCollectionInner inner + = this.serviceClient().getByAzureApiManagementService(resourceGroupName, serviceName, apiId); + if (inner != null) { + return new ApiCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public ApiCollection onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId) { + ApiCollectionInner inner + = this.serviceClient().onboardAzureApiManagementApi(resourceGroupName, serviceName, apiId); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApiCollectionResponseImpl(inner.getValue(), this.manager())); + return new ApiCollectionImpl(inner, this.manager()); } else { return null; } } - public ApiCollectionResponse get(String resourceGroupName, String serviceName, String apiCollectionId) { - ApiCollectionResponseInner inner = this.serviceClient().get(resourceGroupName, serviceName, apiCollectionId); + public ApiCollection onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId, + Context context) { + ApiCollectionInner inner + = this.serviceClient().onboardAzureApiManagementApi(resourceGroupName, serviceName, apiId, context); if (inner != null) { - return new ApiCollectionResponseImpl(inner, this.manager()); + return new ApiCollectionImpl(inner, this.manager()); } else { return null; } } + public Response offboardAzureApiManagementApiWithResponse(String resourceGroupName, String serviceName, + String apiId, Context context) { + return this.serviceClient().offboardAzureApiManagementApiWithResponse(resourceGroupName, serviceName, apiId, + context); + } + + public void offboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId) { + this.serviceClient().offboardAzureApiManagementApi(resourceGroupName, serviceName, apiId); + } + private ApiCollectionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationImpl.java index 6bb5827d3d18..b7aec34108ce 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationImpl.java @@ -60,22 +60,14 @@ private com.azure.resourcemanager.security.SecurityManager manager() { private String applicationId; public Application create() { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationOperations() - .createOrUpdateWithResponse(applicationId, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getApplicationOperations() + .createOrUpdateWithResponse(applicationId, this.innerModel(), Context.NONE).getValue(); return this; } public Application create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationOperations() - .createOrUpdateWithResponse(applicationId, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getApplicationOperations() + .createOrUpdateWithResponse(applicationId, this.innerModel(), context).getValue(); return this; } @@ -90,48 +82,32 @@ public ApplicationImpl update() { } public Application apply() { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationOperations() - .createOrUpdateWithResponse(applicationId, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getApplicationOperations() + .createOrUpdateWithResponse(applicationId, this.innerModel(), Context.NONE).getValue(); return this; } public Application apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationOperations() - .createOrUpdateWithResponse(applicationId, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getApplicationOperations() + .createOrUpdateWithResponse(applicationId, this.innerModel(), context).getValue(); return this; } ApplicationImpl(ApplicationInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.applicationId = Utils.getValueFromIdByName(innerObject.id(), "applications"); + this.applicationId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applications"); } public Application refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationOperations() - .getWithResponse(applicationId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getApplicationOperations() + .getWithResponse(applicationId, Context.NONE).getValue(); return this; } public Application refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationOperations() - .getWithResponse(applicationId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getApplicationOperations() + .getWithResponse(applicationId, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsClientImpl.java index 4a46f329ee11..2dee16d2c2d3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsClientImpl.java @@ -28,23 +28,28 @@ import com.azure.resourcemanager.security.fluent.models.ApplicationInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ApplicationOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ApplicationOperationsClient. + */ public final class ApplicationOperationsClientImpl implements ApplicationOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ApplicationOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of ApplicationOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ApplicationOperationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(ApplicationOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ApplicationOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -55,66 +60,52 @@ public final class ApplicationOperationsClientImpl implements ApplicationOperati @Host("{$host}") @ServiceInterface(name = "SecurityCenterApplic") public interface ApplicationOperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("applicationId") String applicationId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("applicationId") String applicationId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("applicationId") String applicationId, - @BodyParam("application/json") ApplicationInner application, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInner application, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}") - @ExpectedResponses({200, 204}) + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("applicationId") String applicationId, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("applicationId") String applicationId, Context context); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific application for the requested scope by applicationId along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String applicationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (applicationId == null) { return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); @@ -122,43 +113,31 @@ private Mono> getWithResponseAsync(String application final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - applicationId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + applicationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific application for the requested scope by applicationId along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String applicationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (applicationId == null) { return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); @@ -166,14 +145,13 @@ private Mono> getWithResponseAsync(String application final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), applicationId, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), applicationId, + accept, context); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -187,7 +165,7 @@ private Mono getAsync(String applicationId) { /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -202,7 +180,7 @@ public Response getWithResponse(String applicationId, Context /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -216,29 +194,25 @@ public ApplicationInner get(String applicationId) { /** * Creates or update a security application on the given subscription. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security Application over a given scope along with {@link Response} on successful completion of {@link - * Mono}. + * @return security Application over a given scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String applicationId, ApplicationInner application) { + private Mono> createOrUpdateWithResponseAsync(String applicationId, + ApplicationInner application) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (applicationId == null) { return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); @@ -251,46 +225,33 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - applicationId, - application, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), applicationId, application, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or update a security application on the given subscription. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security Application over a given scope along with {@link Response} on successful completion of {@link - * Mono}. + * @return security Application over a given scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String applicationId, ApplicationInner application, Context context) { + private Mono> createOrUpdateWithResponseAsync(String applicationId, + ApplicationInner application, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (applicationId == null) { return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); @@ -303,20 +264,13 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - applicationId, - application, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + applicationId, application, accept, context); } /** * Creates or update a security application on the given subscription. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -332,7 +286,7 @@ private Mono createOrUpdateAsync(String applicationId, Applica /** * Creates or update a security application on the given subscription. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @param context The context to associate with this operation. @@ -342,14 +296,14 @@ private Mono createOrUpdateAsync(String applicationId, Applica * @return security Application over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String applicationId, ApplicationInner application, Context context) { + public Response createOrUpdateWithResponse(String applicationId, ApplicationInner application, + Context context) { return createOrUpdateWithResponseAsync(applicationId, application, context).block(); } /** * Creates or update a security application on the given subscription. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -364,7 +318,7 @@ public ApplicationInner createOrUpdate(String applicationId, ApplicationInner ap /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -374,37 +328,26 @@ public ApplicationInner createOrUpdate(String applicationId, ApplicationInner ap @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String applicationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (applicationId == null) { return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); } final String apiVersion = "2022-07-01-preview"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - applicationId, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), applicationId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -415,29 +358,25 @@ private Mono> deleteWithResponseAsync(String applicationId) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String applicationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (applicationId == null) { return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); } final String apiVersion = "2022-07-01-preview"; context = this.client.mergeContext(context); - return service - .delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), applicationId, context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), applicationId, + context); } /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -451,7 +390,7 @@ private Mono deleteAsync(String applicationId) { /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -466,7 +405,7 @@ public Response deleteWithResponse(String applicationId, Context context) /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsImpl.java index 7d6d4ab2601b..fb1cc5d536bb 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationOperationsImpl.java @@ -20,8 +20,8 @@ public final class ApplicationOperationsImpl implements ApplicationOperations { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public ApplicationOperationsImpl( - ApplicationOperationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public ApplicationOperationsImpl(ApplicationOperationsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -29,10 +29,7 @@ public ApplicationOperationsImpl( public Response getWithResponse(String applicationId, Context context) { Response inner = this.serviceClient().getWithResponse(applicationId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationImpl(inner.getValue(), this.manager())); } else { return null; @@ -57,45 +54,37 @@ public void delete(String applicationId) { } public Application getById(String id) { - String applicationId = Utils.getValueFromIdByName(id, "applications"); + String applicationId = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } return this.getWithResponse(applicationId, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String applicationId = Utils.getValueFromIdByName(id, "applications"); + String applicationId = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } return this.getWithResponse(applicationId, context); } public void deleteById(String id) { - String applicationId = Utils.getValueFromIdByName(id, "applications"); + String applicationId = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } this.deleteWithResponse(applicationId, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String applicationId = Utils.getValueFromIdByName(id, "applications"); + String applicationId = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } return this.deleteWithResponse(applicationId, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsClientImpl.java index b604de04135a..7462cc2038ff 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsClientImpl.java @@ -30,142 +30,117 @@ import com.azure.resourcemanager.security.models.ApplicationsList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ApplicationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ApplicationsClient. + */ public final class ApplicationsClientImpl implements ApplicationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ApplicationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of ApplicationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ApplicationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterApplications to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for SecurityCenterApplications to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterApplic") public interface ApplicationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get a list of all relevant applications over a subscription level scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a subscription level scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of all relevant applications over a subscription level scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a subscription level scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of all relevant applications over a subscription level scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedFlux}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -174,27 +149,27 @@ private PagedFlux listAsync() { /** * Get a list of all relevant applications over a subscription level scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedFlux}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a list of all relevant applications over a subscription level scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedIterable}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -203,13 +178,13 @@ public PagedIterable list() { /** * Get a list of all relevant applications over a subscription level scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedIterable}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -218,14 +193,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a security applications list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a security applications list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -233,37 +209,28 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a security applications list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a security applications list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -271,23 +238,13 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsImpl.java index 190bf422bb85..94842779359e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ApplicationsImpl.java @@ -19,20 +19,20 @@ public final class ApplicationsImpl implements Applications { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public ApplicationsImpl( - ApplicationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public ApplicationsImpl(ApplicationsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } private ApplicationsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsClientImpl.java index 2cbcb3ac9e6c..fe1d978241cf 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsClientImpl.java @@ -35,22 +35,28 @@ import com.azure.resourcemanager.security.models.SecurityAssessmentList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in AssessmentsClient. + */ public final class AssessmentsClientImpl implements AssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AssessmentsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(AssessmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(AssessmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,84 +67,67 @@ public final class AssessmentsClientImpl implements AssessmentsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterAssess") public interface AssessmentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/assessments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("assessmentName") String assessmentName, - @QueryParam("$expand") ExpandEnum expand, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("assessmentName") String assessmentName, @QueryParam("$expand") ExpandEnum expand, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, @PathParam("assessmentName") String assessmentName, - @BodyParam("application/json") SecurityAssessment assessment, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecurityAssessment assessment, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}") - @ExpectedResponses({200, 204}) + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("assessmentName") String assessmentName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("assessmentName") String assessmentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security assessments on all your scanned resources inside a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -147,37 +136,28 @@ private Mono> listSinglePageAsync final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security assessments on all your scanned resources inside a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -185,29 +165,21 @@ private Mono> listSinglePageAsync final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedFlux}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope) { @@ -216,32 +188,32 @@ private PagedFlux listAsync(String scope) { /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedFlux}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope) { @@ -250,15 +222,15 @@ public PagedIterable list(String scope) { /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope, Context context) { @@ -267,7 +239,7 @@ public PagedIterable list(String scope, Context /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param expand OData expand. Optional. @@ -275,16 +247,14 @@ public PagedIterable list(String scope, Context * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a security assessment on your scanned resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceId, String assessmentName, ExpandEnum expand) { + private Mono> getWithResponseAsync(String resourceId, + String assessmentName, ExpandEnum expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -295,17 +265,14 @@ private Mono> getWithResponseAsync( final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), apiVersion, resourceId, assessmentName, expand, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, resourceId, assessmentName, + expand, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param expand OData expand. Optional. @@ -314,16 +281,14 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a security assessment on your scanned resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceId, String assessmentName, ExpandEnum expand, Context context) { + private Mono> getWithResponseAsync(String resourceId, + String assessmentName, ExpandEnum expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -339,7 +304,7 @@ private Mono> getWithResponseAsync( /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -356,7 +321,7 @@ private Mono getAsync(String resourceId, String /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param expand OData expand. Optional. @@ -367,14 +332,14 @@ private Mono getAsync(String resourceId, String * @return a security assessment on your scanned resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceId, String assessmentName, ExpandEnum expand, Context context) { + public Response getWithResponse(String resourceId, String assessmentName, + ExpandEnum expand, Context context) { return getWithResponseAsync(resourceId, assessmentName, expand, context).block(); } /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -391,7 +356,7 @@ public SecurityAssessmentResponseInner get(String resourceId, String assessmentN /** * Create a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param assessment Calculated assessment on a pre-defined assessment metadata. @@ -399,16 +364,14 @@ public SecurityAssessmentResponseInner get(String resourceId, String assessmentN * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security assessment on a resource - response format along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceId, String assessmentName, SecurityAssessment assessment) { + private Mono> createOrUpdateWithResponseAsync(String resourceId, + String assessmentName, SecurityAssessment assessment) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -424,24 +387,15 @@ private Mono> createOrUpdateWithRespon final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - resourceId, - assessmentName, - assessment, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, resourceId, + assessmentName, assessment, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param assessment Calculated assessment on a pre-defined assessment metadata. @@ -450,16 +404,14 @@ private Mono> createOrUpdateWithRespon * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security assessment on a resource - response format along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceId, String assessmentName, SecurityAssessment assessment, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceId, + String assessmentName, SecurityAssessment assessment, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -475,15 +427,14 @@ private Mono> createOrUpdateWithRespon final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), apiVersion, resourceId, assessmentName, assessment, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, resourceId, assessmentName, assessment, + accept, context); } /** * Create a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param assessment Calculated assessment on a pre-defined assessment metadata. @@ -493,8 +444,8 @@ private Mono> createOrUpdateWithRespon * @return security assessment on a resource - response format on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceId, String assessmentName, SecurityAssessment assessment) { + private Mono createOrUpdateAsync(String resourceId, String assessmentName, + SecurityAssessment assessment) { return createOrUpdateWithResponseAsync(resourceId, assessmentName, assessment) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -502,7 +453,7 @@ private Mono createOrUpdateAsync( /** * Create a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param assessment Calculated assessment on a pre-defined assessment metadata. @@ -513,15 +464,15 @@ private Mono createOrUpdateAsync( * @return security assessment on a resource - response format along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceId, String assessmentName, SecurityAssessment assessment, Context context) { + public Response createOrUpdateWithResponse(String resourceId, + String assessmentName, SecurityAssessment assessment, Context context) { return createOrUpdateWithResponseAsync(resourceId, assessmentName, assessment, context).block(); } /** * Create a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param assessment Calculated assessment on a pre-defined assessment metadata. @@ -531,15 +482,15 @@ public Response createOrUpdateWithResponse( * @return security assessment on a resource - response format. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityAssessmentResponseInner createOrUpdate( - String resourceId, String assessmentName, SecurityAssessment assessment) { + public SecurityAssessmentResponseInner createOrUpdate(String resourceId, String assessmentName, + SecurityAssessment assessment) { return createOrUpdateWithResponse(resourceId, assessmentName, assessment, Context.NONE).getValue(); } /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -550,10 +501,8 @@ public SecurityAssessmentResponseInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceId, String assessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -564,16 +513,15 @@ private Mono> deleteWithResponseAsync(String resourceId, String a final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.delete(this.client.getEndpoint(), apiVersion, resourceId, assessmentName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, resourceId, assessmentName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. @@ -585,10 +533,8 @@ private Mono> deleteWithResponseAsync(String resourceId, String a @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceId, String assessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -605,7 +551,7 @@ private Mono> deleteWithResponseAsync(String resourceId, String a /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -621,7 +567,7 @@ private Mono deleteAsync(String resourceId, String assessmentName) { /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. @@ -638,7 +584,7 @@ public Response deleteWithResponse(String resourceId, String assessmentNam /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -652,14 +598,15 @@ public void delete(String resourceId, String assessmentName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a security assessments list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a security assessments list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -667,62 +614,43 @@ private Mono> listNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a security assessments list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a security assessments list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsImpl.java index 0e5cc1fb108d..e0843e5ad750 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsImpl.java @@ -22,31 +22,30 @@ public final class AssessmentsImpl implements Assessments { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AssessmentsImpl( - AssessmentsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public AssessmentsImpl(AssessmentsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String scope) { PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new SecurityAssessmentResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecurityAssessmentResponseImpl(inner1, this.manager())); } public PagedIterable list(String scope, Context context) { PagedIterable inner = this.serviceClient().list(scope, context); - return Utils.mapPage(inner, inner1 -> new SecurityAssessmentResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecurityAssessmentResponseImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceId, String assessmentName, ExpandEnum expand, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceId, assessmentName, expand, context); + public Response getWithResponse(String resourceId, String assessmentName, + ExpandEnum expand, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceId, assessmentName, expand, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityAssessmentResponseImpl(inner.getValue(), this.manager())); } else { return null; @@ -71,98 +70,66 @@ public void deleteByResourceGroup(String resourceId, String assessmentName) { } public SecurityAssessmentResponse getById(String id) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } ExpandEnum localExpand = null; return this.getWithResponse(resourceId, assessmentName, localExpand, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, ExpandEnum expand, Context context) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } return this.getWithResponse(resourceId, assessmentName, expand, context); } public void deleteById(String id) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } this.deleteByResourceGroupWithResponse(resourceId, assessmentName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } return this.deleteByResourceGroupWithResponse(resourceId, assessmentName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasClientImpl.java index 77bbc5dbcc38..31e296e55c85 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasClientImpl.java @@ -33,193 +33,158 @@ import com.azure.resourcemanager.security.models.SecurityAssessmentMetadataResponseList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AssessmentsMetadatasClient. */ +/** + * An instance of this class provides access to all the operations defined in AssessmentsMetadatasClient. + */ public final class AssessmentsMetadatasClientImpl implements AssessmentsMetadatasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AssessmentsMetadatasService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AssessmentsMetadatasClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AssessmentsMetadatasClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(AssessmentsMetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AssessmentsMetadatasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterAssessmentsMetadatas to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for SecurityCenterAssessmentsMetadatas to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterAssess") public interface AssessmentsMetadatasService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Security/assessmentMetadata") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("assessmentMetadataName") String assessmentMetadataName, - @HeaderParam("Accept") String accept, + @PathParam("assessmentMetadataName") String assessmentMetadataName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscription( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> listBySubscription(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getInSubscription( - @HostParam("$host") String endpoint, + Mono> getInSubscription(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("assessmentMetadataName") String assessmentMetadataName, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createInSubscription( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("assessmentMetadataName") String assessmentMetadataName, @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") SecurityAssessmentMetadataResponseInner assessmentMetadata, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentMetadata/{assessmentMetadataName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteInSubscription( - @HostParam("$host") String endpoint, + Mono> deleteInSubscription(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("assessmentMetadataName") String assessmentMetadataName, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get metadata information on all assessment types. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get metadata information on all assessment types. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get metadata information on all assessment types. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types as paginated response with {@link PagedFlux}. @@ -231,7 +196,7 @@ private PagedFlux listAsync() { /** * Get metadata information on all assessment types. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -240,13 +205,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get metadata information on all assessment types. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types as paginated response with {@link PagedIterable}. @@ -258,7 +223,7 @@ public PagedIterable list() { /** * Get metadata information on all assessment types. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -272,27 +237,24 @@ public PagedIterable list(Context conte /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on an assessment type along with {@link Response} on successful completion of {@link - * Mono}. + * @return metadata information on an assessment type along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String assessmentMetadataName) { + private Mono> + getWithResponseAsync(String assessmentMetadataName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; @@ -304,28 +266,25 @@ private Mono> getWithResponseA /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on an assessment type along with {@link Response} on successful completion of {@link - * Mono}. + * @return metadata information on an assessment type along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String assessmentMetadataName, Context context) { + private Mono> getWithResponseAsync(String assessmentMetadataName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; @@ -335,7 +294,7 @@ private Mono> getWithResponseA /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -349,7 +308,7 @@ private Mono getAsync(String assessment /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -358,14 +317,14 @@ private Mono getAsync(String assessment * @return metadata information on an assessment type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String assessmentMetadataName, Context context) { + public Response getWithResponse(String assessmentMetadataName, + Context context) { return getWithResponseAsync(assessmentMetadataName, context).block(); } /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -379,125 +338,100 @@ public SecurityAssessmentMetadataResponseInner get(String assessmentMetadataName /** * Get metadata information on all assessment types in a specific subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types in a specific subscription along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listBySubscription( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listBySubscription(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get metadata information on all assessment types in a specific subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types in a specific subscription along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionSinglePageAsync( - Context context) { + private Mono> + listBySubscriptionSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .listBySubscription(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get metadata information on all assessment types in a specific subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedFlux}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySubscriptionAsync() { - return new PagedFlux<>( - () -> listBySubscriptionSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Get metadata information on all assessment types in a specific subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedFlux}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySubscriptionAsync(Context context) { - return new PagedFlux<>( - () -> listBySubscriptionSinglePageAsync(context), + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Get metadata information on all assessment types in a specific subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedIterable}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySubscription() { @@ -506,13 +440,13 @@ public PagedIterable listBySubscription /** * Get metadata information on all assessment types in a specific subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedIterable}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySubscription(Context context) { @@ -521,103 +455,79 @@ public PagedIterable listBySubscription /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on an assessment type in a specific subscription along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInSubscriptionWithResponseAsync( - String assessmentMetadataName) { + private Mono> + getInSubscriptionWithResponseAsync(String assessmentMetadataName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getInSubscription( - this.client.getEndpoint(), - apiVersion, - assessmentMetadataName, - this.client.getSubscriptionId(), - accept, - context)) + .withContext(context -> service.getInSubscription(this.client.getEndpoint(), apiVersion, + assessmentMetadataName, this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on an assessment type in a specific subscription along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInSubscriptionWithResponseAsync( - String assessmentMetadataName, Context context) { + private Mono> + getInSubscriptionWithResponseAsync(String assessmentMetadataName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getInSubscription( - this.client.getEndpoint(), - apiVersion, - assessmentMetadataName, - this.client.getSubscriptionId(), - accept, - context); + return service.getInSubscription(this.client.getEndpoint(), apiVersion, assessmentMetadataName, + this.client.getSubscriptionId(), accept, context); } /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on an assessment type in a specific subscription on successful completion of {@link - * Mono}. + * @return metadata information on an assessment type in a specific subscription on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getInSubscriptionAsync(String assessmentMetadataName) { @@ -627,7 +537,7 @@ private Mono getInSubscriptionAsync(Str /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -636,14 +546,14 @@ private Mono getInSubscriptionAsync(Str * @return metadata information on an assessment type in a specific subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getInSubscriptionWithResponse( - String assessmentMetadataName, Context context) { + public Response + getInSubscriptionWithResponse(String assessmentMetadataName, Context context) { return getInSubscriptionWithResponseAsync(assessmentMetadataName, context).block(); } /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -657,34 +567,29 @@ public SecurityAssessmentMetadataResponseInner getInSubscription(String assessme /** * Create metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param assessmentMetadata AssessmentMetadata object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessment metadata response along with {@link Response} on successful completion of {@link - * Mono}. + * @return security assessment metadata response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createInSubscriptionWithResponseAsync( String assessmentMetadataName, SecurityAssessmentMetadataResponseInner assessmentMetadata) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (assessmentMetadata == null) { return Mono @@ -695,51 +600,37 @@ private Mono> createInSubscrip final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createInSubscription( - this.client.getEndpoint(), - apiVersion, - assessmentMetadataName, - this.client.getSubscriptionId(), - assessmentMetadata, - accept, - context)) + .withContext(context -> service.createInSubscription(this.client.getEndpoint(), apiVersion, + assessmentMetadataName, this.client.getSubscriptionId(), assessmentMetadata, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param assessmentMetadata AssessmentMetadata object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessment metadata response along with {@link Response} on successful completion of {@link - * Mono}. + * @return security assessment metadata response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createInSubscriptionWithResponseAsync( String assessmentMetadataName, SecurityAssessmentMetadataResponseInner assessmentMetadata, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (assessmentMetadata == null) { return Mono @@ -750,20 +641,13 @@ private Mono> createInSubscrip final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createInSubscription( - this.client.getEndpoint(), - apiVersion, - assessmentMetadataName, - this.client.getSubscriptionId(), - assessmentMetadata, - accept, - context); + return service.createInSubscription(this.client.getEndpoint(), apiVersion, assessmentMetadataName, + this.client.getSubscriptionId(), assessmentMetadata, accept, context); } /** * Create metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param assessmentMetadata AssessmentMetadata object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -772,15 +656,15 @@ private Mono> createInSubscrip * @return security assessment metadata response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createInSubscriptionAsync( - String assessmentMetadataName, SecurityAssessmentMetadataResponseInner assessmentMetadata) { + private Mono createInSubscriptionAsync(String assessmentMetadataName, + SecurityAssessmentMetadataResponseInner assessmentMetadata) { return createInSubscriptionWithResponseAsync(assessmentMetadataName, assessmentMetadata) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param assessmentMetadata AssessmentMetadata object. * @param context The context to associate with this operation. @@ -797,7 +681,7 @@ public Response createInSubscriptionWit /** * Create metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param assessmentMetadata AssessmentMetadata object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -806,15 +690,15 @@ public Response createInSubscriptionWit * @return security assessment metadata response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityAssessmentMetadataResponseInner createInSubscription( - String assessmentMetadataName, SecurityAssessmentMetadataResponseInner assessmentMetadata) { + public SecurityAssessmentMetadataResponseInner createInSubscription(String assessmentMetadataName, + SecurityAssessmentMetadataResponseInner assessmentMetadata) { return createInSubscriptionWithResponse(assessmentMetadataName, assessmentMetadata, Context.NONE).getValue(); } /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -824,42 +708,29 @@ public SecurityAssessmentMetadataResponseInner createInSubscription( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteInSubscriptionWithResponseAsync(String assessmentMetadataName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteInSubscription( - this.client.getEndpoint(), - apiVersion, - assessmentMetadataName, - this.client.getSubscriptionId(), - accept, - context)) + .withContext(context -> service.deleteInSubscription(this.client.getEndpoint(), apiVersion, + assessmentMetadataName, this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -870,39 +741,28 @@ private Mono> deleteInSubscriptionWithResponseAsync(String assess @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteInSubscriptionWithResponseAsync(String assessmentMetadataName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (assessmentMetadataName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deleteInSubscription( - this.client.getEndpoint(), - apiVersion, - assessmentMetadataName, - this.client.getSubscriptionId(), - accept, - context); + return service.deleteInSubscription(this.client.getEndpoint(), apiVersion, assessmentMetadataName, + this.client.getSubscriptionId(), accept, context); } /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -917,7 +777,7 @@ private Mono deleteInSubscriptionAsync(String assessmentMetadataName) { /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -933,7 +793,7 @@ public Response deleteInSubscriptionWithResponse(String assessmentMetadata /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -946,14 +806,15 @@ public void deleteInSubscription(String assessmentMetadataName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -961,140 +822,106 @@ private Mono> listNextSin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink) { + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security assessment metadata along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasImpl.java index 5a878349df35..6ddb28434bef 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AssessmentsMetadatasImpl.java @@ -21,31 +21,30 @@ public final class AssessmentsMetadatasImpl implements AssessmentsMetadatas { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AssessmentsMetadatasImpl( - AssessmentsMetadatasClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public AssessmentsMetadatasImpl(AssessmentsMetadatasClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); } - public Response getWithResponse( - String assessmentMetadataName, Context context) { - Response inner = - this.serviceClient().getWithResponse(assessmentMetadataName, context); + public Response getWithResponse(String assessmentMetadataName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(assessmentMetadataName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityAssessmentMetadataResponseImpl(inner.getValue(), this.manager())); } else { return null; @@ -63,23 +62,22 @@ public SecurityAssessmentMetadataResponse get(String assessmentMetadataName) { public PagedIterable listBySubscription() { PagedIterable inner = this.serviceClient().listBySubscription(); - return Utils.mapPage(inner, inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); } public PagedIterable listBySubscription(Context context) { PagedIterable inner = this.serviceClient().listBySubscription(context); - return Utils.mapPage(inner, inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecurityAssessmentMetadataResponseImpl(inner1, this.manager())); } - public Response getInSubscriptionWithResponse( - String assessmentMetadataName, Context context) { - Response inner = - this.serviceClient().getInSubscriptionWithResponse(assessmentMetadataName, context); + public Response getInSubscriptionWithResponse(String assessmentMetadataName, + Context context) { + Response inner + = this.serviceClient().getInSubscriptionWithResponse(assessmentMetadataName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityAssessmentMetadataResponseImpl(inner.getValue(), this.manager())); } else { return null; @@ -104,53 +102,37 @@ public void deleteInSubscription(String assessmentMetadataName) { } public SecurityAssessmentMetadataResponse getInSubscriptionById(String id) { - String assessmentMetadataName = Utils.getValueFromIdByName(id, "assessmentMetadata"); + String assessmentMetadataName = ResourceManagerUtils.getValueFromIdByName(id, "assessmentMetadata"); if (assessmentMetadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); } return this.getInSubscriptionWithResponse(assessmentMetadataName, Context.NONE).getValue(); } public Response getInSubscriptionByIdWithResponse(String id, Context context) { - String assessmentMetadataName = Utils.getValueFromIdByName(id, "assessmentMetadata"); + String assessmentMetadataName = ResourceManagerUtils.getValueFromIdByName(id, "assessmentMetadata"); if (assessmentMetadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); } return this.getInSubscriptionWithResponse(assessmentMetadataName, context); } public void deleteInSubscriptionById(String id) { - String assessmentMetadataName = Utils.getValueFromIdByName(id, "assessmentMetadata"); + String assessmentMetadataName = ResourceManagerUtils.getValueFromIdByName(id, "assessmentMetadata"); if (assessmentMetadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); } this.deleteInSubscriptionWithResponse(assessmentMetadataName, Context.NONE); } public Response deleteInSubscriptionByIdWithResponse(String id, Context context) { - String assessmentMetadataName = Utils.getValueFromIdByName(id, "assessmentMetadata"); + String assessmentMetadataName = ResourceManagerUtils.getValueFromIdByName(id, "assessmentMetadata"); if (assessmentMetadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessmentMetadata'.", id))); } return this.deleteInSubscriptionWithResponse(assessmentMetadataName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingImpl.java index 896c6cbf9791..8837be6b785c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingImpl.java @@ -14,8 +14,8 @@ public final class AutoProvisioningSettingImpl implements AutoProvisioningSettin private final com.azure.resourcemanager.security.SecurityManager serviceManager; - AutoProvisioningSettingImpl( - AutoProvisioningSettingInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + AutoProvisioningSettingImpl(AutoProvisioningSettingInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -47,22 +47,14 @@ private com.azure.resourcemanager.security.SecurityManager manager() { private String settingName; public AutoProvisioningSetting create() { - this.innerObject = - serviceManager - .serviceClient() - .getAutoProvisioningSettings() - .createWithResponse(settingName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutoProvisioningSettings() + .createWithResponse(settingName, this.innerModel(), Context.NONE).getValue(); return this; } public AutoProvisioningSetting create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutoProvisioningSettings() - .createWithResponse(settingName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutoProvisioningSettings() + .createWithResponse(settingName, this.innerModel(), context).getValue(); return this; } @@ -73,22 +65,14 @@ public AutoProvisioningSetting create(Context context) { } public AutoProvisioningSetting refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAutoProvisioningSettings() - .getWithResponse(settingName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutoProvisioningSettings() + .getWithResponse(settingName, Context.NONE).getValue(); return this; } public AutoProvisioningSetting refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutoProvisioningSettings() - .getWithResponse(settingName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutoProvisioningSettings() + .getWithResponse(settingName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsClientImpl.java index 9c600ec6bd5d..d5562f17e13f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsClientImpl.java @@ -32,23 +32,28 @@ import com.azure.resourcemanager.security.models.AutoProvisioningSettingList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AutoProvisioningSettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in AutoProvisioningSettingsClient. + */ public final class AutoProvisioningSettingsClientImpl implements AutoProvisioningSettingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AutoProvisioningSettingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AutoProvisioningSettingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AutoProvisioningSettingsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(AutoProvisioningSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AutoProvisioningSettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -59,137 +64,100 @@ public final class AutoProvisioningSettingsClientImpl implements AutoProvisionin @Host("{$host}") @ServiceInterface(name = "SecurityCenterAutoPr") public interface AutoProvisioningSettingsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("settingName") String settingName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("settingName") String settingName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("settingName") String settingName, - @BodyParam("application/json") AutoProvisioningSettingInner setting, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutoProvisioningSettingInner setting, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response as paginated response with {@link PagedFlux}. @@ -201,7 +169,7 @@ private PagedFlux listAsync() { /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -210,13 +178,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response as paginated response with {@link PagedIterable}. @@ -228,7 +196,7 @@ public PagedIterable list() { /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -242,7 +210,7 @@ public PagedIterable list(Context context) { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -252,16 +220,12 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String settingName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -269,22 +233,14 @@ private Mono> getWithResponseAsync(String final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - settingName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + settingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -295,16 +251,12 @@ private Mono> getWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String settingName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -312,13 +264,13 @@ private Mono> getWithResponseAsync(String final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingName, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingName, accept, + context); } /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -332,7 +284,7 @@ private Mono getAsync(String settingName) { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -347,7 +299,7 @@ public Response getWithResponse(String settingName /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -361,7 +313,7 @@ public AutoProvisioningSettingInner get(String settingName) { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param setting Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -370,19 +322,15 @@ public AutoProvisioningSettingInner get(String settingName) { * @return auto provisioning setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String settingName, AutoProvisioningSettingInner setting) { + private Mono> createWithResponseAsync(String settingName, + AutoProvisioningSettingInner setting) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -395,23 +343,14 @@ private Mono> createWithResponseAsync( final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - settingName, - setting, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), settingName, setting, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param setting Auto provisioning setting key. * @param context The context to associate with this operation. @@ -421,19 +360,15 @@ private Mono> createWithResponseAsync( * @return auto provisioning setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String settingName, AutoProvisioningSettingInner setting, Context context) { + private Mono> createWithResponseAsync(String settingName, + AutoProvisioningSettingInner setting, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -446,20 +381,13 @@ private Mono> createWithResponseAsync( final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - settingName, - setting, - accept, - context); + return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingName, + setting, accept, context); } /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param setting Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -474,7 +402,7 @@ private Mono createAsync(String settingName, AutoP /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param setting Auto provisioning setting key. * @param context The context to associate with this operation. @@ -484,14 +412,14 @@ private Mono createAsync(String settingName, AutoP * @return auto provisioning setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String settingName, AutoProvisioningSettingInner setting, Context context) { + public Response createWithResponse(String settingName, + AutoProvisioningSettingInner setting, Context context) { return createWithResponseAsync(settingName, setting, context).block(); } /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param setting Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -506,14 +434,15 @@ public AutoProvisioningSettingInner create(String settingName, AutoProvisioningS /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -521,62 +450,43 @@ private Mono> listNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsImpl.java index 7d284eeb293e..6f422238d33e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutoProvisioningSettingsImpl.java @@ -21,29 +21,26 @@ public final class AutoProvisioningSettingsImpl implements AutoProvisioningSetti private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AutoProvisioningSettingsImpl( - AutoProvisioningSettingsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public AutoProvisioningSettingsImpl(AutoProvisioningSettingsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new AutoProvisioningSettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutoProvisioningSettingImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new AutoProvisioningSettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutoProvisioningSettingImpl(inner1, this.manager())); } public Response getWithResponse(String settingName, Context context) { Response inner = this.serviceClient().getWithResponse(settingName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AutoProvisioningSettingImpl(inner.getValue(), this.manager())); } else { return null; @@ -60,29 +57,19 @@ public AutoProvisioningSetting get(String settingName) { } public AutoProvisioningSetting getById(String id) { - String settingName = Utils.getValueFromIdByName(id, "autoProvisioningSettings"); + String settingName = ResourceManagerUtils.getValueFromIdByName(id, "autoProvisioningSettings"); if (settingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'autoProvisioningSettings'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'autoProvisioningSettings'.", id))); } return this.getWithResponse(settingName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String settingName = Utils.getValueFromIdByName(id, "autoProvisioningSettings"); + String settingName = ResourceManagerUtils.getValueFromIdByName(id, "autoProvisioningSettings"); if (settingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'autoProvisioningSettings'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'autoProvisioningSettings'.", id))); } return this.getWithResponse(settingName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationImpl.java index 1fe4c63468b0..28fdf882a3d2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.security.models.AutomationAction; import com.azure.resourcemanager.security.models.AutomationScope; import com.azure.resourcemanager.security.models.AutomationSource; +import com.azure.resourcemanager.security.models.AutomationUpdateModel; import com.azure.resourcemanager.security.models.AutomationValidationStatus; import java.util.Collections; import java.util.List; @@ -106,28 +107,22 @@ private com.azure.resourcemanager.security.SecurityManager manager() { private String automationName; + private AutomationUpdateModel updateAutomation; + public AutomationImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; return this; } public Automation create() { - this.innerObject = - serviceManager - .serviceClient() - .getAutomations() - .createOrUpdateWithResponse(resourceGroupName, automationName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutomations() + .createOrUpdateWithResponse(resourceGroupName, automationName, this.innerModel(), Context.NONE).getValue(); return this; } public Automation create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutomations() - .createOrUpdateWithResponse(resourceGroupName, automationName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutomations() + .createOrUpdateWithResponse(resourceGroupName, automationName, this.innerModel(), context).getValue(); return this; } @@ -138,60 +133,44 @@ public Automation create(Context context) { } public AutomationImpl update() { + this.updateAutomation = new AutomationUpdateModel(); return this; } public Automation apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAutomations() - .createOrUpdateWithResponse(resourceGroupName, automationName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutomations() + .updateWithResponse(resourceGroupName, automationName, updateAutomation, Context.NONE).getValue(); return this; } public Automation apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutomations() - .createOrUpdateWithResponse(resourceGroupName, automationName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutomations() + .updateWithResponse(resourceGroupName, automationName, updateAutomation, context).getValue(); return this; } AutomationImpl(AutomationInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.automationName = Utils.getValueFromIdByName(innerObject.id(), "automations"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.automationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "automations"); } public Automation refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAutomations() - .getByResourceGroupWithResponse(resourceGroupName, automationName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutomations() + .getByResourceGroupWithResponse(resourceGroupName, automationName, Context.NONE).getValue(); return this; } public Automation refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAutomations() - .getByResourceGroupWithResponse(resourceGroupName, automationName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAutomations() + .getByResourceGroupWithResponse(resourceGroupName, automationName, context).getValue(); return this; } public Response validateWithResponse(AutomationInner automation, Context context) { - return serviceManager - .automations() - .validateWithResponse(resourceGroupName, automationName, automation, context); + return serviceManager.automations().validateWithResponse(resourceGroupName, automationName, automation, + context); } public AutomationValidationStatus validate(AutomationInner automation) { @@ -209,32 +188,66 @@ public AutomationImpl withRegion(String location) { } public AutomationImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateAutomation.withTags(tags); + return this; + } } public AutomationImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateAutomation.withDescription(description); + return this; + } } public AutomationImpl withIsEnabled(Boolean isEnabled) { - this.innerModel().withIsEnabled(isEnabled); - return this; + if (isInCreateMode()) { + this.innerModel().withIsEnabled(isEnabled); + return this; + } else { + this.updateAutomation.withIsEnabled(isEnabled); + return this; + } } public AutomationImpl withScopes(List scopes) { - this.innerModel().withScopes(scopes); - return this; + if (isInCreateMode()) { + this.innerModel().withScopes(scopes); + return this; + } else { + this.updateAutomation.withScopes(scopes); + return this; + } } public AutomationImpl withSources(List sources) { - this.innerModel().withSources(sources); - return this; + if (isInCreateMode()) { + this.innerModel().withSources(sources); + return this; + } else { + this.updateAutomation.withSources(sources); + return this; + } } public AutomationImpl withActions(List actions) { - this.innerModel().withActions(actions); - return this; + if (isInCreateMode()) { + this.innerModel().withActions(actions); + return this; + } else { + this.updateAutomation.withActions(actions); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationValidationStatusImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationValidationStatusImpl.java index 5e3c49c7e027..62257fd6317d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationValidationStatusImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationValidationStatusImpl.java @@ -12,8 +12,7 @@ public final class AutomationValidationStatusImpl implements AutomationValidatio private final com.azure.resourcemanager.security.SecurityManager serviceManager; - AutomationValidationStatusImpl( - AutomationValidationStatusInner innerObject, + AutomationValidationStatusImpl(AutomationValidationStatusInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsClientImpl.java index 2348e654c1b2..b2701ff23fdc 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsClientImpl.java @@ -12,6 +12,7 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; @@ -33,24 +34,31 @@ import com.azure.resourcemanager.security.fluent.models.AutomationInner; import com.azure.resourcemanager.security.fluent.models.AutomationValidationStatusInner; import com.azure.resourcemanager.security.models.AutomationList; +import com.azure.resourcemanager.security.models.AutomationUpdateModel; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AutomationsClient. */ +/** + * An instance of this class provides access to all the operations defined in AutomationsClient. + */ public final class AutomationsClientImpl implements AutomationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AutomationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of AutomationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AutomationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(AutomationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(AutomationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,196 +69,152 @@ public final class AutomationsClientImpl implements AutomationsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterAutoma") public interface AutomationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/automations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("automationName") String automationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("automationName") String automationName, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutomationInner automation, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("automationName") String automationName, - @BodyParam("application/json") AutomationInner automation, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutomationUpdateModel automation, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}") - @ExpectedResponses({204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("automationName") String automationName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("automationName") String automationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}/validate") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/automations/{automationName}/validate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> validate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("automationName") String automationName, - @BodyParam("application/json") AutomationInner automation, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutomationInner automation, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security automations response as paginated response with {@link PagedFlux}. @@ -263,7 +227,7 @@ private PagedFlux listAsync() { /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -272,14 +236,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security automations response as paginated response with {@link PagedIterable}. @@ -292,7 +256,7 @@ public PagedIterable list() { /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -307,118 +271,83 @@ public PagedIterable list(Context context) { /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -426,17 +355,16 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,17 +373,16 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -469,9 +396,9 @@ public PagedIterable listByResourceGroup(String resourceGroupNa /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -485,9 +412,9 @@ public PagedIterable listByResourceGroup(String resourceGroupNa /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -495,19 +422,15 @@ public PagedIterable listByResourceGroup(String resourceGroupNa * @return the security automation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String automationName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String automationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -516,28 +439,19 @@ private Mono> getByResourceGroupWithResponseAsync( if (automationName == null) { return Mono.error(new IllegalArgumentException("Parameter automationName is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, automationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,19 +460,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return the security automation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String automationName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String automationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -567,25 +477,18 @@ private Mono> getByResourceGroupWithResponseAsync( if (automationName == null) { return Mono.error(new IllegalArgumentException("Parameter automationName is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, automationName, accept, context); } /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -600,9 +503,9 @@ private Mono getByResourceGroupAsync(String resourceGroupName, /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -611,16 +514,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, * @return the security automation resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String automationName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String automationName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, automationName, context).block(); } /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -635,9 +538,9 @@ public AutomationInner getByResourceGroup(String resourceGroupName, String autom /** * Creates or updates a security automation. If a security automation is already created and a subsequent request is * issued for the same automation id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -646,19 +549,15 @@ public AutomationInner getByResourceGroup(String resourceGroupName, String autom * @return the security automation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String automationName, AutomationInner automation) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String automationName, AutomationInner automation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -672,30 +571,20 @@ private Mono> createOrUpdateWithResponseAsync( } else { automation.validate(); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - automation, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, automationName, automation, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a security automation. If a security automation is already created and a subsequent request is * issued for the same automation id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @param context The context to associate with this operation. @@ -705,19 +594,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return the security automation resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String automationName, AutomationInner automation, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String automationName, AutomationInner automation, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -731,27 +616,19 @@ private Mono> createOrUpdateWithResponseAsync( } else { automation.validate(); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - automation, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, automationName, automation, accept, context); } /** * Creates or updates a security automation. If a security automation is already created and a subsequent request is * issued for the same automation id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -760,8 +637,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return the security automation resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String automationName, AutomationInner automation) { + private Mono createOrUpdateAsync(String resourceGroupName, String automationName, + AutomationInner automation) { return createOrUpdateWithResponseAsync(resourceGroupName, automationName, automation) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -769,9 +646,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a security automation. If a security automation is already created and a subsequent request is * issued for the same automation id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @param context The context to associate with this operation. @@ -781,17 +658,17 @@ private Mono createOrUpdateAsync( * @return the security automation resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String automationName, AutomationInner automation, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String automationName, + AutomationInner automation, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, automationName, automation, context).block(); } /** * Creates or updates a security automation. If a security automation is already created and a subsequent request is * issued for the same automation id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -804,11 +681,152 @@ public AutomationInner createOrUpdate(String resourceGroupName, String automatio return createOrUpdateWithResponse(resourceGroupName, automationName, automation, Context.NONE).getValue(); } + /** + * Updates a security automation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case + * insensitive. + * @param automationName The security automation name. + * @param automation The update model of security automation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the security automation resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String automationName, + AutomationUpdateModel automation) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (automationName == null) { + return Mono.error(new IllegalArgumentException("Parameter automationName is required and cannot be null.")); + } + if (automation == null) { + return Mono.error(new IllegalArgumentException("Parameter automation is required and cannot be null.")); + } else { + automation.validate(); + } + final String apiVersion = "2023-12-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, automationName, automation, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a security automation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case + * insensitive. + * @param automationName The security automation name. + * @param automation The update model of security automation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the security automation resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String automationName, + AutomationUpdateModel automation, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (automationName == null) { + return Mono.error(new IllegalArgumentException("Parameter automationName is required and cannot be null.")); + } + if (automation == null) { + return Mono.error(new IllegalArgumentException("Parameter automation is required and cannot be null.")); + } else { + automation.validate(); + } + final String apiVersion = "2023-12-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + automationName, automation, accept, context); + } + + /** + * Updates a security automation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case + * insensitive. + * @param automationName The security automation name. + * @param automation The update model of security automation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the security automation resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String automationName, + AutomationUpdateModel automation) { + return updateWithResponseAsync(resourceGroupName, automationName, automation) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates a security automation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case + * insensitive. + * @param automationName The security automation name. + * @param automation The update model of security automation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the security automation resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String automationName, + AutomationUpdateModel automation, Context context) { + return updateWithResponseAsync(resourceGroupName, automationName, automation, context).block(); + } + + /** + * Updates a security automation. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case + * insensitive. + * @param automationName The security automation name. + * @param automation The update model of security automation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the security automation resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutomationInner update(String resourceGroupName, String automationName, AutomationUpdateModel automation) { + return updateWithResponse(resourceGroupName, automationName, automation, Context.NONE).getValue(); + } + /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -818,16 +836,12 @@ public AutomationInner createOrUpdate(String resourceGroupName, String automatio @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String automationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -836,28 +850,19 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (automationName == null) { return Mono.error(new IllegalArgumentException("Parameter automationName is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, automationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -866,19 +871,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String automationName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String automationName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -887,25 +888,18 @@ private Mono> deleteWithResponseAsync( if (automationName == null) { return Mono.error(new IllegalArgumentException("Parameter automationName is required and cannot be null.")); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + automationName, accept, context); } /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -919,9 +913,9 @@ private Mono deleteAsync(String resourceGroupName, String automationName) /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -936,9 +930,9 @@ public Response deleteWithResponse(String resourceGroupName, String automa /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -952,31 +946,27 @@ public void delete(String resourceGroupName, String automationName) { /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the security automation model state property bag along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync( - String resourceGroupName, String automationName, AutomationInner automation) { + private Mono> validateWithResponseAsync(String resourceGroupName, + String automationName, AutomationInner automation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -990,30 +980,20 @@ private Mono> validateWithResponseAsyn } else { automation.validate(); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .validate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - automation, - accept, - context)) + .withContext(context -> service.validate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, automationName, automation, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @param context The context to associate with this operation. @@ -1021,22 +1001,18 @@ private Mono> validateWithResponseAsyn * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the security automation model state property bag along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync( - String resourceGroupName, String automationName, AutomationInner automation, Context context) { + private Mono> validateWithResponseAsync(String resourceGroupName, + String automationName, AutomationInner automation, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1050,27 +1026,19 @@ private Mono> validateWithResponseAsyn } else { automation.validate(); } - final String apiVersion = "2019-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .validate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - automationName, - automation, - accept, - context); + return service.validate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, automationName, automation, accept, context); } /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1079,8 +1047,8 @@ private Mono> validateWithResponseAsyn * @return the security automation model state property bag on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync( - String resourceGroupName, String automationName, AutomationInner automation) { + private Mono validateAsync(String resourceGroupName, String automationName, + AutomationInner automation) { return validateWithResponseAsync(resourceGroupName, automationName, automation) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1088,9 +1056,9 @@ private Mono validateAsync( /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @param context The context to associate with this operation. @@ -1100,17 +1068,17 @@ private Mono validateAsync( * @return the security automation model state property bag along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateWithResponse( - String resourceGroupName, String automationName, AutomationInner automation, Context context) { + public Response validateWithResponse(String resourceGroupName, + String automationName, AutomationInner automation, Context context) { return validateWithResponseAsync(resourceGroupName, automationName, automation, context).block(); } /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1119,21 +1087,22 @@ public Response validateWithResponse( * @return the security automation model state property bag. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationValidationStatusInner validate( - String resourceGroupName, String automationName, AutomationInner automation) { + public AutomationValidationStatusInner validate(String resourceGroupName, String automationName, + AutomationInner automation) { return validateWithResponse(resourceGroupName, automationName, automation, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1141,37 +1110,28 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1179,36 +1139,27 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1216,63 +1167,45 @@ private Mono> listByResourceGroupNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security automations response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security automations response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsImpl.java index b0ab5eaeb2e0..e76dfb3dd1cb 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AutomationsImpl.java @@ -23,41 +23,38 @@ public final class AutomationsImpl implements Automations { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public AutomationsImpl( - AutomationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public AutomationsImpl(AutomationsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutomationImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String automationName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, automationName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String automationName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, automationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AutomationImpl(inner.getValue(), this.manager())); } else { return null; @@ -73,8 +70,8 @@ public Automation getByResourceGroup(String resourceGroupName, String automation } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String automationName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String automationName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, automationName, context); } @@ -82,25 +79,22 @@ public void deleteByResourceGroup(String resourceGroupName, String automationNam this.serviceClient().delete(resourceGroupName, automationName); } - public Response validateWithResponse( - String resourceGroupName, String automationName, AutomationInner automation, Context context) { - Response inner = - this.serviceClient().validateWithResponse(resourceGroupName, automationName, automation, context); + public Response validateWithResponse(String resourceGroupName, String automationName, + AutomationInner automation, Context context) { + Response inner + = this.serviceClient().validateWithResponse(resourceGroupName, automationName, automation, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AutomationValidationStatusImpl(inner.getValue(), this.manager())); } else { return null; } } - public AutomationValidationStatus validate( - String resourceGroupName, String automationName, AutomationInner automation) { - AutomationValidationStatusInner inner = - this.serviceClient().validate(resourceGroupName, automationName, automation); + public AutomationValidationStatus validate(String resourceGroupName, String automationName, + AutomationInner automation) { + AutomationValidationStatusInner inner + = this.serviceClient().validate(resourceGroupName, automationName, automation); if (inner != null) { return new AutomationValidationStatusImpl(inner, this.manager()); } else { @@ -109,77 +103,57 @@ public AutomationValidationStatus validate( } public Automation getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String automationName = Utils.getValueFromIdByName(id, "automations"); + String automationName = ResourceManagerUtils.getValueFromIdByName(id, "automations"); if (automationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, automationName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String automationName = Utils.getValueFromIdByName(id, "automations"); + String automationName = ResourceManagerUtils.getValueFromIdByName(id, "automations"); if (automationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, automationName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String automationName = Utils.getValueFromIdByName(id, "automations"); + String automationName = ResourceManagerUtils.getValueFromIdByName(id, "automations"); if (automationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, automationName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String automationName = Utils.getValueFromIdByName(id, "automations"); + String automationName = ResourceManagerUtils.getValueFromIdByName(id, "automations"); if (automationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'automations'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, automationName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgImpl.java new file mode 100644 index 000000000000..5a09e1d2d788 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgImpl.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner; +import com.azure.resourcemanager.security.models.AzureDevOpsOrg; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgProperties; + +public final class AzureDevOpsOrgImpl implements AzureDevOpsOrg, AzureDevOpsOrg.Definition, AzureDevOpsOrg.Update { + private AzureDevOpsOrgInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AzureDevOpsOrgProperties properties() { + return this.innerModel().properties(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AzureDevOpsOrgInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String securityConnectorName; + + private String orgName; + + public AzureDevOpsOrgImpl withExistingSecurityConnector(String resourceGroupName, String securityConnectorName) { + this.resourceGroupName = resourceGroupName; + this.securityConnectorName = securityConnectorName; + return this; + } + + public AzureDevOpsOrg create() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsOrgs().createOrUpdate(resourceGroupName, + securityConnectorName, orgName, this.innerModel(), Context.NONE); + return this; + } + + public AzureDevOpsOrg create(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsOrgs().createOrUpdate(resourceGroupName, + securityConnectorName, orgName, this.innerModel(), context); + return this; + } + + AzureDevOpsOrgImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = new AzureDevOpsOrgInner(); + this.serviceManager = serviceManager; + this.orgName = name; + } + + public AzureDevOpsOrgImpl update() { + return this; + } + + public AzureDevOpsOrg apply() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsOrgs().update(resourceGroupName, + securityConnectorName, orgName, this.innerModel(), Context.NONE); + return this; + } + + public AzureDevOpsOrg apply(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsOrgs().update(resourceGroupName, + securityConnectorName, orgName, this.innerModel(), context); + return this; + } + + AzureDevOpsOrgImpl(AzureDevOpsOrgInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.securityConnectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "securityConnectors"); + this.orgName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "azureDevOpsOrgs"); + } + + public AzureDevOpsOrg refresh() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsOrgs() + .getWithResponse(resourceGroupName, securityConnectorName, orgName, Context.NONE).getValue(); + return this; + } + + public AzureDevOpsOrg refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsOrgs() + .getWithResponse(resourceGroupName, securityConnectorName, orgName, context).getValue(); + return this; + } + + public AzureDevOpsOrgImpl withProperties(AzureDevOpsOrgProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgListResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgListResponseImpl.java new file mode 100644 index 000000000000..300da645bf6b --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgListResponseImpl.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgListResponseInner; +import com.azure.resourcemanager.security.models.AzureDevOpsOrg; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgListResponse; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class AzureDevOpsOrgListResponseImpl implements AzureDevOpsOrgListResponse { + private AzureDevOpsOrgListResponseInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + AzureDevOpsOrgListResponseImpl(AzureDevOpsOrgListResponseInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new AzureDevOpsOrgImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public AzureDevOpsOrgListResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsClientImpl.java new file mode 100644 index 000000000000..05e97549792a --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsClientImpl.java @@ -0,0 +1,1105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.AzureDevOpsOrgsClient; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgListResponseInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AzureDevOpsOrgsClient. + */ +public final class AzureDevOpsOrgsClientImpl implements AzureDevOpsOrgsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AzureDevOpsOrgsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of AzureDevOpsOrgsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AzureDevOpsOrgsClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(AzureDevOpsOrgsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterAzureDevOpsOrgs to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterAzureD") + public interface AzureDevOpsOrgsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/listAvailableAzureDevOpsOrgs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailable(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureDevOpsOrgInner azureDevOpsOrg, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureDevOpsOrgInner azureDevOpsOrg, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableWithResponseAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableWithResponseAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, apiVersion, accept, context); + } + + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAvailableAsync(String resourceGroupName, + String securityConnectorName) { + return listAvailableWithResponseAsync(resourceGroupName, securityConnectorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { + return listAvailableWithResponseAsync(resourceGroupName, securityConnectorName, context).block(); + } + + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsOrgListResponseInner listAvailable(String resourceGroupName, String securityConnectorName) { + return listAvailableWithResponse(resourceGroupName, securityConnectorName, Context.NONE).getValue(); + } + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName)); + } + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, context)); + } + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, apiVersion, accept, context); + } + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, String orgName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, orgName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, orgName, context).block(); + } + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsOrgInner get(String resourceGroupName, String securityConnectorName, String orgName) { + return getWithResponse(resourceGroupName, securityConnectorName, orgName, Context.NONE).getValue(); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (azureDevOpsOrg == null) { + return Mono.error(new IllegalArgumentException("Parameter azureDevOpsOrg is required and cannot be null.")); + } else { + azureDevOpsOrg.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, apiVersion, azureDevOpsOrg, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (azureDevOpsOrg == null) { + return Mono.error(new IllegalArgumentException("Parameter azureDevOpsOrg is required and cannot be null.")); + } else { + azureDevOpsOrg.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, apiVersion, azureDevOpsOrg, accept, context); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsOrgInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AzureDevOpsOrgInner.class, AzureDevOpsOrgInner.class, this.client.getContext()); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsOrgInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + securityConnectorName, orgName, azureDevOpsOrg, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AzureDevOpsOrgInner.class, AzureDevOpsOrgInner.class, context); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsOrgInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg) + .getSyncPoller(); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsOrgInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg, context) + .getSyncPoller(); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg, context) + .last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsOrgInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg).block(); + } + + /** + * Creates or updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsOrgInner createOrUpdate(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg, context).block(); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (azureDevOpsOrg == null) { + return Mono.error(new IllegalArgumentException("Parameter azureDevOpsOrg is required and cannot be null.")); + } else { + azureDevOpsOrg.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, apiVersion, azureDevOpsOrg, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (azureDevOpsOrg == null) { + return Mono.error(new IllegalArgumentException("Parameter azureDevOpsOrg is required and cannot be null.")); + } else { + azureDevOpsOrg.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, apiVersion, azureDevOpsOrg, accept, context); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsOrgInner> beginUpdateAsync(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AzureDevOpsOrgInner.class, AzureDevOpsOrgInner.class, this.client.getContext()); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsOrgInner> beginUpdateAsync(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AzureDevOpsOrgInner.class, AzureDevOpsOrgInner.class, context); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsOrgInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg).getSyncPoller(); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsOrgInner> beginUpdate(String resourceGroupName, + String securityConnectorName, String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg, context) + .getSyncPoller(); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + String orgName, AzureDevOpsOrgInner azureDevOpsOrg) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + String orgName, AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsOrgInner update(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg) { + return updateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg).block(); + } + + /** + * Updates monitored Azure DevOps organization details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param azureDevOpsOrg The Azure DevOps organization resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsOrgInner update(String resourceGroupName, String securityConnectorName, String orgName, + AzureDevOpsOrgInner azureDevOpsOrg, Context context) { + return updateAsync(resourceGroupName, securityConnectorName, orgName, azureDevOpsOrg, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsImpl.java new file mode 100644 index 000000000000..a51d49dabb6e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsOrgsImpl.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.AzureDevOpsOrgsClient; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgListResponseInner; +import com.azure.resourcemanager.security.models.AzureDevOpsOrg; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgListResponse; +import com.azure.resourcemanager.security.models.AzureDevOpsOrgs; + +public final class AzureDevOpsOrgsImpl implements AzureDevOpsOrgs { + private static final ClientLogger LOGGER = new ClientLogger(AzureDevOpsOrgsImpl.class); + + private final AzureDevOpsOrgsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public AzureDevOpsOrgsImpl(AzureDevOpsOrgsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { + Response inner + = this.serviceClient().listAvailableWithResponse(resourceGroupName, securityConnectorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AzureDevOpsOrgListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureDevOpsOrgListResponse listAvailable(String resourceGroupName, String securityConnectorName) { + AzureDevOpsOrgListResponseInner inner + = this.serviceClient().listAvailable(resourceGroupName, securityConnectorName); + if (inner != null) { + return new AzureDevOpsOrgListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, securityConnectorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureDevOpsOrgImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureDevOpsOrgImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, securityConnectorName, orgName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AzureDevOpsOrgImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureDevOpsOrg get(String resourceGroupName, String securityConnectorName, String orgName) { + AzureDevOpsOrgInner inner = this.serviceClient().get(resourceGroupName, securityConnectorName, orgName); + if (inner != null) { + return new AzureDevOpsOrgImpl(inner, this.manager()); + } else { + return null; + } + } + + public AzureDevOpsOrg getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); + if (securityConnectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + } + String orgName = ResourceManagerUtils.getValueFromIdByName(id, "azureDevOpsOrgs"); + if (orgName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'azureDevOpsOrgs'.", id))); + } + return this.getWithResponse(resourceGroupName, securityConnectorName, orgName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); + if (securityConnectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + } + String orgName = ResourceManagerUtils.getValueFromIdByName(id, "azureDevOpsOrgs"); + if (orgName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'azureDevOpsOrgs'.", id))); + } + return this.getWithResponse(resourceGroupName, securityConnectorName, orgName, context); + } + + private AzureDevOpsOrgsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + public AzureDevOpsOrgImpl define(String name) { + return new AzureDevOpsOrgImpl(name, this.manager()); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectImpl.java new file mode 100644 index 000000000000..140d8d0d8286 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectImpl.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsProjectInner; +import com.azure.resourcemanager.security.models.AzureDevOpsProject; +import com.azure.resourcemanager.security.models.AzureDevOpsProjectProperties; + +public final class AzureDevOpsProjectImpl + implements AzureDevOpsProject, AzureDevOpsProject.Definition, AzureDevOpsProject.Update { + private AzureDevOpsProjectInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AzureDevOpsProjectProperties properties() { + return this.innerModel().properties(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AzureDevOpsProjectInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String securityConnectorName; + + private String orgName; + + private String projectName; + + public AzureDevOpsProjectImpl withExistingAzureDevOpsOrg(String resourceGroupName, String securityConnectorName, + String orgName) { + this.resourceGroupName = resourceGroupName; + this.securityConnectorName = securityConnectorName; + this.orgName = orgName; + return this; + } + + public AzureDevOpsProject create() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsProjects().createOrUpdate(resourceGroupName, + securityConnectorName, orgName, projectName, this.innerModel(), Context.NONE); + return this; + } + + public AzureDevOpsProject create(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsProjects().createOrUpdate(resourceGroupName, + securityConnectorName, orgName, projectName, this.innerModel(), context); + return this; + } + + AzureDevOpsProjectImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = new AzureDevOpsProjectInner(); + this.serviceManager = serviceManager; + this.projectName = name; + } + + public AzureDevOpsProjectImpl update() { + return this; + } + + public AzureDevOpsProject apply() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsProjects().update(resourceGroupName, + securityConnectorName, orgName, projectName, this.innerModel(), Context.NONE); + return this; + } + + public AzureDevOpsProject apply(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsProjects().update(resourceGroupName, + securityConnectorName, orgName, projectName, this.innerModel(), context); + return this; + } + + AzureDevOpsProjectImpl(AzureDevOpsProjectInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.securityConnectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "securityConnectors"); + this.orgName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "azureDevOpsOrgs"); + this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); + } + + public AzureDevOpsProject refresh() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsProjects() + .getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, Context.NONE).getValue(); + return this; + } + + public AzureDevOpsProject refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsProjects() + .getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, context).getValue(); + return this; + } + + public AzureDevOpsProjectImpl withProperties(AzureDevOpsProjectProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsClientImpl.java new file mode 100644 index 000000000000..0dda863a85d7 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsClientImpl.java @@ -0,0 +1,1049 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.AzureDevOpsProjectsClient; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsProjectInner; +import com.azure.resourcemanager.security.models.AzureDevOpsProjectListResponse; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AzureDevOpsProjectsClient. + */ +public final class AzureDevOpsProjectsClientImpl implements AzureDevOpsProjectsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AzureDevOpsProjectsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of AzureDevOpsProjectsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AzureDevOpsProjectsClientImpl(SecurityCenterImpl client) { + this.service = RestProxy.create(AzureDevOpsProjectsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterAzureDevOpsProjects to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterAzureD") + public interface AzureDevOpsProjectsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @PathParam("projectName") String projectName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @PathParam("projectName") String projectName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureDevOpsProjectInner azureDevOpsProject, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @PathParam("projectName") String projectName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureDevOpsProjectInner azureDevOpsProject, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String orgName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String orgName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + orgName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String orgName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, orgName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String orgName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, orgName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, orgName)); + } + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, orgName, context)); + } + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, projectName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, projectName, apiVersion, accept, context); + } + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, orgName, projectName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, orgName, projectName, context).block(); + } + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsProjectInner get(String resourceGroupName, String securityConnectorName, String orgName, + String projectName) { + return getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, Context.NONE).getValue(); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (azureDevOpsProject == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsProject is required and cannot be null.")); + } else { + azureDevOpsProject.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, projectName, apiVersion, azureDevOpsProject, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (azureDevOpsProject == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsProject is required and cannot be null.")); + } else { + azureDevOpsProject.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, projectName, apiVersion, azureDevOpsProject, accept, context); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsProjectInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + securityConnectorName, orgName, projectName, azureDevOpsProject); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsProjectInner.class, AzureDevOpsProjectInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsProjectInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + securityConnectorName, orgName, projectName, azureDevOpsProject, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsProjectInner.class, AzureDevOpsProjectInner.class, context); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsProjectInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, + azureDevOpsProject).getSyncPoller(); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsProjectInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, + azureDevOpsProject, context).getSyncPoller(); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, + azureDevOpsProject).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, + azureDevOpsProject, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsProjectInner createOrUpdate(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject) + .block(); + } + + /** + * Creates or updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsProjectInner createOrUpdate(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject, Context context) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject, + context).block(); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (azureDevOpsProject == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsProject is required and cannot be null.")); + } else { + azureDevOpsProject.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, projectName, apiVersion, azureDevOpsProject, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (azureDevOpsProject == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsProject is required and cannot be null.")); + } else { + azureDevOpsProject.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, projectName, apiVersion, azureDevOpsProject, accept, context); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsProjectInner> beginUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, securityConnectorName, + orgName, projectName, azureDevOpsProject); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsProjectInner.class, AzureDevOpsProjectInner.class, + this.client.getContext()); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsProjectInner> beginUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, securityConnectorName, + orgName, projectName, azureDevOpsProject, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsProjectInner.class, AzureDevOpsProjectInner.class, context); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsProjectInner> beginUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject) + .getSyncPoller(); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsProjectInner> beginUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, + AzureDevOpsProjectInner azureDevOpsProject, Context context) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject, + context).getSyncPoller(); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject) + .last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, AzureDevOpsProjectInner azureDevOpsProject, Context context) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsProjectInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, AzureDevOpsProjectInner azureDevOpsProject) { + return updateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject).block(); + } + + /** + * Updates a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param azureDevOpsProject The Azure DevOps project resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsProjectInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, AzureDevOpsProjectInner azureDevOpsProject, Context context) { + return updateAsync(resourceGroupName, securityConnectorName, orgName, projectName, azureDevOpsProject, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsImpl.java new file mode 100644 index 000000000000..444c613d071c --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsProjectsImpl.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.AzureDevOpsProjectsClient; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsProjectInner; +import com.azure.resourcemanager.security.models.AzureDevOpsProject; +import com.azure.resourcemanager.security.models.AzureDevOpsProjects; + +public final class AzureDevOpsProjectsImpl implements AzureDevOpsProjects { + private static final ClientLogger LOGGER = new ClientLogger(AzureDevOpsProjectsImpl.class); + + private final AzureDevOpsProjectsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public AzureDevOpsProjectsImpl(AzureDevOpsProjectsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, orgName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureDevOpsProjectImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, orgName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureDevOpsProjectImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + securityConnectorName, orgName, projectName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AzureDevOpsProjectImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureDevOpsProject get(String resourceGroupName, String securityConnectorName, String orgName, + String projectName) { + AzureDevOpsProjectInner inner + = this.serviceClient().get(resourceGroupName, securityConnectorName, orgName, projectName); + if (inner != null) { + return new AzureDevOpsProjectImpl(inner, this.manager()); + } else { + return null; + } + } + + public AzureDevOpsProject getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); + if (securityConnectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + } + String orgName = ResourceManagerUtils.getValueFromIdByName(id, "azureDevOpsOrgs"); + if (orgName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'azureDevOpsOrgs'.", id))); + } + String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); + if (projectName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); + } + return this.getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); + if (securityConnectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + } + String orgName = ResourceManagerUtils.getValueFromIdByName(id, "azureDevOpsOrgs"); + if (orgName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'azureDevOpsOrgs'.", id))); + } + String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); + if (projectName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); + } + return this.getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, context); + } + + private AzureDevOpsProjectsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + public AzureDevOpsProjectImpl define(String name) { + return new AzureDevOpsProjectImpl(name, this.manager()); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposClientImpl.java new file mode 100644 index 000000000000..7b363074e298 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposClientImpl.java @@ -0,0 +1,1117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.AzureDevOpsReposClient; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsRepositoryInner; +import com.azure.resourcemanager.security.models.AzureDevOpsRepositoryListResponse; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AzureDevOpsReposClient. + */ +public final class AzureDevOpsReposClientImpl implements AzureDevOpsReposClient { + /** + * The proxy service used to perform REST calls. + */ + private final AzureDevOpsReposService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of AzureDevOpsReposClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AzureDevOpsReposClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(AzureDevOpsReposService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterAzureDevOpsRepos to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterAzureD") + public interface AzureDevOpsReposService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}/repos") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @PathParam("projectName") String projectName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}/repos/{repoName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @PathParam("projectName") String projectName, @PathParam("repoName") String repoName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}/repos/{repoName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @PathParam("projectName") String projectName, @PathParam("repoName") String repoName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureDevOpsRepositoryInner azureDevOpsRepository, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/azureDevOpsOrgs/{orgName}/projects/{projectName}/repos/{repoName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("orgName") String orgName, + @PathParam("projectName") String projectName, @PathParam("repoName") String repoName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureDevOpsRepositoryInner azureDevOpsRepository, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, projectName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + orgName, projectName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, securityConnectorName, orgName, projectName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, securityConnectorName, orgName, projectName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, String projectName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, orgName, projectName)); + } + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, orgName, projectName, context)); + } + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, projectName, repoName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, projectName, repoName, apiVersion, accept, context); + } + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, context) + .block(); + } + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsRepositoryInner get(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName) { + return getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, repoName, Context.NONE) + .getValue(); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + if (azureDevOpsRepository == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsRepository is required and cannot be null.")); + } else { + azureDevOpsRepository.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, projectName, repoName, apiVersion, + azureDevOpsRepository, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + if (azureDevOpsRepository == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsRepository is required and cannot be null.")); + } else { + azureDevOpsRepository.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, projectName, repoName, apiVersion, azureDevOpsRepository, accept, context); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsRepositoryInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + securityConnectorName, orgName, projectName, repoName, azureDevOpsRepository); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsRepositoryInner.class, AzureDevOpsRepositoryInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsRepositoryInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + securityConnectorName, orgName, projectName, repoName, azureDevOpsRepository, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsRepositoryInner.class, AzureDevOpsRepositoryInner.class, context); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsRepositoryInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository).getSyncPoller(); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsRepositoryInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository, context).getSyncPoller(); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsRepositoryInner createOrUpdate(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository).block(); + } + + /** + * Creates or updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsRepositoryInner createOrUpdate(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository, + Context context) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository, context).block(); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + if (azureDevOpsRepository == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsRepository is required and cannot be null.")); + } else { + azureDevOpsRepository.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, orgName, projectName, repoName, apiVersion, + azureDevOpsRepository, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (orgName == null) { + return Mono.error(new IllegalArgumentException("Parameter orgName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + if (azureDevOpsRepository == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureDevOpsRepository is required and cannot be null.")); + } else { + azureDevOpsRepository.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, orgName, projectName, repoName, apiVersion, azureDevOpsRepository, accept, context); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsRepositoryInner> beginUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, securityConnectorName, + orgName, projectName, repoName, azureDevOpsRepository); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsRepositoryInner.class, AzureDevOpsRepositoryInner.class, + this.client.getContext()); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AzureDevOpsRepositoryInner> beginUpdateAsync( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, securityConnectorName, + orgName, projectName, repoName, azureDevOpsRepository, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AzureDevOpsRepositoryInner.class, AzureDevOpsRepositoryInner.class, context); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsRepositoryInner> beginUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository).getSyncPoller(); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AzureDevOpsRepositoryInner> beginUpdate( + String resourceGroupName, String securityConnectorName, String orgName, String projectName, String repoName, + AzureDevOpsRepositoryInner azureDevOpsRepository, Context context) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository, context).getSyncPoller(); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository, + Context context) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsRepositoryInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository) { + return updateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository).block(); + } + + /** + * Updates a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param azureDevOpsRepository The Azure DevOps repository resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureDevOpsRepositoryInner update(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName, AzureDevOpsRepositoryInner azureDevOpsRepository, Context context) { + return updateAsync(resourceGroupName, securityConnectorName, orgName, projectName, repoName, + azureDevOpsRepository, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposImpl.java new file mode 100644 index 000000000000..53627f6d3822 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsReposImpl.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.AzureDevOpsReposClient; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsRepositoryInner; +import com.azure.resourcemanager.security.models.AzureDevOpsRepos; +import com.azure.resourcemanager.security.models.AzureDevOpsRepository; + +public final class AzureDevOpsReposImpl implements AzureDevOpsRepos { + private static final ClientLogger LOGGER = new ClientLogger(AzureDevOpsReposImpl.class); + + private final AzureDevOpsReposClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public AzureDevOpsReposImpl(AzureDevOpsReposClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, String projectName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, orgName, projectName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureDevOpsRepositoryImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, orgName, projectName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureDevOpsRepositoryImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + securityConnectorName, orgName, projectName, repoName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AzureDevOpsRepositoryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureDevOpsRepository get(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName) { + AzureDevOpsRepositoryInner inner + = this.serviceClient().get(resourceGroupName, securityConnectorName, orgName, projectName, repoName); + if (inner != null) { + return new AzureDevOpsRepositoryImpl(inner, this.manager()); + } else { + return null; + } + } + + public AzureDevOpsRepository getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); + if (securityConnectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + } + String orgName = ResourceManagerUtils.getValueFromIdByName(id, "azureDevOpsOrgs"); + if (orgName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'azureDevOpsOrgs'.", id))); + } + String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); + if (projectName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); + } + String repoName = ResourceManagerUtils.getValueFromIdByName(id, "repos"); + if (repoName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'repos'.", id))); + } + return this + .getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, repoName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); + if (securityConnectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + } + String orgName = ResourceManagerUtils.getValueFromIdByName(id, "azureDevOpsOrgs"); + if (orgName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'azureDevOpsOrgs'.", id))); + } + String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); + if (projectName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); + } + String repoName = ResourceManagerUtils.getValueFromIdByName(id, "repos"); + if (repoName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'repos'.", id))); + } + return this.getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, repoName, context); + } + + private AzureDevOpsReposClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + public AzureDevOpsRepositoryImpl define(String name) { + return new AzureDevOpsRepositoryImpl(name, this.manager()); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsRepositoryImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsRepositoryImpl.java new file mode 100644 index 000000000000..752131e4ded1 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/AzureDevOpsRepositoryImpl.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsRepositoryInner; +import com.azure.resourcemanager.security.models.AzureDevOpsRepository; +import com.azure.resourcemanager.security.models.AzureDevOpsRepositoryProperties; + +public final class AzureDevOpsRepositoryImpl + implements AzureDevOpsRepository, AzureDevOpsRepository.Definition, AzureDevOpsRepository.Update { + private AzureDevOpsRepositoryInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AzureDevOpsRepositoryProperties properties() { + return this.innerModel().properties(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AzureDevOpsRepositoryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String securityConnectorName; + + private String orgName; + + private String projectName; + + private String repoName; + + public AzureDevOpsRepositoryImpl withExistingProject(String resourceGroupName, String securityConnectorName, + String orgName, String projectName) { + this.resourceGroupName = resourceGroupName; + this.securityConnectorName = securityConnectorName; + this.orgName = orgName; + this.projectName = projectName; + return this; + } + + public AzureDevOpsRepository create() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsRepos().createOrUpdate(resourceGroupName, + securityConnectorName, orgName, projectName, repoName, this.innerModel(), Context.NONE); + return this; + } + + public AzureDevOpsRepository create(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsRepos().createOrUpdate(resourceGroupName, + securityConnectorName, orgName, projectName, repoName, this.innerModel(), context); + return this; + } + + AzureDevOpsRepositoryImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = new AzureDevOpsRepositoryInner(); + this.serviceManager = serviceManager; + this.repoName = name; + } + + public AzureDevOpsRepositoryImpl update() { + return this; + } + + public AzureDevOpsRepository apply() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsRepos().update(resourceGroupName, + securityConnectorName, orgName, projectName, repoName, this.innerModel(), Context.NONE); + return this; + } + + public AzureDevOpsRepository apply(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsRepos().update(resourceGroupName, + securityConnectorName, orgName, projectName, repoName, this.innerModel(), context); + return this; + } + + AzureDevOpsRepositoryImpl(AzureDevOpsRepositoryInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.securityConnectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "securityConnectors"); + this.orgName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "azureDevOpsOrgs"); + this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); + this.repoName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "repos"); + } + + public AzureDevOpsRepository refresh() { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsRepos() + .getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, repoName, Context.NONE) + .getValue(); + return this; + } + + public AzureDevOpsRepository refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getAzureDevOpsRepos() + .getWithResponse(resourceGroupName, securityConnectorName, orgName, projectName, repoName, context) + .getValue(); + return this; + } + + public AzureDevOpsRepositoryImpl withProperties(AzureDevOpsRepositoryProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultImpl.java index dd6a7518892a..1d8255952a27 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultImpl.java @@ -13,8 +13,8 @@ public final class ComplianceResultImpl implements ComplianceResult { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - ComplianceResultImpl( - ComplianceResultInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + ComplianceResultImpl(ComplianceResultInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsClientImpl.java index 94eef1b3a1f7..da654a6b037d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.ComplianceResultList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ComplianceResultsClient. */ +/** + * An instance of this class provides access to all the operations defined in ComplianceResultsClient. + */ public final class ComplianceResultsClientImpl implements ComplianceResultsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComplianceResultsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of ComplianceResultsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ComplianceResultsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(ComplianceResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ComplianceResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,58 +62,48 @@ public final class ComplianceResultsClientImpl implements ComplianceResultsClien @Host("{$host}") @ServiceInterface(name = "SecurityCenterCompli") public interface ComplianceResultsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/complianceResults") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/complianceResults/{complianceResultName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("complianceResultName") String complianceResultName, - @HeaderParam("Accept") String accept, + @PathParam("complianceResultName") String complianceResultName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of compliance results response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of compliance results response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -116,37 +112,28 @@ private Mono> listSinglePageAsync(String sc final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of compliance results response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of compliance results response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -154,24 +141,16 @@ private Mono> listSinglePageAsync(String sc final String apiVersion = "2017-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -184,9 +163,9 @@ private PagedFlux listAsync(String scope) { /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -195,15 +174,15 @@ private PagedFlux listAsync(String scope) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -216,9 +195,9 @@ public PagedIterable list(String scope) { /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -232,7 +211,7 @@ public PagedIterable list(String scope, Context context) /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,10 +222,8 @@ public PagedIterable list(String scope, Context context) @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceId, String complianceResultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -258,16 +235,14 @@ private Mono> getWithResponseAsync(String resour final String apiVersion = "2017-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get(this.client.getEndpoint(), apiVersion, resourceId, complianceResultName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, resourceId, complianceResultName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @param context The context to associate with this operation. @@ -277,13 +252,11 @@ private Mono> getWithResponseAsync(String resour * @return a compliance result along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceId, String complianceResultName, Context context) { + private Mono> getWithResponseAsync(String resourceId, String complianceResultName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -300,7 +273,7 @@ private Mono> getWithResponseAsync( /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,7 +288,7 @@ private Mono getAsync(String resourceId, String complianc /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @param context The context to associate with this operation. @@ -325,14 +298,14 @@ private Mono getAsync(String resourceId, String complianc * @return a compliance result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceId, String complianceResultName, Context context) { + public Response getWithResponse(String resourceId, String complianceResultName, + Context context) { return getWithResponseAsync(resourceId, complianceResultName, context).block(); } /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -347,14 +320,15 @@ public ComplianceResultInner get(String resourceId, String complianceResultName) /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of compliance results response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of compliance results response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -362,37 +336,28 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of compliance results response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of compliance results response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -400,23 +365,13 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsImpl.java index 2aa80fd05d01..ec52ed5b3f21 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ComplianceResultsImpl.java @@ -21,30 +21,27 @@ public final class ComplianceResultsImpl implements ComplianceResults { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public ComplianceResultsImpl( - ComplianceResultsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public ComplianceResultsImpl(ComplianceResultsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String scope) { PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new ComplianceResultImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComplianceResultImpl(inner1, this.manager())); } public PagedIterable list(String scope, Context context) { PagedIterable inner = this.serviceClient().list(scope, context); - return Utils.mapPage(inner, inner1 -> new ComplianceResultImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComplianceResultImpl(inner1, this.manager())); } public Response getWithResponse(String resourceId, String complianceResultName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceId, complianceResultName, context); + Response inner + = this.serviceClient().getWithResponse(resourceId, complianceResultName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComplianceResultImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesClientImpl.java index 9dc3ac51dad7..bf5115ad78b8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.ComplianceList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CompliancesClient. */ +/** + * An instance of this class provides access to all the operations defined in CompliancesClient. + */ public final class CompliancesClientImpl implements CompliancesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CompliancesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of CompliancesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CompliancesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(CompliancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(CompliancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,58 +62,46 @@ public final class CompliancesClientImpl implements CompliancesClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterCompli") public interface CompliancesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/compliances") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/compliances/{complianceName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("complianceName") String complianceName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @PathParam("complianceName") String complianceName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -116,37 +110,28 @@ private Mono> listSinglePageAsync(String scope) { final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -154,24 +139,16 @@ private Mono> listSinglePageAsync(String scope, C final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -184,9 +161,9 @@ private PagedFlux listAsync(String scope) { /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -195,15 +172,15 @@ private PagedFlux listAsync(String scope) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -216,9 +193,9 @@ public PagedIterable list(String scope) { /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -232,9 +209,9 @@ public PagedIterable list(String scope, Context context) { /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -244,10 +221,8 @@ public PagedIterable list(String scope, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scope, String complianceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -265,9 +240,9 @@ private Mono> getWithResponseAsync(String scope, Strin /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,10 +253,8 @@ private Mono> getWithResponseAsync(String scope, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scope, String complianceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -297,9 +270,9 @@ private Mono> getWithResponseAsync(String scope, Strin /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -313,9 +286,9 @@ private Mono getAsync(String scope, String complianceName) { /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,9 +303,9 @@ public Response getWithResponse(String scope, String compliance /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -346,14 +319,15 @@ public ComplianceInner get(String scope, String complianceName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -361,37 +335,28 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of Compliance objects response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -399,23 +364,13 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesImpl.java index b8e4641782c3..e66593bba785 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CompliancesImpl.java @@ -21,29 +21,26 @@ public final class CompliancesImpl implements Compliances { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public CompliancesImpl( - CompliancesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public CompliancesImpl(CompliancesClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String scope) { PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new ComplianceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComplianceImpl(inner1, this.manager())); } public PagedIterable list(String scope, Context context) { PagedIterable inner = this.serviceClient().list(scope, context); - return Utils.mapPage(inner, inner1 -> new ComplianceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComplianceImpl(inner1, this.manager())); } public Response getWithResponse(String scope, String complianceName, Context context) { Response inner = this.serviceClient().getWithResponse(scope, complianceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComplianceImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectionStringsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectionStringsImpl.java deleted file mode 100644 index 9014f64c6f6b..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectionStringsImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.ConnectionStringsInner; -import com.azure.resourcemanager.security.models.ConnectionStrings; -import com.azure.resourcemanager.security.models.IngestionConnectionString; -import java.util.Collections; -import java.util.List; - -public final class ConnectionStringsImpl implements ConnectionStrings { - private ConnectionStringsInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - ConnectionStringsImpl( - ConnectionStringsInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ConnectionStringsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorSettingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorSettingImpl.java index 8fdafd0a7a49..0bcb75c18b2a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorSettingImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorSettingImpl.java @@ -47,22 +47,14 @@ private com.azure.resourcemanager.security.SecurityManager manager() { private String connectorName; public ConnectorSetting create() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectors() - .createOrUpdateWithResponse(connectorName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectors() + .createOrUpdateWithResponse(connectorName, this.innerModel(), Context.NONE).getValue(); return this; } public ConnectorSetting create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectors() - .createOrUpdateWithResponse(connectorName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectors() + .createOrUpdateWithResponse(connectorName, this.innerModel(), context).getValue(); return this; } @@ -77,41 +69,33 @@ public ConnectorSettingImpl update() { } public ConnectorSetting apply() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectors() - .createOrUpdateWithResponse(connectorName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectors() + .createOrUpdateWithResponse(connectorName, this.innerModel(), Context.NONE).getValue(); return this; } public ConnectorSetting apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectors() - .createOrUpdateWithResponse(connectorName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectors() + .createOrUpdateWithResponse(connectorName, this.innerModel(), context).getValue(); return this; } - ConnectorSettingImpl( - ConnectorSettingInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + ConnectorSettingImpl(ConnectorSettingInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.connectorName = Utils.getValueFromIdByName(innerObject.id(), "connectors"); + this.connectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectors"); } public ConnectorSetting refresh() { - this.innerObject = - serviceManager.serviceClient().getConnectors().getWithResponse(connectorName, Context.NONE).getValue(); + this.innerObject + = serviceManager.serviceClient().getConnectors().getWithResponse(connectorName, Context.NONE).getValue(); return this; } public ConnectorSetting refresh(Context context) { - this.innerObject = - serviceManager.serviceClient().getConnectors().getWithResponse(connectorName, context).getValue(); + this.innerObject + = serviceManager.serviceClient().getConnectors().getWithResponse(connectorName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsClientImpl.java index 21700bf0455a..ff131b2b5d35 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsClientImpl.java @@ -33,22 +33,28 @@ import com.azure.resourcemanager.security.models.ConnectorSettingList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ConnectorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ConnectorsClient. + */ public final class ConnectorsClientImpl implements ConnectorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ConnectorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of ConnectorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ConnectorsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(ConnectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ConnectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,153 +65,111 @@ public final class ConnectorsClientImpl implements ConnectorsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterConnec") public interface ConnectorsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("connectorName") String connectorName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("connectorName") String connectorName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("connectorName") String connectorName, - @BodyParam("application/json") ConnectorSettingInner connectorSetting, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConnectorSettingInner connectorSetting, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/connectors/{connectorName}") - @ExpectedResponses({200, 204}) + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("connectorName") String connectorName, - @HeaderParam("Accept") String accept, - Context context); + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("connectorName") String connectorName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Cloud accounts connectors of a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return for a subscription, list of all cloud account connectors and their settings along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return for a subscription, list of all cloud account connectors and their settings along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cloud accounts connectors of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return for a subscription, list of all cloud account connectors and their settings along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return for a subscription, list of all cloud account connectors and their settings along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Cloud accounts connectors of a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -214,27 +178,27 @@ private PagedFlux listAsync() { /** * Cloud accounts connectors of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Cloud accounts connectors of a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -243,13 +207,13 @@ public PagedIterable list() { /** * Cloud accounts connectors of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -258,7 +222,7 @@ public PagedIterable list(Context context) { /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -268,16 +232,12 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String connectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (connectorName == null) { return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); @@ -285,22 +245,14 @@ private Mono> getWithResponseAsync(String connec final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - connectorName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + connectorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,16 +263,12 @@ private Mono> getWithResponseAsync(String connec @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String connectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (connectorName == null) { return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); @@ -328,14 +276,13 @@ private Mono> getWithResponseAsync(String connec final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), connectorName, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), connectorName, + accept, context); } /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -349,7 +296,7 @@ private Mono getAsync(String connectorName) { /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -364,7 +311,7 @@ public Response getWithResponse(String connectorName, Con /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -379,7 +326,7 @@ public ConnectorSettingInner get(String connectorName) { /** * Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either * account credentials or role-based authentication. For GCP, use account organization credentials. - * + * * @param connectorName Name of the cloud account connector. * @param connectorSetting Settings for the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -388,19 +335,15 @@ public ConnectorSettingInner get(String connectorName) { * @return the connector setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String connectorName, ConnectorSettingInner connectorSetting) { + private Mono> createOrUpdateWithResponseAsync(String connectorName, + ConnectorSettingInner connectorSetting) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (connectorName == null) { return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); @@ -414,24 +357,15 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - connectorName, - connectorSetting, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), connectorName, connectorSetting, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either * account credentials or role-based authentication. For GCP, use account organization credentials. - * + * * @param connectorName Name of the cloud account connector. * @param connectorSetting Settings for the cloud account connector. * @param context The context to associate with this operation. @@ -441,19 +375,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return the connector setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String connectorName, ConnectorSettingInner connectorSetting, Context context) { + private Mono> createOrUpdateWithResponseAsync(String connectorName, + ConnectorSettingInner connectorSetting, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (connectorName == null) { return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); @@ -467,21 +397,14 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - connectorName, - connectorSetting, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + connectorName, connectorSetting, accept, context); } /** * Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either * account credentials or role-based authentication. For GCP, use account organization credentials. - * + * * @param connectorName Name of the cloud account connector. * @param connectorSetting Settings for the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -490,8 +413,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return the connector setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String connectorName, ConnectorSettingInner connectorSetting) { + private Mono createOrUpdateAsync(String connectorName, + ConnectorSettingInner connectorSetting) { return createOrUpdateWithResponseAsync(connectorName, connectorSetting) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -499,7 +422,7 @@ private Mono createOrUpdateAsync( /** * Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either * account credentials or role-based authentication. For GCP, use account organization credentials. - * + * * @param connectorName Name of the cloud account connector. * @param connectorSetting Settings for the cloud account connector. * @param context The context to associate with this operation. @@ -509,15 +432,15 @@ private Mono createOrUpdateAsync( * @return the connector setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String connectorName, ConnectorSettingInner connectorSetting, Context context) { + public Response createOrUpdateWithResponse(String connectorName, + ConnectorSettingInner connectorSetting, Context context) { return createOrUpdateWithResponseAsync(connectorName, connectorSetting, context).block(); } /** * Create a cloud account connector or update an existing one. Connect to your cloud account. For AWS, use either * account credentials or role-based authentication. For GCP, use account organization credentials. - * + * * @param connectorName Name of the cloud account connector. * @param connectorSetting Settings for the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -532,7 +455,7 @@ public ConnectorSettingInner createOrUpdate(String connectorName, ConnectorSetti /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -542,16 +465,12 @@ public ConnectorSettingInner createOrUpdate(String connectorName, ConnectorSetti @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String connectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (connectorName == null) { return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); @@ -559,22 +478,14 @@ private Mono> deleteWithResponseAsync(String connectorName) { final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - connectorName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), connectorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -585,16 +496,12 @@ private Mono> deleteWithResponseAsync(String connectorName) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String connectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (connectorName == null) { return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); @@ -602,14 +509,13 @@ private Mono> deleteWithResponseAsync(String connectorName, Conte final String apiVersion = "2020-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), connectorName, accept, context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), connectorName, + accept, context); } /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -623,7 +529,7 @@ private Mono deleteAsync(String connectorName) { /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -638,7 +544,7 @@ public Response deleteWithResponse(String connectorName, Context context) /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -651,14 +557,15 @@ public void delete(String connectorName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return for a subscription, list of all cloud account connectors and their settings along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return for a subscription, list of all cloud account connectors and their settings along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -666,37 +573,28 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return for a subscription, list of all cloud account connectors and their settings along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return for a subscription, list of all cloud account connectors and their settings along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -704,23 +602,13 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsImpl.java index ba0dd85d8a64..b0fc9d20799e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ConnectorsImpl.java @@ -21,29 +21,26 @@ public final class ConnectorsImpl implements Connectors { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public ConnectorsImpl( - ConnectorsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public ConnectorsImpl(ConnectorsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ConnectorSettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectorSettingImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ConnectorSettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectorSettingImpl(inner1, this.manager())); } public Response getWithResponse(String connectorName, Context context) { Response inner = this.serviceClient().getWithResponse(connectorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ConnectorSettingImpl(inner.getValue(), this.manager())); } else { return null; @@ -68,45 +65,37 @@ public void delete(String connectorName) { } public ConnectorSetting getById(String id) { - String connectorName = Utils.getValueFromIdByName(id, "connectors"); + String connectorName = ResourceManagerUtils.getValueFromIdByName(id, "connectors"); if (connectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); } return this.getWithResponse(connectorName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String connectorName = Utils.getValueFromIdByName(id, "connectors"); + String connectorName = ResourceManagerUtils.getValueFromIdByName(id, "connectors"); if (connectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); } return this.getWithResponse(connectorName, context); } public void deleteById(String id) { - String connectorName = Utils.getValueFromIdByName(id, "connectors"); + String connectorName = ResourceManagerUtils.getValueFromIdByName(id, "connectors"); if (connectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); } this.deleteWithResponse(connectorName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String connectorName = Utils.getValueFromIdByName(id, "connectors"); + String connectorName = ResourceManagerUtils.getValueFromIdByName(id, "connectors"); if (connectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); } return this.deleteWithResponse(connectorName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationImpl.java index 4b7d59d784b0..3576a911cb8d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationImpl.java @@ -18,8 +18,7 @@ public final class CustomAssessmentAutomationImpl private final com.azure.resourcemanager.security.SecurityManager serviceManager; - CustomAssessmentAutomationImpl( - CustomAssessmentAutomationInner innerObject, + CustomAssessmentAutomationImpl(CustomAssessmentAutomationInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -89,27 +88,16 @@ public CustomAssessmentAutomationImpl withExistingResourceGroup(String resourceG } public CustomAssessmentAutomation create() { - this.innerObject = - serviceManager - .serviceClient() - .getCustomAssessmentAutomations() - .createWithResponse( - resourceGroupName, - customAssessmentAutomationName, - createCustomAssessmentAutomationBody, - Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getCustomAssessmentAutomations().createWithResponse(resourceGroupName, + customAssessmentAutomationName, createCustomAssessmentAutomationBody, Context.NONE).getValue(); return this; } public CustomAssessmentAutomation create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCustomAssessmentAutomations() - .createWithResponse( - resourceGroupName, customAssessmentAutomationName, createCustomAssessmentAutomationBody, context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getCustomAssessmentAutomations().createWithResponse(resourceGroupName, + customAssessmentAutomationName, createCustomAssessmentAutomationBody, context).getValue(); return this; } @@ -121,22 +109,14 @@ public CustomAssessmentAutomation create(Context context) { } public CustomAssessmentAutomation refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCustomAssessmentAutomations() - .getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCustomAssessmentAutomations() + .getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, Context.NONE).getValue(); return this; } public CustomAssessmentAutomation refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCustomAssessmentAutomations() - .getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCustomAssessmentAutomations() + .getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsClientImpl.java index 21111c2d2a9e..e5169ac0da7f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsClientImpl.java @@ -34,24 +34,28 @@ import com.azure.resourcemanager.security.models.CustomAssessmentAutomationsListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CustomAssessmentAutomationsClient. */ +/** + * An instance of this class provides access to all the operations defined in CustomAssessmentAutomationsClient. + */ public final class CustomAssessmentAutomationsClientImpl implements CustomAssessmentAutomationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CustomAssessmentAutomationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of CustomAssessmentAutomationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CustomAssessmentAutomationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - CustomAssessmentAutomationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(CustomAssessmentAutomationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -62,253 +66,202 @@ public final class CustomAssessmentAutomationsClientImpl implements CustomAssess @Host("{$host}") @ServiceInterface(name = "SecurityCenterCustom") public interface CustomAssessmentAutomationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("customAssessmentAutomationName") String customAssessmentAutomationName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("customAssessmentAutomationName") String customAssessmentAutomationName, @BodyParam("application/json") CustomAssessmentAutomationRequest customAssessmentAutomationBody, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("customAssessmentAutomationName") String customAssessmentAutomationName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/customAssessmentAutomations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String customAssessmentAutomationName) { + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String customAssessmentAutomationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customAssessmentAutomationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customAssessmentAutomationName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, customAssessmentAutomationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String customAssessmentAutomationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customAssessmentAutomationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customAssessmentAutomationName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, customAssessmentAutomationName, accept, context); } /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String customAssessmentAutomationName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String customAssessmentAutomationName) { return getByResourceGroupWithResponseAsync(resourceGroupName, customAssessmentAutomationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String customAssessmentAutomationName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String customAssessmentAutomationName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, customAssessmentAutomationName, context).block(); } /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -316,20 +269,20 @@ public Response getByResourceGroupWithResponse( * @return a single custom assessment automation by name for the provided subscription and resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomAssessmentAutomationInner getByResourceGroup( - String resourceGroupName, String customAssessmentAutomationName) { + public CustomAssessmentAutomationInner getByResourceGroup(String resourceGroupName, + String customAssessmentAutomationName) { return getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, Context.NONE) .getValue(); } /** * Creates a custom assessment automation - * - *

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an + * + * Creates or updates a custom assessment automation for the provided subscription. Please note that providing an * existing custom assessment automation will replace the existing record. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param customAssessmentAutomationBody Custom Assessment Automation body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,37 +291,27 @@ public CustomAssessmentAutomationInner getByResourceGroup( * @return custom Assessment Automation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String customAssessmentAutomationName, - CustomAssessmentAutomationRequest customAssessmentAutomationBody) { + private Mono> createWithResponseAsync(String resourceGroupName, + String customAssessmentAutomationName, CustomAssessmentAutomationRequest customAssessmentAutomationBody) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customAssessmentAutomationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationName is required and cannot be null.")); } if (customAssessmentAutomationBody == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationBody is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationBody is required and cannot be null.")); } else { customAssessmentAutomationBody.validate(); } @@ -376,28 +319,19 @@ private Mono> createWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customAssessmentAutomationName, - customAssessmentAutomationBody, - accept, - context)) + context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, customAssessmentAutomationName, customAssessmentAutomationBody, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a custom assessment automation - * - *

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an + * + * Creates or updates a custom assessment automation for the provided subscription. Please note that providing an * existing custom assessment automation will replace the existing record. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param customAssessmentAutomationBody Custom Assessment Automation body. * @param context The context to associate with this operation. @@ -407,64 +341,46 @@ private Mono> createWithResponseAsync( * @return custom Assessment Automation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String customAssessmentAutomationName, - CustomAssessmentAutomationRequest customAssessmentAutomationBody, + private Mono> createWithResponseAsync(String resourceGroupName, + String customAssessmentAutomationName, CustomAssessmentAutomationRequest customAssessmentAutomationBody, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customAssessmentAutomationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationName is required and cannot be null.")); } if (customAssessmentAutomationBody == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationBody is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationBody is required and cannot be null.")); } else { customAssessmentAutomationBody.validate(); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customAssessmentAutomationName, - customAssessmentAutomationBody, - accept, - context); + return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + customAssessmentAutomationName, customAssessmentAutomationBody, accept, context); } /** * Creates a custom assessment automation - * - *

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an + * + * Creates or updates a custom assessment automation for the provided subscription. Please note that providing an * existing custom assessment automation will replace the existing record. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param customAssessmentAutomationBody Custom Assessment Automation body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -473,23 +389,20 @@ private Mono> createWithResponseAsync( * @return custom Assessment Automation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String customAssessmentAutomationName, - CustomAssessmentAutomationRequest customAssessmentAutomationBody) { - return createWithResponseAsync( - resourceGroupName, customAssessmentAutomationName, customAssessmentAutomationBody) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, + String customAssessmentAutomationName, CustomAssessmentAutomationRequest customAssessmentAutomationBody) { + return createWithResponseAsync(resourceGroupName, customAssessmentAutomationName, + customAssessmentAutomationBody).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates a custom assessment automation - * - *

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an + * + * Creates or updates a custom assessment automation for the provided subscription. Please note that providing an * existing custom assessment automation will replace the existing record. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param customAssessmentAutomationBody Custom Assessment Automation body. * @param context The context to associate with this operation. @@ -499,24 +412,21 @@ private Mono createAsync( * @return custom Assessment Automation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String customAssessmentAutomationName, - CustomAssessmentAutomationRequest customAssessmentAutomationBody, + public Response createWithResponse(String resourceGroupName, + String customAssessmentAutomationName, CustomAssessmentAutomationRequest customAssessmentAutomationBody, Context context) { - return createWithResponseAsync( - resourceGroupName, customAssessmentAutomationName, customAssessmentAutomationBody, context) - .block(); + return createWithResponseAsync(resourceGroupName, customAssessmentAutomationName, + customAssessmentAutomationBody, context).block(); } /** * Creates a custom assessment automation - * - *

Creates or updates a custom assessment automation for the provided subscription. Please note that providing an + * + * Creates or updates a custom assessment automation for the provided subscription. Please note that providing an * existing custom assessment automation will replace the existing record. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param customAssessmentAutomationBody Custom Assessment Automation body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,22 +435,19 @@ public Response createWithResponse( * @return custom Assessment Automation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomAssessmentAutomationInner create( - String resourceGroupName, - String customAssessmentAutomationName, + public CustomAssessmentAutomationInner create(String resourceGroupName, String customAssessmentAutomationName, CustomAssessmentAutomationRequest customAssessmentAutomationBody) { - return createWithResponse( - resourceGroupName, customAssessmentAutomationName, customAssessmentAutomationBody, Context.NONE) - .getValue(); + return createWithResponse(resourceGroupName, customAssessmentAutomationName, customAssessmentAutomationBody, + Context.NONE).getValue(); } /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -548,54 +455,39 @@ public CustomAssessmentAutomationInner create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String customAssessmentAutomationName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, + String customAssessmentAutomationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customAssessmentAutomationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customAssessmentAutomationName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, customAssessmentAutomationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -604,51 +496,38 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String customAssessmentAutomationName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, + String customAssessmentAutomationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customAssessmentAutomationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customAssessmentAutomationName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customAssessmentAutomationName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customAssessmentAutomationName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + customAssessmentAutomationName, accept, context); } /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -663,11 +542,11 @@ private Mono deleteAsync(String resourceGroupName, String customAssessment /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -676,18 +555,18 @@ private Mono deleteAsync(String resourceGroupName, String customAssessment * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String customAssessmentAutomationName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String customAssessmentAutomationName, + Context context) { return deleteWithResponseAsync(resourceGroupName, customAssessmentAutomationName, context).block(); } /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -700,31 +579,27 @@ public void delete(String resourceGroupName, String customAssessmentAutomationNa /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -733,56 +608,37 @@ private Mono> listByResourceGroup final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -792,31 +648,19 @@ private Mono> listByResourceGroup final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -824,18 +668,17 @@ private Mono> listByResourceGroup */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -843,20 +686,19 @@ private PagedFlux listByResourceGroupAsync(Stri * @return a list of Custom Assessment Automations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -869,11 +711,11 @@ public PagedIterable listByResourceGroup(String /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -881,116 +723,91 @@ public PagedIterable listByResourceGroup(String * @return a list of Custom Assessment Automations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -999,15 +816,15 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations as paginated response with {@link PagedIterable}. @@ -1019,9 +836,9 @@ public PagedIterable list() { /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1035,157 +852,123 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink) { + private Mono> + listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink) { + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsImpl.java index 460555a46574..0ccaf3e23862 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomAssessmentAutomationsImpl.java @@ -21,34 +21,28 @@ public final class CustomAssessmentAutomationsImpl implements CustomAssessmentAu private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public CustomAssessmentAutomationsImpl( - CustomAssessmentAutomationsClient innerClient, + public CustomAssessmentAutomationsImpl(CustomAssessmentAutomationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String customAssessmentAutomationName, Context context) { - Response inner = - this - .serviceClient() - .getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String customAssessmentAutomationName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CustomAssessmentAutomationImpl(inner.getValue(), this.manager())); } else { return null; } } - public CustomAssessmentAutomation getByResourceGroup( - String resourceGroupName, String customAssessmentAutomationName) { - CustomAssessmentAutomationInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, customAssessmentAutomationName); + public CustomAssessmentAutomation getByResourceGroup(String resourceGroupName, + String customAssessmentAutomationName) { + CustomAssessmentAutomationInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, customAssessmentAutomationName); if (inner != null) { return new CustomAssessmentAutomationImpl(inner, this.manager()); } else { @@ -56,8 +50,8 @@ public CustomAssessmentAutomation getByResourceGroup( } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String customAssessmentAutomationName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, + String customAssessmentAutomationName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, customAssessmentAutomationName, context); } @@ -66,117 +60,88 @@ public void deleteByResourceGroup(String resourceGroupName, String customAssessm } public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomAssessmentAutomationImpl(inner1, this.manager())); } public CustomAssessmentAutomation getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customAssessmentAutomationName = Utils.getValueFromIdByName(id, "customAssessmentAutomations"); + String customAssessmentAutomationName + = ResourceManagerUtils.getValueFromIdByName(id, "customAssessmentAutomations"); if (customAssessmentAutomationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customAssessmentAutomations'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'customAssessmentAutomations'.", id))); } - return this - .getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, Context.NONE) + return this.getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customAssessmentAutomationName = Utils.getValueFromIdByName(id, "customAssessmentAutomations"); + String customAssessmentAutomationName + = ResourceManagerUtils.getValueFromIdByName(id, "customAssessmentAutomations"); if (customAssessmentAutomationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customAssessmentAutomations'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'customAssessmentAutomations'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customAssessmentAutomationName = Utils.getValueFromIdByName(id, "customAssessmentAutomations"); + String customAssessmentAutomationName + = ResourceManagerUtils.getValueFromIdByName(id, "customAssessmentAutomations"); if (customAssessmentAutomationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customAssessmentAutomations'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'customAssessmentAutomations'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customAssessmentAutomationName = Utils.getValueFromIdByName(id, "customAssessmentAutomations"); + String customAssessmentAutomationName + = ResourceManagerUtils.getValueFromIdByName(id, "customAssessmentAutomations"); if (customAssessmentAutomationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customAssessmentAutomations'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'customAssessmentAutomations'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, customAssessmentAutomationName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentImpl.java index fb658a418055..7b253384c908 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentImpl.java @@ -16,8 +16,7 @@ public final class CustomEntityStoreAssignmentImpl private final com.azure.resourcemanager.security.SecurityManager serviceManager; - CustomEntityStoreAssignmentImpl( - CustomEntityStoreAssignmentInner innerObject, + CustomEntityStoreAssignmentImpl(CustomEntityStoreAssignmentInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -67,30 +66,18 @@ public CustomEntityStoreAssignmentImpl withExistingResourceGroup(String resource } public CustomEntityStoreAssignment create() { - this.innerObject = - serviceManager - .serviceClient() - .getCustomEntityStoreAssignments() - .createWithResponse( - resourceGroupName, - customEntityStoreAssignmentName, - createCustomEntityStoreAssignmentRequestBody, - Context.NONE) + this.innerObject + = serviceManager + .serviceClient().getCustomEntityStoreAssignments().createWithResponse(resourceGroupName, + customEntityStoreAssignmentName, createCustomEntityStoreAssignmentRequestBody, Context.NONE) .getValue(); return this; } public CustomEntityStoreAssignment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCustomEntityStoreAssignments() - .createWithResponse( - resourceGroupName, - customEntityStoreAssignmentName, - createCustomEntityStoreAssignmentRequestBody, - context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getCustomEntityStoreAssignments().createWithResponse(resourceGroupName, + customEntityStoreAssignmentName, createCustomEntityStoreAssignmentRequestBody, context).getValue(); return this; } @@ -102,22 +89,15 @@ public CustomEntityStoreAssignment create(Context context) { } public CustomEntityStoreAssignment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCustomEntityStoreAssignments() - .getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCustomEntityStoreAssignments() + .getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, Context.NONE) + .getValue(); return this; } public CustomEntityStoreAssignment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCustomEntityStoreAssignments() - .getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCustomEntityStoreAssignments() + .getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsClientImpl.java index 338a98a95a37..b41e3b2200f1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsClientImpl.java @@ -34,24 +34,28 @@ import com.azure.resourcemanager.security.models.CustomEntityStoreAssignmentsListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CustomEntityStoreAssignmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in CustomEntityStoreAssignmentsClient. + */ public final class CustomEntityStoreAssignmentsClientImpl implements CustomEntityStoreAssignmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CustomEntityStoreAssignmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of CustomEntityStoreAssignmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CustomEntityStoreAssignmentsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - CustomEntityStoreAssignmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(CustomEntityStoreAssignmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -62,253 +66,202 @@ public final class CustomEntityStoreAssignmentsClientImpl implements CustomEntit @Host("{$host}") @ServiceInterface(name = "SecurityCenterCustom") public interface CustomEntityStoreAssignmentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("customEntityStoreAssignmentName") String customEntityStoreAssignmentName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("customEntityStoreAssignmentName") String customEntityStoreAssignmentName, @BodyParam("application/json") CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("customEntityStoreAssignmentName") String customEntityStoreAssignmentName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/customEntityStoreAssignments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String customEntityStoreAssignmentName) { + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String customEntityStoreAssignmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customEntityStoreAssignmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customEntityStoreAssignmentName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, customEntityStoreAssignmentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String customEntityStoreAssignmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customEntityStoreAssignmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customEntityStoreAssignmentName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, customEntityStoreAssignmentName, accept, context); } /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String customEntityStoreAssignmentName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String customEntityStoreAssignmentName) { return getByResourceGroupWithResponseAsync(resourceGroupName, customEntityStoreAssignmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group along - * with {@link Response}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String customEntityStoreAssignmentName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, customEntityStoreAssignmentName, context).block(); } /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -316,19 +269,19 @@ public Response getByResourceGroupWithResponse * @return a single custom entity store assignment by name for the provided subscription and resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomEntityStoreAssignmentInner getByResourceGroup( - String resourceGroupName, String customEntityStoreAssignmentName) { + public CustomEntityStoreAssignmentInner getByResourceGroup(String resourceGroupName, + String customEntityStoreAssignmentName) { return getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, Context.NONE) .getValue(); } /** * Creates a custom entity store assignment - * - *

Creates a custom entity store assignment for the provided subscription, if not already exists. - * + * + * Creates a custom entity store assignment for the provided subscription, if not already exists. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param customEntityStoreAssignmentRequestBody Custom entity store assignment body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -337,65 +290,47 @@ public CustomEntityStoreAssignmentInner getByResourceGroup( * @return custom entity store assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, + private Mono> createWithResponseAsync(String resourceGroupName, String customEntityStoreAssignmentName, CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customEntityStoreAssignmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentName is required and cannot be null.")); } if (customEntityStoreAssignmentRequestBody == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentRequestBody is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentRequestBody is required and cannot be null.")); } else { customEntityStoreAssignmentRequestBody.validate(); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customEntityStoreAssignmentName, - customEntityStoreAssignmentRequestBody, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, customEntityStoreAssignmentName, + customEntityStoreAssignmentRequestBody, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a custom entity store assignment - * - *

Creates a custom entity store assignment for the provided subscription, if not already exists. - * + * + * Creates a custom entity store assignment for the provided subscription, if not already exists. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param customEntityStoreAssignmentRequestBody Custom entity store assignment body. * @param context The context to associate with this operation. @@ -405,63 +340,45 @@ private Mono> createWithResponseAsync * @return custom entity store assignment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, + private Mono> createWithResponseAsync(String resourceGroupName, String customEntityStoreAssignmentName, - CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody, - Context context) { + CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customEntityStoreAssignmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentName is required and cannot be null.")); } if (customEntityStoreAssignmentRequestBody == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentRequestBody is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentRequestBody is required and cannot be null.")); } else { customEntityStoreAssignmentRequestBody.validate(); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customEntityStoreAssignmentName, - customEntityStoreAssignmentRequestBody, - accept, - context); + return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + customEntityStoreAssignmentName, customEntityStoreAssignmentRequestBody, accept, context); } /** * Creates a custom entity store assignment - * - *

Creates a custom entity store assignment for the provided subscription, if not already exists. - * + * + * Creates a custom entity store assignment for the provided subscription, if not already exists. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param customEntityStoreAssignmentRequestBody Custom entity store assignment body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -470,22 +387,20 @@ private Mono> createWithResponseAsync * @return custom entity store assignment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, + private Mono createAsync(String resourceGroupName, String customEntityStoreAssignmentName, CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody) { - return createWithResponseAsync( - resourceGroupName, customEntityStoreAssignmentName, customEntityStoreAssignmentRequestBody) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createWithResponseAsync(resourceGroupName, customEntityStoreAssignmentName, + customEntityStoreAssignmentRequestBody).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates a custom entity store assignment - * - *

Creates a custom entity store assignment for the provided subscription, if not already exists. - * + * + * Creates a custom entity store assignment for the provided subscription, if not already exists. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param customEntityStoreAssignmentRequestBody Custom entity store assignment body. * @param context The context to associate with this operation. @@ -495,23 +410,20 @@ private Mono createAsync( * @return custom entity store assignment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, + public Response createWithResponse(String resourceGroupName, String customEntityStoreAssignmentName, - CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody, - Context context) { - return createWithResponseAsync( - resourceGroupName, customEntityStoreAssignmentName, customEntityStoreAssignmentRequestBody, context) - .block(); + CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody, Context context) { + return createWithResponseAsync(resourceGroupName, customEntityStoreAssignmentName, + customEntityStoreAssignmentRequestBody, context).block(); } /** * Creates a custom entity store assignment - * - *

Creates a custom entity store assignment for the provided subscription, if not already exists. - * + * + * Creates a custom entity store assignment for the provided subscription, if not already exists. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param customEntityStoreAssignmentRequestBody Custom entity store assignment body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -520,25 +432,19 @@ public Response createWithResponse( * @return custom entity store assignment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomEntityStoreAssignmentInner create( - String resourceGroupName, - String customEntityStoreAssignmentName, + public CustomEntityStoreAssignmentInner create(String resourceGroupName, String customEntityStoreAssignmentName, CustomEntityStoreAssignmentRequest customEntityStoreAssignmentRequestBody) { - return createWithResponse( - resourceGroupName, - customEntityStoreAssignmentName, - customEntityStoreAssignmentRequestBody, - Context.NONE) - .getValue(); + return createWithResponse(resourceGroupName, customEntityStoreAssignmentName, + customEntityStoreAssignmentRequestBody, Context.NONE).getValue(); } /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -546,54 +452,39 @@ public CustomEntityStoreAssignmentInner create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String customEntityStoreAssignmentName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, + String customEntityStoreAssignmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customEntityStoreAssignmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customEntityStoreAssignmentName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, customEntityStoreAssignmentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -602,51 +493,38 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String customEntityStoreAssignmentName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, + String customEntityStoreAssignmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (customEntityStoreAssignmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter customEntityStoreAssignmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter customEntityStoreAssignmentName is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - customEntityStoreAssignmentName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + customEntityStoreAssignmentName, accept, context); } /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -661,11 +539,11 @@ private Mono deleteAsync(String resourceGroupName, String customEntityStor /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -674,18 +552,18 @@ private Mono deleteAsync(String resourceGroupName, String customEntityStor * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String customEntityStoreAssignmentName, + Context context) { return deleteWithResponseAsync(resourceGroupName, customEntityStoreAssignmentName, context).block(); } /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -698,31 +576,27 @@ public void delete(String resourceGroupName, String customEntityStoreAssignmentN /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -731,56 +605,37 @@ private Mono> listByResourceGrou final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -790,31 +645,19 @@ private Mono> listByResourceGrou final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -822,18 +665,17 @@ private Mono> listByResourceGrou */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -841,20 +683,19 @@ private PagedFlux listByResourceGroupAsync(Str * @return a list of custom entity store assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -867,11 +708,11 @@ public PagedIterable listByResourceGroup(Strin /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -879,116 +720,91 @@ public PagedIterable listByResourceGroup(Strin * @return a list of custom entity store assignments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -997,15 +813,15 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments as paginated response with {@link PagedIterable}. @@ -1017,9 +833,9 @@ public PagedIterable list() { /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1033,157 +849,123 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink) { + private Mono> + listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink) { + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsImpl.java index 2b1bdc19cc0e..5ac206c8eea7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/CustomEntityStoreAssignmentsImpl.java @@ -21,34 +21,28 @@ public final class CustomEntityStoreAssignmentsImpl implements CustomEntityStore private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public CustomEntityStoreAssignmentsImpl( - CustomEntityStoreAssignmentsClient innerClient, + public CustomEntityStoreAssignmentsImpl(CustomEntityStoreAssignmentsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context) { - Response inner = - this - .serviceClient() - .getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String customEntityStoreAssignmentName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CustomEntityStoreAssignmentImpl(inner.getValue(), this.manager())); } else { return null; } } - public CustomEntityStoreAssignment getByResourceGroup( - String resourceGroupName, String customEntityStoreAssignmentName) { - CustomEntityStoreAssignmentInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, customEntityStoreAssignmentName); + public CustomEntityStoreAssignment getByResourceGroup(String resourceGroupName, + String customEntityStoreAssignmentName) { + CustomEntityStoreAssignmentInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, customEntityStoreAssignmentName); if (inner != null) { return new CustomEntityStoreAssignmentImpl(inner, this.manager()); } else { @@ -56,8 +50,8 @@ public CustomEntityStoreAssignment getByResourceGroup( } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, + String customEntityStoreAssignmentName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, customEntityStoreAssignmentName, context); } @@ -66,117 +60,88 @@ public void deleteByResourceGroup(String resourceGroupName, String customEntityS } public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CustomEntityStoreAssignmentImpl(inner1, this.manager())); } public CustomEntityStoreAssignment getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customEntityStoreAssignmentName = Utils.getValueFromIdByName(id, "customEntityStoreAssignments"); + String customEntityStoreAssignmentName + = ResourceManagerUtils.getValueFromIdByName(id, "customEntityStoreAssignments"); if (customEntityStoreAssignmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customEntityStoreAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'customEntityStoreAssignments'.", id))); } - return this - .getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, Context.NONE) + return this.getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customEntityStoreAssignmentName = Utils.getValueFromIdByName(id, "customEntityStoreAssignments"); + String customEntityStoreAssignmentName + = ResourceManagerUtils.getValueFromIdByName(id, "customEntityStoreAssignments"); if (customEntityStoreAssignmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customEntityStoreAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'customEntityStoreAssignments'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customEntityStoreAssignmentName = Utils.getValueFromIdByName(id, "customEntityStoreAssignments"); + String customEntityStoreAssignmentName + = ResourceManagerUtils.getValueFromIdByName(id, "customEntityStoreAssignments"); if (customEntityStoreAssignmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customEntityStoreAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'customEntityStoreAssignments'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String customEntityStoreAssignmentName = Utils.getValueFromIdByName(id, "customEntityStoreAssignments"); + String customEntityStoreAssignmentName + = ResourceManagerUtils.getValueFromIdByName(id, "customEntityStoreAssignments"); if (customEntityStoreAssignmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'customEntityStoreAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'customEntityStoreAssignments'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, customEntityStoreAssignmentName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStorageSettingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStorageSettingImpl.java new file mode 100644 index 000000000000..b5754f553d46 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStorageSettingImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.DefenderForStorageSettingInner; +import com.azure.resourcemanager.security.models.DefenderForStorageSetting; +import com.azure.resourcemanager.security.models.OperationStatus; +import com.azure.resourcemanager.security.models.SettingName; + +public final class DefenderForStorageSettingImpl + implements DefenderForStorageSetting, DefenderForStorageSetting.Definition { + private DefenderForStorageSettingInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + DefenderForStorageSettingImpl(DefenderForStorageSettingInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public Boolean isEnabled() { + return this.innerModel().isEnabled(); + } + + public Boolean overrideSubscriptionLevelSettings() { + return this.innerModel().overrideSubscriptionLevelSettings(); + } + + public String scanResultsEventGridTopicResourceId() { + return this.innerModel().scanResultsEventGridTopicResourceId(); + } + + public OperationStatus operationStatus() { + return this.innerModel().operationStatus(); + } + + public Boolean isEnabledMalwareScanningIsEnabled() { + return this.innerModel().isEnabledMalwareScanningIsEnabled(); + } + + public Integer capGBPerMonth() { + return this.innerModel().capGBPerMonth(); + } + + public Boolean isEnabledSensitiveDataDiscoveryIsEnabled() { + return this.innerModel().isEnabledSensitiveDataDiscoveryIsEnabled(); + } + + public OperationStatus operationStatusSensitiveDataDiscoveryOperationStatus() { + return this.innerModel().operationStatusSensitiveDataDiscoveryOperationStatus(); + } + + public DefenderForStorageSettingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + private String resourceId; + + private SettingName settingName; + + public DefenderForStorageSettingImpl withExistingResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + public DefenderForStorageSetting create() { + this.innerObject = serviceManager.serviceClient().getDefenderForStorages() + .createWithResponse(resourceId, settingName, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public DefenderForStorageSetting create(Context context) { + this.innerObject = serviceManager.serviceClient().getDefenderForStorages() + .createWithResponse(resourceId, settingName, this.innerModel(), context).getValue(); + return this; + } + + DefenderForStorageSettingImpl(SettingName name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = new DefenderForStorageSettingInner(); + this.serviceManager = serviceManager; + this.settingName = name; + } + + public DefenderForStorageSetting refresh() { + this.innerObject = serviceManager.serviceClient().getDefenderForStorages() + .getWithResponse(resourceId, settingName, Context.NONE).getValue(); + return this; + } + + public DefenderForStorageSetting refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getDefenderForStorages() + .getWithResponse(resourceId, settingName, context).getValue(); + return this; + } + + public DefenderForStorageSettingImpl withIsEnabled(Boolean isEnabled) { + this.innerModel().withIsEnabled(isEnabled); + return this; + } + + public DefenderForStorageSettingImpl + withOverrideSubscriptionLevelSettings(Boolean overrideSubscriptionLevelSettings) { + this.innerModel().withOverrideSubscriptionLevelSettings(overrideSubscriptionLevelSettings); + return this; + } + + public DefenderForStorageSettingImpl + withScanResultsEventGridTopicResourceId(String scanResultsEventGridTopicResourceId) { + this.innerModel().withScanResultsEventGridTopicResourceId(scanResultsEventGridTopicResourceId); + return this; + } + + public DefenderForStorageSettingImpl + withIsEnabledMalwareScanningIsEnabled(Boolean isEnabledMalwareScanningIsEnabled) { + this.innerModel().withIsEnabledMalwareScanningIsEnabled(isEnabledMalwareScanningIsEnabled); + return this; + } + + public DefenderForStorageSettingImpl withCapGBPerMonth(Integer capGBPerMonth) { + this.innerModel().withCapGBPerMonth(capGBPerMonth); + return this; + } + + public DefenderForStorageSettingImpl + withIsEnabledSensitiveDataDiscoveryIsEnabled(Boolean isEnabledSensitiveDataDiscoveryIsEnabled) { + this.innerModel().withIsEnabledSensitiveDataDiscoveryIsEnabled(isEnabledSensitiveDataDiscoveryIsEnabled); + return this; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesClientImpl.java new file mode 100644 index 000000000000..8e825be60930 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesClientImpl.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.DefenderForStoragesClient; +import com.azure.resourcemanager.security.fluent.models.DefenderForStorageSettingInner; +import com.azure.resourcemanager.security.models.SettingName; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DefenderForStoragesClient. + */ +public final class DefenderForStoragesClientImpl implements DefenderForStoragesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DefenderForStoragesService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of DefenderForStoragesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DefenderForStoragesClientImpl(SecurityCenterImpl client) { + this.service = RestProxy.create(DefenderForStoragesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterDefenderForStorages to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterDefend") + public interface DefenderForStoragesService { + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, + @PathParam("settingName") SettingName settingName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, + @PathParam("settingName") SettingName settingName, + @BodyParam("application/json") DefenderForStorageSettingInner defenderForStorageSetting, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceId, + SettingName settingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); + } + if (settingName == null) { + return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); + } + final String apiVersion = "2022-12-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), apiVersion, resourceId, settingName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceId, + SettingName settingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); + } + if (settingName == null) { + return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); + } + final String apiVersion = "2022-12-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, resourceId, settingName, accept, context); + } + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceId, SettingName settingName) { + return getWithResponseAsync(resourceId, settingName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceId, SettingName settingName, + Context context) { + return getWithResponseAsync(resourceId, settingName, context).block(); + } + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DefenderForStorageSettingInner get(String resourceId, SettingName settingName) { + return getWithResponse(resourceId, settingName, Context.NONE).getValue(); + } + + /** + * Creates or updates the Defender for Storage settings on a specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param defenderForStorageSetting Defender for Storage Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceId, + SettingName settingName, DefenderForStorageSettingInner defenderForStorageSetting) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); + } + if (settingName == null) { + return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); + } + if (defenderForStorageSetting == null) { + return Mono.error( + new IllegalArgumentException("Parameter defenderForStorageSetting is required and cannot be null.")); + } else { + defenderForStorageSetting.validate(); + } + final String apiVersion = "2022-12-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, resourceId, settingName, + defenderForStorageSetting, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates the Defender for Storage settings on a specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param defenderForStorageSetting Defender for Storage Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceId, + SettingName settingName, DefenderForStorageSettingInner defenderForStorageSetting, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); + } + if (settingName == null) { + return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); + } + if (defenderForStorageSetting == null) { + return Mono.error( + new IllegalArgumentException("Parameter defenderForStorageSetting is required and cannot be null.")); + } else { + defenderForStorageSetting.validate(); + } + final String apiVersion = "2022-12-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), apiVersion, resourceId, settingName, defenderForStorageSetting, + accept, context); + } + + /** + * Creates or updates the Defender for Storage settings on a specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param defenderForStorageSetting Defender for Storage Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceId, SettingName settingName, + DefenderForStorageSettingInner defenderForStorageSetting) { + return createWithResponseAsync(resourceId, settingName, defenderForStorageSetting) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates the Defender for Storage settings on a specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param defenderForStorageSetting Defender for Storage Settings. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String resourceId, SettingName settingName, + DefenderForStorageSettingInner defenderForStorageSetting, Context context) { + return createWithResponseAsync(resourceId, settingName, defenderForStorageSetting, context).block(); + } + + /** + * Creates or updates the Defender for Storage settings on a specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param defenderForStorageSetting Defender for Storage Settings. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DefenderForStorageSettingInner create(String resourceId, SettingName settingName, + DefenderForStorageSettingInner defenderForStorageSetting) { + return createWithResponse(resourceId, settingName, defenderForStorageSetting, Context.NONE).getValue(); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesImpl.java new file mode 100644 index 000000000000..1cc0bf9043b7 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DefenderForStoragesImpl.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.DefenderForStoragesClient; +import com.azure.resourcemanager.security.fluent.models.DefenderForStorageSettingInner; +import com.azure.resourcemanager.security.models.DefenderForStorageSetting; +import com.azure.resourcemanager.security.models.DefenderForStorages; +import com.azure.resourcemanager.security.models.SettingName; + +public final class DefenderForStoragesImpl implements DefenderForStorages { + private static final ClientLogger LOGGER = new ClientLogger(DefenderForStoragesImpl.class); + + private final DefenderForStoragesClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public DefenderForStoragesImpl(DefenderForStoragesClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceId, SettingName settingName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceId, settingName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DefenderForStorageSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DefenderForStorageSetting get(String resourceId, SettingName settingName) { + DefenderForStorageSettingInner inner = this.serviceClient().get(resourceId, settingName); + if (inner != null) { + return new DefenderForStorageSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public DefenderForStorageSetting getById(String id) { + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}", "resourceId"); + if (resourceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + } + String settingNameLocal = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}", "settingName"); + if (settingNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'defenderForStorageSettings'.", id))); + } + SettingName settingName = SettingName.fromString(settingNameLocal); + return this.getWithResponse(resourceId, settingName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}", "resourceId"); + if (resourceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + } + String settingNameLocal = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}", "settingName"); + if (settingNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'defenderForStorageSettings'.", id))); + } + SettingName settingName = SettingName.fromString(settingNameLocal); + return this.getWithResponse(resourceId, settingName, context); + } + + private DefenderForStoragesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } + + public DefenderForStorageSettingImpl define(SettingName name) { + return new DefenderForStorageSettingImpl(name, this.manager()); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationImpl.java new file mode 100644 index 000000000000..9e56179ffc97 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; +import com.azure.resourcemanager.security.models.DevOpsConfiguration; +import com.azure.resourcemanager.security.models.DevOpsConfigurationProperties; + +public final class DevOpsConfigurationImpl implements DevOpsConfiguration { + private DevOpsConfigurationInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + DevOpsConfigurationImpl(DevOpsConfigurationInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DevOpsConfigurationProperties properties() { + return this.innerModel().properties(); + } + + public DevOpsConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsClientImpl.java new file mode 100644 index 000000000000..aa2a975542fd --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsClientImpl.java @@ -0,0 +1,1152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.security.fluent.DevOpsConfigurationsClient; +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; +import com.azure.resourcemanager.security.models.DevOpsConfigurationListResponse; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DevOpsConfigurationsClient. + */ +public final class DevOpsConfigurationsClientImpl implements DevOpsConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DevOpsConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of DevOpsConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DevOpsConfigurationsClientImpl(SecurityCenterImpl client) { + this.service = RestProxy.create(DevOpsConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterDevOpsConfigurations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterDevOps") + public interface DevOpsConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DevOpsConfigurationInner devOpsConfiguration, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DevOpsConfigurationInner devOpsConfiguration, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName)); + } + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, context)); + } + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, apiVersion, accept, context); + } + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, context).block(); + } + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DevOpsConfigurationInner get(String resourceGroupName, String securityConnectorName) { + return getWithResponse(resourceGroupName, securityConnectorName, Context.NONE).getValue(); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (devOpsConfiguration == null) { + return Mono + .error(new IllegalArgumentException("Parameter devOpsConfiguration is required and cannot be null.")); + } else { + devOpsConfiguration.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, devOpsConfiguration, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (devOpsConfiguration == null) { + return Mono + .error(new IllegalArgumentException("Parameter devOpsConfiguration is required and cannot be null.")); + } else { + devOpsConfiguration.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, apiVersion, devOpsConfiguration, accept, context); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DevOpsConfigurationInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, securityConnectorName, devOpsConfiguration); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DevOpsConfigurationInner.class, DevOpsConfigurationInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DevOpsConfigurationInner> beginCreateOrUpdateAsync( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DevOpsConfigurationInner.class, DevOpsConfigurationInner.class, context); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DevOpsConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration) + .getSyncPoller(); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DevOpsConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context) + .getSyncPoller(); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DevOpsConfigurationInner createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration).block(); + } + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DevOpsConfigurationInner createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context) { + return createOrUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context).block(); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (devOpsConfiguration == null) { + return Mono + .error(new IllegalArgumentException("Parameter devOpsConfiguration is required and cannot be null.")); + } else { + devOpsConfiguration.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, devOpsConfiguration, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (devOpsConfiguration == null) { + return Mono + .error(new IllegalArgumentException("Parameter devOpsConfiguration is required and cannot be null.")); + } else { + devOpsConfiguration.validate(); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, apiVersion, devOpsConfiguration, accept, context); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DevOpsConfigurationInner> beginUpdateAsync( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, securityConnectorName, devOpsConfiguration); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DevOpsConfigurationInner.class, DevOpsConfigurationInner.class, + this.client.getContext()); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DevOpsConfigurationInner> beginUpdateAsync( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DevOpsConfigurationInner.class, DevOpsConfigurationInner.class, context); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DevOpsConfigurationInner> beginUpdate( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration).getSyncPoller(); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DevOpsConfigurationInner> beginUpdate( + String resourceGroupName, String securityConnectorName, DevOpsConfigurationInner devOpsConfiguration, + Context context) { + return this.beginUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context) + .getSyncPoller(); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context) { + return beginUpdateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DevOpsConfigurationInner update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration) { + return updateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration).block(); + } + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DevOpsConfigurationInner update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context) { + return updateAsync(resourceGroupName, securityConnectorName, devOpsConfiguration, context).block(); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, apiVersion, accept, context); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String securityConnectorName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, securityConnectorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String securityConnectorName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, securityConnectorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String securityConnectorName) { + return this.beginDeleteAsync(resourceGroupName, securityConnectorName).getSyncPoller(); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String securityConnectorName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, securityConnectorName, context).getSyncPoller(); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String securityConnectorName) { + return beginDeleteAsync(resourceGroupName, securityConnectorName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String securityConnectorName, Context context) { + return beginDeleteAsync(resourceGroupName, securityConnectorName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String securityConnectorName) { + deleteAsync(resourceGroupName, securityConnectorName).block(); + } + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String securityConnectorName, Context context) { + deleteAsync(resourceGroupName, securityConnectorName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsImpl.java new file mode 100644 index 000000000000..9a67afb8bd38 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsConfigurationsImpl.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.DevOpsConfigurationsClient; +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; +import com.azure.resourcemanager.security.models.DevOpsConfiguration; +import com.azure.resourcemanager.security.models.DevOpsConfigurations; + +public final class DevOpsConfigurationsImpl implements DevOpsConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(DevOpsConfigurationsImpl.class); + + private final DevOpsConfigurationsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public DevOpsConfigurationsImpl(DevOpsConfigurationsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DevOpsConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DevOpsConfigurationImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, securityConnectorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DevOpsConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DevOpsConfiguration get(String resourceGroupName, String securityConnectorName) { + DevOpsConfigurationInner inner = this.serviceClient().get(resourceGroupName, securityConnectorName); + if (inner != null) { + return new DevOpsConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public DevOpsConfiguration createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration) { + DevOpsConfigurationInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, securityConnectorName, devOpsConfiguration); + if (inner != null) { + return new DevOpsConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public DevOpsConfiguration createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context) { + DevOpsConfigurationInner inner = this.serviceClient().createOrUpdate(resourceGroupName, securityConnectorName, + devOpsConfiguration, context); + if (inner != null) { + return new DevOpsConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public DevOpsConfiguration update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration) { + DevOpsConfigurationInner inner + = this.serviceClient().update(resourceGroupName, securityConnectorName, devOpsConfiguration); + if (inner != null) { + return new DevOpsConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public DevOpsConfiguration update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context) { + DevOpsConfigurationInner inner + = this.serviceClient().update(resourceGroupName, securityConnectorName, devOpsConfiguration, context); + if (inner != null) { + return new DevOpsConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String securityConnectorName) { + this.serviceClient().delete(resourceGroupName, securityConnectorName); + } + + public void delete(String resourceGroupName, String securityConnectorName, Context context) { + this.serviceClient().delete(resourceGroupName, securityConnectorName, context); + } + + private DevOpsConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsClientImpl.java new file mode 100644 index 000000000000..2877727b9f51 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsClientImpl.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.DevOpsOperationResultsClient; +import com.azure.resourcemanager.security.fluent.models.OperationStatusResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DevOpsOperationResultsClient. + */ +public final class DevOpsOperationResultsClientImpl implements DevOpsOperationResultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DevOpsOperationResultsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of DevOpsOperationResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DevOpsOperationResultsClientImpl(SecurityCenterImpl client) { + this.service = RestProxy.create(DevOpsOperationResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterDevOpsOperationResults to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterDevOps") + public interface DevOpsOperationResultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/operationResults/{operationResultId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @PathParam("operationResultId") String operationResultId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String operationResultId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (operationResultId == null) { + return Mono + .error(new IllegalArgumentException("Parameter operationResultId is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, operationResultId, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String operationResultId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (operationResultId == null) { + return Mono + .error(new IllegalArgumentException("Parameter operationResultId is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, operationResultId, apiVersion, accept, context); + } + + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, + String operationResultId) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, operationResultId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String operationResultId, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, operationResultId, context).block(); + } + + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner get(String resourceGroupName, String securityConnectorName, + String operationResultId) { + return getWithResponse(resourceGroupName, securityConnectorName, operationResultId, Context.NONE).getValue(); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsImpl.java new file mode 100644 index 000000000000..72a9d7822e4a --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevOpsOperationResultsImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.DevOpsOperationResultsClient; +import com.azure.resourcemanager.security.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.security.models.DevOpsOperationResults; +import com.azure.resourcemanager.security.models.OperationStatusResult; + +public final class DevOpsOperationResultsImpl implements DevOpsOperationResults { + private static final ClientLogger LOGGER = new ClientLogger(DevOpsOperationResultsImpl.class); + + private final DevOpsOperationResultsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public DevOpsOperationResultsImpl(DevOpsOperationResultsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String operationResultId, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + securityConnectorName, operationResultId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OperationStatusResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OperationStatusResult get(String resourceGroupName, String securityConnectorName, String operationResultId) { + OperationStatusResultInner inner + = this.serviceClient().get(resourceGroupName, securityConnectorName, operationResultId); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private DevOpsOperationResultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupImpl.java index 6edb2fe0dd31..c16f6f43d45b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupImpl.java @@ -86,22 +86,15 @@ public DeviceSecurityGroupImpl withExistingResourceId(String resourceId) { } public DeviceSecurityGroup create() { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceSecurityGroups() - .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceSecurityGroups() + .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), Context.NONE) + .getValue(); return this; } public DeviceSecurityGroup create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceSecurityGroups() - .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceSecurityGroups() + .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), context).getValue(); return this; } @@ -116,60 +109,38 @@ public DeviceSecurityGroupImpl update() { } public DeviceSecurityGroup apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceSecurityGroups() - .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceSecurityGroups() + .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), Context.NONE) + .getValue(); return this; } public DeviceSecurityGroup apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceSecurityGroups() - .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceSecurityGroups() + .createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, this.innerModel(), context).getValue(); return this; } - DeviceSecurityGroupImpl( - DeviceSecurityGroupInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + DeviceSecurityGroupImpl(DeviceSecurityGroupInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceId = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "resourceId"); - this.deviceSecurityGroupName = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "deviceSecurityGroupName"); + this.resourceId = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", "resourceId"); + this.deviceSecurityGroupName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + "deviceSecurityGroupName"); } public DeviceSecurityGroup refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceSecurityGroups() - .getWithResponse(resourceId, deviceSecurityGroupName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceSecurityGroups() + .getWithResponse(resourceId, deviceSecurityGroupName, Context.NONE).getValue(); return this; } public DeviceSecurityGroup refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDeviceSecurityGroups() - .getWithResponse(resourceId, deviceSecurityGroupName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDeviceSecurityGroups() + .getWithResponse(resourceId, deviceSecurityGroupName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsClientImpl.java index 0d3f936ce062..a7a01f5ae19a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsClientImpl.java @@ -33,95 +33,88 @@ import com.azure.resourcemanager.security.models.DeviceSecurityGroupList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DeviceSecurityGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in DeviceSecurityGroupsClient. + */ public final class DeviceSecurityGroupsClientImpl implements DeviceSecurityGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DeviceSecurityGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of DeviceSecurityGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DeviceSecurityGroupsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(DeviceSecurityGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DeviceSecurityGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterDeviceSecurityGroups to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for SecurityCenterDeviceSecurityGroups to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterDevice") public interface DeviceSecurityGroupsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("deviceSecurityGroupName") String deviceSecurityGroupName, - @HeaderParam("Accept") String accept, + @PathParam("deviceSecurityGroupName") String deviceSecurityGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, @PathParam("deviceSecurityGroupName") String deviceSecurityGroupName, @BodyParam("application/json") DeviceSecurityGroupInner deviceSecurityGroup, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}") - @ExpectedResponses({200, 204}) + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("deviceSecurityGroupName") String deviceSecurityGroupName, - @HeaderParam("Accept") String accept, + @PathParam("deviceSecurityGroupName") String deviceSecurityGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -131,10 +124,8 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -143,21 +134,14 @@ private Mono> listSinglePageAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, resourceId, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -168,10 +152,8 @@ private Mono> listSinglePageAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); @@ -179,22 +161,14 @@ private Mono> listSinglePageAsync(String final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, resourceId, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, resourceId, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -208,7 +182,7 @@ private PagedFlux listAsync(String resourceId) { /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -218,13 +192,13 @@ private PagedFlux listAsync(String resourceId) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceId, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceId, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceId, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -238,7 +212,7 @@ public PagedIterable list(String resourceId) { /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -253,54 +227,43 @@ public PagedIterable list(String resourceId, Context c /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the device security group resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceId, String deviceSecurityGroupName) { + private Mono> getWithResponseAsync(String resourceId, + String deviceSecurityGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (deviceSecurityGroupName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - resourceId, - deviceSecurityGroupName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, resourceId, + deviceSecurityGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -308,21 +271,18 @@ private Mono> getWithResponseAsync( * @return the device security group resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceId, String deviceSecurityGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceId, + String deviceSecurityGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (deviceSecurityGroupName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; @@ -332,10 +292,10 @@ private Mono> getWithResponseAsync( /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -349,10 +309,10 @@ private Mono getAsync(String resourceId, String device /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -360,17 +320,17 @@ private Mono getAsync(String resourceId, String device * @return the device security group resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceId, String deviceSecurityGroupName, Context context) { + public Response getWithResponse(String resourceId, String deviceSecurityGroupName, + Context context) { return getWithResponseAsync(resourceId, deviceSecurityGroupName, context).block(); } /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -383,10 +343,10 @@ public DeviceSecurityGroupInner get(String resourceId, String deviceSecurityGrou /** * Use this method to creates or updates the device security group on a specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param deviceSecurityGroup Security group object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -394,21 +354,18 @@ public DeviceSecurityGroupInner get(String resourceId, String deviceSecurityGrou * @return the device security group resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceId, String deviceSecurityGroupName, DeviceSecurityGroupInner deviceSecurityGroup) { + private Mono> createOrUpdateWithResponseAsync(String resourceId, + String deviceSecurityGroupName, DeviceSecurityGroupInner deviceSecurityGroup) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (deviceSecurityGroupName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); } if (deviceSecurityGroup == null) { return Mono @@ -419,26 +376,17 @@ private Mono> createOrUpdateWithResponseAsync final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - resourceId, - deviceSecurityGroupName, - deviceSecurityGroup, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, resourceId, + deviceSecurityGroupName, deviceSecurityGroup, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to creates or updates the device security group on a specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param deviceSecurityGroup Security group object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -447,24 +395,18 @@ private Mono> createOrUpdateWithResponseAsync * @return the device security group resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceId, - String deviceSecurityGroupName, - DeviceSecurityGroupInner deviceSecurityGroup, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceId, + String deviceSecurityGroupName, DeviceSecurityGroupInner deviceSecurityGroup, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (deviceSecurityGroupName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); } if (deviceSecurityGroup == null) { return Mono @@ -475,23 +417,16 @@ private Mono> createOrUpdateWithResponseAsync final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - resourceId, - deviceSecurityGroupName, - deviceSecurityGroup, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, resourceId, deviceSecurityGroupName, + deviceSecurityGroup, accept, context); } /** * Use this method to creates or updates the device security group on a specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param deviceSecurityGroup Security group object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -499,18 +434,18 @@ private Mono> createOrUpdateWithResponseAsync * @return the device security group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceId, String deviceSecurityGroupName, DeviceSecurityGroupInner deviceSecurityGroup) { + private Mono createOrUpdateAsync(String resourceId, String deviceSecurityGroupName, + DeviceSecurityGroupInner deviceSecurityGroup) { return createOrUpdateWithResponseAsync(resourceId, deviceSecurityGroupName, deviceSecurityGroup) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Use this method to creates or updates the device security group on a specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param deviceSecurityGroup Security group object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -519,21 +454,18 @@ private Mono createOrUpdateAsync( * @return the device security group resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceId, - String deviceSecurityGroupName, - DeviceSecurityGroupInner deviceSecurityGroup, - Context context) { + public Response createOrUpdateWithResponse(String resourceId, + String deviceSecurityGroupName, DeviceSecurityGroupInner deviceSecurityGroup, Context context) { return createOrUpdateWithResponseAsync(resourceId, deviceSecurityGroupName, deviceSecurityGroup, context) .block(); } /** * Use this method to creates or updates the device security group on a specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param deviceSecurityGroup Security group object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -541,18 +473,18 @@ public Response createOrUpdateWithResponse( * @return the device security group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceSecurityGroupInner createOrUpdate( - String resourceId, String deviceSecurityGroupName, DeviceSecurityGroupInner deviceSecurityGroup) { + public DeviceSecurityGroupInner createOrUpdate(String resourceId, String deviceSecurityGroupName, + DeviceSecurityGroupInner deviceSecurityGroup) { return createOrUpdateWithResponse(resourceId, deviceSecurityGroupName, deviceSecurityGroup, Context.NONE) .getValue(); } /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -561,41 +493,30 @@ public DeviceSecurityGroupInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceId, String deviceSecurityGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (deviceSecurityGroupName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - resourceId, - deviceSecurityGroupName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, resourceId, + deviceSecurityGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -603,35 +524,32 @@ private Mono> deleteWithResponseAsync(String resourceId, String d * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceId, String deviceSecurityGroupName, Context context) { + private Mono> deleteWithResponseAsync(String resourceId, String deviceSecurityGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceId == null) { return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); } if (deviceSecurityGroupName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter deviceSecurityGroupName is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete(this.client.getEndpoint(), apiVersion, resourceId, deviceSecurityGroupName, accept, context); + return service.delete(this.client.getEndpoint(), apiVersion, resourceId, deviceSecurityGroupName, accept, + context); } /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -644,10 +562,10 @@ private Mono deleteAsync(String resourceId, String deviceSecurityGroupName /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -661,10 +579,10 @@ public Response deleteWithResponse(String resourceId, String deviceSecurit /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -676,9 +594,10 @@ public void delete(String resourceId, String deviceSecurityGroupName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -690,31 +609,22 @@ private Mono> listNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -727,23 +637,13 @@ private Mono> listNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsImpl.java index 84a677f1ee3e..d2941c4ea197 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceSecurityGroupsImpl.java @@ -21,31 +21,28 @@ public final class DeviceSecurityGroupsImpl implements DeviceSecurityGroups { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public DeviceSecurityGroupsImpl( - DeviceSecurityGroupsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public DeviceSecurityGroupsImpl(DeviceSecurityGroupsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceId) { PagedIterable inner = this.serviceClient().list(resourceId); - return Utils.mapPage(inner, inner1 -> new DeviceSecurityGroupImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeviceSecurityGroupImpl(inner1, this.manager())); } public PagedIterable list(String resourceId, Context context) { PagedIterable inner = this.serviceClient().list(resourceId, context); - return Utils.mapPage(inner, inner1 -> new DeviceSecurityGroupImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeviceSecurityGroupImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceId, String deviceSecurityGroupName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceId, deviceSecurityGroupName, context); + public Response getWithResponse(String resourceId, String deviceSecurityGroupName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceId, deviceSecurityGroupName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DeviceSecurityGroupImpl(inner.getValue(), this.manager())); } else { return null; @@ -61,8 +58,8 @@ public DeviceSecurityGroup get(String resourceId, String deviceSecurityGroupName } } - public Response deleteByResourceGroupWithResponse( - String resourceId, String deviceSecurityGroupName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceId, String deviceSecurityGroupName, + Context context) { return this.serviceClient().deleteWithResponse(resourceId, deviceSecurityGroupName, context); } @@ -71,125 +68,69 @@ public void deleteByResourceGroup(String resourceId, String deviceSecurityGroupN } public DeviceSecurityGroup getById(String id) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String deviceSecurityGroupName = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "deviceSecurityGroupName"); + String deviceSecurityGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + "deviceSecurityGroupName"); if (deviceSecurityGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", id))); } return this.getWithResponse(resourceId, deviceSecurityGroupName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String deviceSecurityGroupName = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "deviceSecurityGroupName"); + String deviceSecurityGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + "deviceSecurityGroupName"); if (deviceSecurityGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", id))); } return this.getWithResponse(resourceId, deviceSecurityGroupName, context); } public void deleteById(String id) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String deviceSecurityGroupName = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "deviceSecurityGroupName"); + String deviceSecurityGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + "deviceSecurityGroupName"); if (deviceSecurityGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", id))); } this.deleteByResourceGroupWithResponse(resourceId, deviceSecurityGroupName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceId = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "resourceId"); + String resourceId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", "resourceId"); if (resourceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceId'.", id))); } - String deviceSecurityGroupName = - Utils - .getValueFromIdByParameterName( - id, - "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", - "deviceSecurityGroupName"); + String deviceSecurityGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}", + "deviceSecurityGroupName"); if (deviceSecurityGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deviceSecurityGroups'.", id))); } return this.deleteByResourceGroupWithResponse(resourceId, deviceSecurityGroupName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionImpl.java index 65e6eb8b1f5b..55df609e646e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionImpl.java @@ -13,8 +13,7 @@ public final class DiscoveredSecuritySolutionImpl implements DiscoveredSecurityS private final com.azure.resourcemanager.security.SecurityManager serviceManager; - DiscoveredSecuritySolutionImpl( - DiscoveredSecuritySolutionInner innerObject, + DiscoveredSecuritySolutionImpl(DiscoveredSecuritySolutionInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsClientImpl.java index ed28a5ae9ae9..a770cf5d2571 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsClientImpl.java @@ -30,24 +30,28 @@ import com.azure.resourcemanager.security.models.DiscoveredSecuritySolutionList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DiscoveredSecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in DiscoveredSecuritySolutionsClient. + */ public final class DiscoveredSecuritySolutionsClientImpl implements DiscoveredSecuritySolutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DiscoveredSecuritySolutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of DiscoveredSecuritySolutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DiscoveredSecuritySolutionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - DiscoveredSecuritySolutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DiscoveredSecuritySolutionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,154 +62,112 @@ public final class DiscoveredSecuritySolutionsClientImpl implements DiscoveredSe @Host("{$host}") @ServiceInterface(name = "SecurityCenterDiscov") public interface DiscoveredSecuritySolutionsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/discoveredSecuritySolutions") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHomeRegion( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHomeRegion(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions/{discoveredSecuritySolutionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions/{discoveredSecuritySolutionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("discoveredSecuritySolutionName") String discoveredSecuritySolutionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHomeRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription as paginated response with {@link - * PagedFlux}. + * @return a list of discovered Security Solutions for the subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -214,27 +176,27 @@ private PagedFlux listAsync() { /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription as paginated response with {@link - * PagedFlux}. + * @return a list of discovered Security Solutions for the subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of discovered Security Solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -243,13 +205,13 @@ public PagedIterable list() { /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of discovered Security Solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -258,28 +220,24 @@ public PagedIterable list(Context context) { /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription and location along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of discovered Security Solutions for the subscription and location along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHomeRegionSinglePageAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -287,54 +245,35 @@ private Mono> listByHomeRegionSin final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHomeRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), + ascLocation, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription and location along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of discovered Security Solutions for the subscription and location along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionSinglePageAsync( - String ascLocation, Context context) { + private Mono> listByHomeRegionSinglePageAsync(String ascLocation, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -343,66 +282,57 @@ private Mono> listByHomeRegionSin final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHomeRegion( - this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink)); } /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation, Context context) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation, context), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation, context), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink, context)); } /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation) { @@ -411,15 +341,15 @@ public PagedIterable listByHomeRegion(String as /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation, Context context) { @@ -428,32 +358,28 @@ public PagedIterable listByHomeRegion(String as /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific discovered Security Solution along with {@link Response} on successful completion of {@link - * Mono}. + * @return a specific discovered Security Solution along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, String discoveredSecuritySolutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -463,58 +389,42 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (discoveredSecuritySolutionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter discoveredSecuritySolutionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter discoveredSecuritySolutionName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - discoveredSecuritySolutionName, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, discoveredSecuritySolutionName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific discovered Security Solution along with {@link Response} on successful completion of {@link - * Mono}. + * @return a specific discovered Security Solution along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, String discoveredSecuritySolutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -524,33 +434,23 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (discoveredSecuritySolutionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter discoveredSecuritySolutionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter discoveredSecuritySolutionName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - discoveredSecuritySolutionName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, ascLocation, + discoveredSecuritySolutionName, apiVersion, accept, context); } /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -558,19 +458,19 @@ private Mono> getWithResponseAsync( * @return a specific discovered Security Solution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName) { + private Mono getAsync(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName) { return getWithResponseAsync(resourceGroupName, ascLocation, discoveredSecuritySolutionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -579,18 +479,18 @@ private Mono getAsync( * @return a specific discovered Security Solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName, Context context) { + public Response getWithResponse(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName, Context context) { return getWithResponseAsync(resourceGroupName, ascLocation, discoveredSecuritySolutionName, context).block(); } /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -598,16 +498,17 @@ public Response getWithResponse( * @return a specific discovered Security Solution. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DiscoveredSecuritySolutionInner get( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName) { + public DiscoveredSecuritySolutionInner get(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName) { return getWithResponse(resourceGroupName, ascLocation, discoveredSecuritySolutionName, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -619,31 +520,22 @@ private Mono> listNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -651,37 +543,28 @@ private Mono> listNextSinglePageA * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -693,31 +576,23 @@ private Mono> listByHomeRegionNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -725,29 +600,19 @@ private Mono> listByHomeRegionNex * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByHomeRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsImpl.java index 3fc2fb690fe9..83b4894ee942 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DiscoveredSecuritySolutionsImpl.java @@ -21,8 +21,7 @@ public final class DiscoveredSecuritySolutionsImpl implements DiscoveredSecurity private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public DiscoveredSecuritySolutionsImpl( - DiscoveredSecuritySolutionsClient innerClient, + public DiscoveredSecuritySolutionsImpl(DiscoveredSecuritySolutionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,46 +29,45 @@ public DiscoveredSecuritySolutionsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation) { PagedIterable inner = this.serviceClient().listByHomeRegion(ascLocation); - return Utils.mapPage(inner, inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation, Context context) { - PagedIterable inner = - this.serviceClient().listByHomeRegion(ascLocation, context); - return Utils.mapPage(inner, inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByHomeRegion(ascLocation, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DiscoveredSecuritySolutionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, ascLocation, discoveredSecuritySolutionName, context); + public Response getWithResponse(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + ascLocation, discoveredSecuritySolutionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DiscoveredSecuritySolutionImpl(inner.getValue(), this.manager())); } else { return null; } } - public DiscoveredSecuritySolution get( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName) { - DiscoveredSecuritySolutionInner inner = - this.serviceClient().get(resourceGroupName, ascLocation, discoveredSecuritySolutionName); + public DiscoveredSecuritySolution get(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName) { + DiscoveredSecuritySolutionInner inner + = this.serviceClient().get(resourceGroupName, ascLocation, discoveredSecuritySolutionName); if (inner != null) { return new DiscoveredSecuritySolutionImpl(inner, this.manager()); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionImpl.java index aca3c0f73e30..cdb69a6db700 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionImpl.java @@ -12,8 +12,8 @@ public final class ExternalSecuritySolutionImpl implements ExternalSecuritySolut private final com.azure.resourcemanager.security.SecurityManager serviceManager; - ExternalSecuritySolutionImpl( - ExternalSecuritySolutionInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + ExternalSecuritySolutionImpl(ExternalSecuritySolutionInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsClientImpl.java index db970ccd5c33..0b806c14a20d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsClientImpl.java @@ -30,24 +30,28 @@ import com.azure.resourcemanager.security.models.ExternalSecuritySolutionList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ExternalSecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExternalSecuritySolutionsClient. + */ public final class ExternalSecuritySolutionsClientImpl implements ExternalSecuritySolutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExternalSecuritySolutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of ExternalSecuritySolutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExternalSecuritySolutionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - ExternalSecuritySolutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ExternalSecuritySolutionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,150 +62,108 @@ public final class ExternalSecuritySolutionsClientImpl implements ExternalSecuri @Host("{$host}") @ServiceInterface(name = "SecurityCenterExtern") public interface ExternalSecuritySolutionsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/externalSecuritySolutions") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHomeRegion( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHomeRegion(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions/{externalSecuritySolutionsName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions/{externalSecuritySolutionsName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("externalSecuritySolutionsName") String externalSecuritySolutionsName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHomeRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of external security solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of external security solutions for the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of external security solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of external security solutions for the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of external security solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of external security solutions for the subscription as paginated response with {@link PagedFlux}. @@ -213,7 +175,7 @@ private PagedFlux listAsync() { /** * Gets a list of external security solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -222,17 +184,17 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of external security solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external security solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of external security solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -241,13 +203,13 @@ public PagedIterable list() { /** * Gets a list of external security solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external security solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of external security solutions for the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -256,28 +218,24 @@ public PagedIterable list(Context context) { /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of external Security Solutions for the subscription and location along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHomeRegionSinglePageAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -285,54 +243,35 @@ private Mono> listByHomeRegionSingl final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHomeRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), + ascLocation, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of external Security Solutions for the subscription and location along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionSinglePageAsync( - String ascLocation, Context context) { + private Mono> listByHomeRegionSinglePageAsync(String ascLocation, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -341,66 +280,57 @@ private Mono> listByHomeRegionSingl final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHomeRegion( - this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedFlux}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink)); } /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedFlux}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation, Context context) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation, context), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation, context), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink, context)); } /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedIterable}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation) { @@ -409,15 +339,15 @@ public PagedIterable listByHomeRegion(String ascL /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedIterable}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation, Context context) { @@ -426,32 +356,28 @@ public PagedIterable listByHomeRegion(String ascL /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific external Security Solution along with {@link Response} on successful completion of {@link - * Mono}. + * @return a specific external Security Solution along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, String externalSecuritySolutionsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -461,58 +387,42 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (externalSecuritySolutionsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter externalSecuritySolutionsName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter externalSecuritySolutionsName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - externalSecuritySolutionsName, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, externalSecuritySolutionsName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific external Security Solution along with {@link Response} on successful completion of {@link - * Mono}. + * @return a specific external Security Solution along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, String externalSecuritySolutionsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -522,33 +432,23 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (externalSecuritySolutionsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter externalSecuritySolutionsName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter externalSecuritySolutionsName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - externalSecuritySolutionsName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, ascLocation, + externalSecuritySolutionsName, apiVersion, accept, context); } /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -556,19 +456,19 @@ private Mono> getWithResponseAsync( * @return a specific external Security Solution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName) { + private Mono getAsync(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName) { return getWithResponseAsync(resourceGroupName, ascLocation, externalSecuritySolutionsName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -577,18 +477,18 @@ private Mono getAsync( * @return a specific external Security Solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName, Context context) { + public Response getWithResponse(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName, Context context) { return getWithResponseAsync(resourceGroupName, ascLocation, externalSecuritySolutionsName, context).block(); } /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -596,16 +496,17 @@ public Response getWithResponse( * @return a specific external Security Solution. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalSecuritySolutionInner get( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName) { + public ExternalSecuritySolutionInner get(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName) { return getWithResponse(resourceGroupName, ascLocation, externalSecuritySolutionsName, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -617,31 +518,22 @@ private Mono> listNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -649,37 +541,28 @@ private Mono> listNextSinglePageAsy * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -691,31 +574,23 @@ private Mono> listByHomeRegionNextS return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -723,29 +598,19 @@ private Mono> listByHomeRegionNextS * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByHomeRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsImpl.java index 27d2cba5cf91..cd21d6455bc0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ExternalSecuritySolutionsImpl.java @@ -21,8 +21,7 @@ public final class ExternalSecuritySolutionsImpl implements ExternalSecuritySolu private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public ExternalSecuritySolutionsImpl( - ExternalSecuritySolutionsClient innerClient, + public ExternalSecuritySolutionsImpl(ExternalSecuritySolutionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,46 +29,41 @@ public ExternalSecuritySolutionsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation) { PagedIterable inner = this.serviceClient().listByHomeRegion(ascLocation); - return Utils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation, Context context) { - PagedIterable inner = - this.serviceClient().listByHomeRegion(ascLocation, context); - return Utils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByHomeRegion(ascLocation, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalSecuritySolutionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, ascLocation, externalSecuritySolutionsName, context); + public Response getWithResponse(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + ascLocation, externalSecuritySolutionsName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExternalSecuritySolutionImpl(inner.getValue(), this.manager())); } else { return null; } } - public ExternalSecuritySolution get( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName) { - ExternalSecuritySolutionInner inner = - this.serviceClient().get(resourceGroupName, ascLocation, externalSecuritySolutionsName); + public ExternalSecuritySolution get(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName) { + ExternalSecuritySolutionInner inner + = this.serviceClient().get(resourceGroupName, ascLocation, externalSecuritySolutionsName); if (inner != null) { return new ExternalSecuritySolutionImpl(inner, this.manager()); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsListResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsListResponseImpl.java new file mode 100644 index 000000000000..403c137feb0d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsListResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner; +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner; +import com.azure.resourcemanager.security.models.GetSensitivitySettingsListResponse; +import com.azure.resourcemanager.security.models.GetSensitivitySettingsResponse; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class GetSensitivitySettingsListResponseImpl implements GetSensitivitySettingsListResponse { + private GetSensitivitySettingsListResponseInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GetSensitivitySettingsListResponseImpl(GetSensitivitySettingsListResponseInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new GetSensitivitySettingsResponseImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public GetSensitivitySettingsListResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsResponseImpl.java new file mode 100644 index 000000000000..15134d6c65c6 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GetSensitivitySettingsResponseImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner; +import com.azure.resourcemanager.security.models.GetSensitivitySettingsResponse; +import com.azure.resourcemanager.security.models.GetSensitivitySettingsResponseProperties; + +public final class GetSensitivitySettingsResponseImpl implements GetSensitivitySettingsResponse { + private GetSensitivitySettingsResponseInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GetSensitivitySettingsResponseImpl(GetSensitivitySettingsResponseInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public GetSensitivitySettingsResponseProperties properties() { + return this.innerModel().properties(); + } + + public GetSensitivitySettingsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerImpl.java new file mode 100644 index 000000000000..c8983ce0b00d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerInner; +import com.azure.resourcemanager.security.models.GitHubOwner; +import com.azure.resourcemanager.security.models.GitHubOwnerProperties; + +public final class GitHubOwnerImpl implements GitHubOwner { + private GitHubOwnerInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GitHubOwnerImpl(GitHubOwnerInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public GitHubOwnerProperties properties() { + return this.innerModel().properties(); + } + + public GitHubOwnerInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerListResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerListResponseImpl.java new file mode 100644 index 000000000000..6d727c5be259 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnerListResponseImpl.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerInner; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerListResponseInner; +import com.azure.resourcemanager.security.models.GitHubOwner; +import com.azure.resourcemanager.security.models.GitHubOwnerListResponse; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class GitHubOwnerListResponseImpl implements GitHubOwnerListResponse { + private GitHubOwnerListResponseInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GitHubOwnerListResponseImpl(GitHubOwnerListResponseInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new GitHubOwnerImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public GitHubOwnerListResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersClientImpl.java new file mode 100644 index 000000000000..dc2f11141c5d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersClientImpl.java @@ -0,0 +1,566 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.GitHubOwnersClient; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerInner; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerListResponseInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GitHubOwnersClient. + */ +public final class GitHubOwnersClientImpl implements GitHubOwnersClient { + /** + * The proxy service used to perform REST calls. + */ + private final GitHubOwnersService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of GitHubOwnersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GitHubOwnersClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(GitHubOwnersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterGitHubOwners to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterGitHub") + public interface GitHubOwnersService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/listAvailableGitHubOwners") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailable(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("ownerName") String ownerName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns a list of all GitHub owners accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableWithResponseAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of all GitHub owners accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableWithResponseAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, apiVersion, accept, context); + } + + /** + * Returns a list of all GitHub owners accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAvailableAsync(String resourceGroupName, + String securityConnectorName) { + return listAvailableWithResponseAsync(resourceGroupName, securityConnectorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a list of all GitHub owners accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { + return listAvailableWithResponseAsync(resourceGroupName, securityConnectorName, context).block(); + } + + /** + * Returns a list of all GitHub owners accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GitHubOwnerListResponseInner listAvailable(String resourceGroupName, String securityConnectorName) { + return listAvailableWithResponse(resourceGroupName, securityConnectorName, Context.NONE).getValue(); + } + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName)); + } + + /** + * Returns a list of GitHub owners onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, context)); + } + + /** + * Returns a monitored GitHub owner. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Owner resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String ownerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (ownerName == null) { + return Mono.error(new IllegalArgumentException("Parameter ownerName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, ownerName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a monitored GitHub owner. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Owner resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String ownerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (ownerName == null) { + return Mono.error(new IllegalArgumentException("Parameter ownerName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, ownerName, apiVersion, accept, context); + } + + /** + * Returns a monitored GitHub owner. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Owner resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, String ownerName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, ownerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a monitored GitHub owner. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Owner resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String ownerName, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, ownerName, context).block(); + } + + /** + * Returns a monitored GitHub owner. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Owner resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GitHubOwnerInner get(String resourceGroupName, String securityConnectorName, String ownerName) { + return getWithResponse(resourceGroupName, securityConnectorName, ownerName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersImpl.java new file mode 100644 index 000000000000..8408b8f3bfec --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubOwnersImpl.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.GitHubOwnersClient; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerInner; +import com.azure.resourcemanager.security.fluent.models.GitHubOwnerListResponseInner; +import com.azure.resourcemanager.security.models.GitHubOwner; +import com.azure.resourcemanager.security.models.GitHubOwnerListResponse; +import com.azure.resourcemanager.security.models.GitHubOwners; + +public final class GitHubOwnersImpl implements GitHubOwners { + private static final ClientLogger LOGGER = new ClientLogger(GitHubOwnersImpl.class); + + private final GitHubOwnersClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public GitHubOwnersImpl(GitHubOwnersClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { + Response inner + = this.serviceClient().listAvailableWithResponse(resourceGroupName, securityConnectorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GitHubOwnerListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GitHubOwnerListResponse listAvailable(String resourceGroupName, String securityConnectorName) { + GitHubOwnerListResponseInner inner + = this.serviceClient().listAvailable(resourceGroupName, securityConnectorName); + if (inner != null) { + return new GitHubOwnerListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, securityConnectorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitHubOwnerImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitHubOwnerImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String ownerName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, securityConnectorName, ownerName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GitHubOwnerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GitHubOwner get(String resourceGroupName, String securityConnectorName, String ownerName) { + GitHubOwnerInner inner = this.serviceClient().get(resourceGroupName, securityConnectorName, ownerName); + if (inner != null) { + return new GitHubOwnerImpl(inner, this.manager()); + } else { + return null; + } + } + + private GitHubOwnersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposClientImpl.java new file mode 100644 index 000000000000..1fadc2c71993 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposClientImpl.java @@ -0,0 +1,458 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.GitHubReposClient; +import com.azure.resourcemanager.security.fluent.models.GitHubRepositoryInner; +import com.azure.resourcemanager.security.models.GitHubRepositoryListResponse; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GitHubReposClient. + */ +public final class GitHubReposClientImpl implements GitHubReposClient { + /** + * The proxy service used to perform REST calls. + */ + private final GitHubReposService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of GitHubReposClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GitHubReposClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(GitHubReposService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterGitHubRepos to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterGitHub") + public interface GitHubReposService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}/repos") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("ownerName") String ownerName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitHubOwners/{ownerName}/repos/{repoName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, @PathParam("ownerName") String ownerName, + @PathParam("repoName") String repoName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String ownerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (ownerName == null) { + return Mono.error(new IllegalArgumentException("Parameter ownerName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, ownerName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String ownerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (ownerName == null) { + return Mono.error(new IllegalArgumentException("Parameter ownerName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + ownerName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String ownerName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, ownerName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String ownerName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, ownerName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String ownerName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, ownerName)); + } + + /** + * Returns a list of GitHub repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String ownerName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, ownerName, context)); + } + + /** + * Returns a monitored GitHub repository. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String ownerName, String repoName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (ownerName == null) { + return Mono.error(new IllegalArgumentException("Parameter ownerName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, ownerName, repoName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a monitored GitHub repository. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param repoName The repository name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Repository resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String ownerName, String repoName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (ownerName == null) { + return Mono.error(new IllegalArgumentException("Parameter ownerName is required and cannot be null.")); + } + if (repoName == null) { + return Mono.error(new IllegalArgumentException("Parameter repoName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, ownerName, repoName, apiVersion, accept, context); + } + + /** + * Returns a monitored GitHub repository. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Repository resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, + String ownerName, String repoName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, ownerName, repoName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a monitored GitHub repository. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param repoName The repository name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Repository resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String ownerName, String repoName, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, ownerName, repoName, context).block(); + } + + /** + * Returns a monitored GitHub repository. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param ownerName The GitHub owner name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitHub Repository resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GitHubRepositoryInner get(String resourceGroupName, String securityConnectorName, String ownerName, + String repoName) { + return getWithResponse(resourceGroupName, securityConnectorName, ownerName, repoName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposImpl.java new file mode 100644 index 000000000000..e8ab7aec520d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubReposImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.GitHubReposClient; +import com.azure.resourcemanager.security.fluent.models.GitHubRepositoryInner; +import com.azure.resourcemanager.security.models.GitHubRepos; +import com.azure.resourcemanager.security.models.GitHubRepository; + +public final class GitHubReposImpl implements GitHubRepos { + private static final ClientLogger LOGGER = new ClientLogger(GitHubReposImpl.class); + + private final GitHubReposClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public GitHubReposImpl(GitHubReposClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String ownerName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, ownerName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitHubRepositoryImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String ownerName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, ownerName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitHubRepositoryImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String ownerName, String repoName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + securityConnectorName, ownerName, repoName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GitHubRepositoryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GitHubRepository get(String resourceGroupName, String securityConnectorName, String ownerName, + String repoName) { + GitHubRepositoryInner inner + = this.serviceClient().get(resourceGroupName, securityConnectorName, ownerName, repoName); + if (inner != null) { + return new GitHubRepositoryImpl(inner, this.manager()); + } else { + return null; + } + } + + private GitHubReposClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubRepositoryImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubRepositoryImpl.java new file mode 100644 index 000000000000..7a7ea6f4781e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitHubRepositoryImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.fluent.models.GitHubRepositoryInner; +import com.azure.resourcemanager.security.models.GitHubRepository; +import com.azure.resourcemanager.security.models.GitHubRepositoryProperties; + +public final class GitHubRepositoryImpl implements GitHubRepository { + private GitHubRepositoryInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GitHubRepositoryImpl(GitHubRepositoryInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public GitHubRepositoryProperties properties() { + return this.innerModel().properties(); + } + + public GitHubRepositoryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupImpl.java new file mode 100644 index 000000000000..76325ed4607f --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupInner; +import com.azure.resourcemanager.security.models.GitLabGroup; +import com.azure.resourcemanager.security.models.GitLabGroupProperties; + +public final class GitLabGroupImpl implements GitLabGroup { + private GitLabGroupInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GitLabGroupImpl(GitLabGroupInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public GitLabGroupProperties properties() { + return this.innerModel().properties(); + } + + public GitLabGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupListResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupListResponseImpl.java new file mode 100644 index 000000000000..a5174724475e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupListResponseImpl.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.resourcemanager.security.fluent.models.GitLabGroupInner; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupListResponseInner; +import com.azure.resourcemanager.security.models.GitLabGroup; +import com.azure.resourcemanager.security.models.GitLabGroupListResponse; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class GitLabGroupListResponseImpl implements GitLabGroupListResponse { + private GitLabGroupListResponseInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GitLabGroupListResponseImpl(GitLabGroupListResponseInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new GitLabGroupImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public GitLabGroupListResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsClientImpl.java new file mode 100644 index 000000000000..ce7601333102 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsClientImpl.java @@ -0,0 +1,568 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.GitLabGroupsClient; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupInner; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupListResponseInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GitLabGroupsClient. + */ +public final class GitLabGroupsClientImpl implements GitLabGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final GitLabGroupsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of GitLabGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GitLabGroupsClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(GitLabGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterGitLabGroups to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterGitLab") + public interface GitLabGroupsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/listAvailableGitLabGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailable(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @PathParam("groupFQName") String groupFQName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns a list of all GitLab groups accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableWithResponseAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of all GitLab groups accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableWithResponseAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, apiVersion, accept, context); + } + + /** + * Returns a list of all GitLab groups accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAvailableAsync(String resourceGroupName, + String securityConnectorName) { + return listAvailableWithResponseAsync(resourceGroupName, securityConnectorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a list of all GitLab groups accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { + return listAvailableWithResponseAsync(resourceGroupName, securityConnectorName, context).block(); + } + + /** + * Returns a list of all GitLab groups accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GitLabGroupListResponseInner listAvailable(String resourceGroupName, String securityConnectorName) { + return listAvailableWithResponse(resourceGroupName, securityConnectorName, Context.NONE).getValue(); + } + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName)); + } + + /** + * Returns a list of GitLab groups onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, context)); + } + + /** + * Returns a monitored GitLab Group resource for a given fully-qualified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String groupFQName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, groupFQName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a monitored GitLab Group resource for a given fully-qualified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String groupFQName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, groupFQName, apiVersion, accept, context); + } + + /** + * Returns a monitored GitLab Group resource for a given fully-qualified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, + String groupFQName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, groupFQName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a monitored GitLab Group resource for a given fully-qualified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, groupFQName, context).block(); + } + + /** + * Returns a monitored GitLab Group resource for a given fully-qualified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GitLabGroupInner get(String resourceGroupName, String securityConnectorName, String groupFQName) { + return getWithResponse(resourceGroupName, securityConnectorName, groupFQName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsImpl.java new file mode 100644 index 000000000000..d1480ba8ad7d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabGroupsImpl.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.GitLabGroupsClient; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupInner; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupListResponseInner; +import com.azure.resourcemanager.security.models.GitLabGroup; +import com.azure.resourcemanager.security.models.GitLabGroupListResponse; +import com.azure.resourcemanager.security.models.GitLabGroups; + +public final class GitLabGroupsImpl implements GitLabGroups { + private static final ClientLogger LOGGER = new ClientLogger(GitLabGroupsImpl.class); + + private final GitLabGroupsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public GitLabGroupsImpl(GitLabGroupsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { + Response inner + = this.serviceClient().listAvailableWithResponse(resourceGroupName, securityConnectorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GitLabGroupListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GitLabGroupListResponse listAvailable(String resourceGroupName, String securityConnectorName) { + GitLabGroupListResponseInner inner + = this.serviceClient().listAvailable(resourceGroupName, securityConnectorName); + if (inner != null) { + return new GitLabGroupListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, securityConnectorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitLabGroupImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitLabGroupImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, securityConnectorName, groupFQName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GitLabGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GitLabGroup get(String resourceGroupName, String securityConnectorName, String groupFQName) { + GitLabGroupInner inner = this.serviceClient().get(resourceGroupName, securityConnectorName, groupFQName); + if (inner != null) { + return new GitLabGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + private GitLabGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectImpl.java new file mode 100644 index 000000000000..df5e3c2e83e6 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.fluent.models.GitLabProjectInner; +import com.azure.resourcemanager.security.models.GitLabProject; +import com.azure.resourcemanager.security.models.GitLabProjectProperties; + +public final class GitLabProjectImpl implements GitLabProject { + private GitLabProjectInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + GitLabProjectImpl(GitLabProjectInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public GitLabProjectProperties properties() { + return this.innerModel().properties(); + } + + public GitLabProjectInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsClientImpl.java new file mode 100644 index 000000000000..6fbdc3e23344 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsClientImpl.java @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.GitLabProjectsClient; +import com.azure.resourcemanager.security.fluent.models.GitLabProjectInner; +import com.azure.resourcemanager.security.models.GitLabProjectListResponse; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GitLabProjectsClient. + */ +public final class GitLabProjectsClientImpl implements GitLabProjectsClient { + /** + * The proxy service used to perform REST calls. + */ + private final GitLabProjectsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of GitLabProjectsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GitLabProjectsClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(GitLabProjectsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterGitLabProjects to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterGitLab") + public interface GitLabProjectsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}/projects") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @PathParam("groupFQName") String groupFQName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}/projects/{projectName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @PathParam("groupFQName") String groupFQName, @PathParam("projectName") String projectName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector along + * with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String groupFQName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, groupFQName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector along + * with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, String groupFQName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, + groupFQName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector as + * paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String groupFQName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, groupFQName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector as + * paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + String groupFQName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, securityConnectorName, groupFQName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String groupFQName) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, groupFQName)); + } + + /** + * Gets a list of GitLab projects that are directly owned by given group and onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of GitLab projects that are directly owned by given group and onboarded to the connector as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String groupFQName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, groupFQName, context)); + } + + /** + * Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String groupFQName, String projectName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, groupFQName, projectName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Project resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String groupFQName, String projectName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + if (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, groupFQName, projectName, apiVersion, accept, context); + } + + /** + * Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Project resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String securityConnectorName, + String groupFQName, String projectName) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, groupFQName, projectName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Project resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, String projectName, Context context) { + return getWithResponseAsync(resourceGroupName, securityConnectorName, groupFQName, projectName, context) + .block(); + } + + /** + * Returns a monitored GitLab Project resource for a given fully-qualified group name and project name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gitLab Project resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GitLabProjectInner get(String resourceGroupName, String securityConnectorName, String groupFQName, + String projectName) { + return getWithResponse(resourceGroupName, securityConnectorName, groupFQName, projectName, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsImpl.java new file mode 100644 index 000000000000..320e60e0d33b --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabProjectsImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.GitLabProjectsClient; +import com.azure.resourcemanager.security.fluent.models.GitLabProjectInner; +import com.azure.resourcemanager.security.models.GitLabProject; +import com.azure.resourcemanager.security.models.GitLabProjects; + +public final class GitLabProjectsImpl implements GitLabProjects { + private static final ClientLogger LOGGER = new ClientLogger(GitLabProjectsImpl.class); + + private final GitLabProjectsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public GitLabProjectsImpl(GitLabProjectsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, + String groupFQName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, groupFQName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitLabProjectImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String securityConnectorName, String groupFQName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, groupFQName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GitLabProjectImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, String projectName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + securityConnectorName, groupFQName, projectName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GitLabProjectImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GitLabProject get(String resourceGroupName, String securityConnectorName, String groupFQName, + String projectName) { + GitLabProjectInner inner + = this.serviceClient().get(resourceGroupName, securityConnectorName, groupFQName, projectName); + if (inner != null) { + return new GitLabProjectImpl(inner, this.manager()); + } else { + return null; + } + } + + private GitLabProjectsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsClientImpl.java new file mode 100644 index 000000000000..e41bff7ba573 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsClientImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.GitLabSubgroupsClient; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupListResponseInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GitLabSubgroupsClient. + */ +public final class GitLabSubgroupsClientImpl implements GitLabSubgroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final GitLabSubgroupsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of GitLabSubgroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GitLabSubgroupsClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(GitLabSubgroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterGitLabSubgroups to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterGitLab") + public interface GitLabSubgroupsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/devops/default/gitLabGroups/{groupFQName}/listSubgroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("securityConnectorName") String securityConnectorName, + @PathParam("groupFQName") String groupFQName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets nested subgroups of given GitLab Group which are onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nested subgroups of given GitLab Group which are onboarded to the connector along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String resourceGroupName, + String securityConnectorName, String groupFQName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, groupFQName, apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets nested subgroups of given GitLab Group which are onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nested subgroups of given GitLab Group which are onboarded to the connector along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String resourceGroupName, + String securityConnectorName, String groupFQName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (securityConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); + } + if (groupFQName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupFQName is required and cannot be null.")); + } + final String apiVersion = "2023-09-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, groupFQName, apiVersion, accept, context); + } + + /** + * Gets nested subgroups of given GitLab Group which are onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nested subgroups of given GitLab Group which are onboarded to the connector on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String securityConnectorName, + String groupFQName) { + return listWithResponseAsync(resourceGroupName, securityConnectorName, groupFQName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets nested subgroups of given GitLab Group which are onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nested subgroups of given GitLab Group which are onboarded to the connector along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(String resourceGroupName, + String securityConnectorName, String groupFQName, Context context) { + return listWithResponseAsync(resourceGroupName, securityConnectorName, groupFQName, context).block(); + } + + /** + * Gets nested subgroups of given GitLab Group which are onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param groupFQName The GitLab group fully-qualified name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nested subgroups of given GitLab Group which are onboarded to the connector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GitLabGroupListResponseInner list(String resourceGroupName, String securityConnectorName, + String groupFQName) { + return listWithResponse(resourceGroupName, securityConnectorName, groupFQName, Context.NONE).getValue(); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsImpl.java new file mode 100644 index 000000000000..b7df246c9ce3 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GitLabSubgroupsImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.GitLabSubgroupsClient; +import com.azure.resourcemanager.security.fluent.models.GitLabGroupListResponseInner; +import com.azure.resourcemanager.security.models.GitLabGroupListResponse; +import com.azure.resourcemanager.security.models.GitLabSubgroups; + +public final class GitLabSubgroupsImpl implements GitLabSubgroups { + private static final ClientLogger LOGGER = new ClientLogger(GitLabSubgroupsImpl.class); + + private final GitLabSubgroupsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public GitLabSubgroupsImpl(GitLabSubgroupsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse(String resourceGroupName, String securityConnectorName, + String groupFQName, Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, securityConnectorName, groupFQName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GitLabGroupListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GitLabGroupListResponse list(String resourceGroupName, String securityConnectorName, String groupFQName) { + GitLabGroupListResponseInner inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, groupFQName); + if (inner != null) { + return new GitLabGroupListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private GitLabSubgroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentImpl.java index ec7625401677..90405669bbeb 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentImpl.java @@ -75,22 +75,15 @@ public GovernanceAssignmentImpl withExistingAssessment(String scope, String asse } public GovernanceAssignment create() { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceAssignments() - .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceAssignments() + .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), Context.NONE) + .getValue(); return this; } public GovernanceAssignment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceAssignments() - .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceAssignments() + .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), context).getValue(); return this; } @@ -105,66 +98,42 @@ public GovernanceAssignmentImpl update() { } public GovernanceAssignment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceAssignments() - .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceAssignments() + .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), Context.NONE) + .getValue(); return this; } public GovernanceAssignment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceAssignments() - .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceAssignments() + .createOrUpdateWithResponse(scope, assessmentName, assignmentKey, this.innerModel(), context).getValue(); return this; } - GovernanceAssignmentImpl( - GovernanceAssignmentInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + GovernanceAssignmentImpl(GovernanceAssignmentInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.scope = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "scope"); - this.assessmentName = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assessmentName"); - this.assignmentKey = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assignmentKey"); + this.scope = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "scope"); + this.assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assessmentName"); + this.assignmentKey = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assignmentKey"); } public GovernanceAssignment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceAssignments() - .getWithResponse(scope, assessmentName, assignmentKey, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceAssignments() + .getWithResponse(scope, assessmentName, assignmentKey, Context.NONE).getValue(); return this; } public GovernanceAssignment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceAssignments() - .getWithResponse(scope, assessmentName, assignmentKey, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceAssignments() + .getWithResponse(scope, assessmentName, assignmentKey, context).getValue(); return this; } @@ -188,8 +157,8 @@ public GovernanceAssignmentImpl withIsGracePeriod(Boolean isGracePeriod) { return this; } - public GovernanceAssignmentImpl withGovernanceEmailNotification( - GovernanceEmailNotification governanceEmailNotification) { + public GovernanceAssignmentImpl + withGovernanceEmailNotification(GovernanceEmailNotification governanceEmailNotification) { this.innerModel().withGovernanceEmailNotification(governanceEmailNotification); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsClientImpl.java index 2f964e6ef3ee..fc42a58cdcdb 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsClientImpl.java @@ -33,23 +33,28 @@ import com.azure.resourcemanager.security.models.GovernanceAssignmentsList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in GovernanceAssignmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in GovernanceAssignmentsClient. + */ public final class GovernanceAssignmentsClientImpl implements GovernanceAssignmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final GovernanceAssignmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of GovernanceAssignmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ GovernanceAssignmentsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(GovernanceAssignmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(GovernanceAssignmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,89 +65,68 @@ public final class GovernanceAssignmentsClientImpl implements GovernanceAssignme @Host("{$host}") @ServiceInterface(name = "SecurityCenterGovern") public interface GovernanceAssignmentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("assessmentName") String assessmentName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("assessmentName") String assessmentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("assessmentName") String assessmentName, - @PathParam("assignmentKey") String assignmentKey, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("assessmentName") String assessmentName, @PathParam("assignmentKey") String assignmentKey, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Put("/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("assessmentName") String assessmentName, - @PathParam("assignmentKey") String assignmentKey, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("assessmentName") String assessmentName, @PathParam("assignmentKey") String assignmentKey, @BodyParam("application/json") GovernanceAssignmentInner governanceAssignment, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}") - @ExpectedResponses({200, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("assessmentName") String assessmentName, - @PathParam("assignmentKey") String assignmentKey, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("scope") String scope, @PathParam("assessmentName") String assessmentName, + @PathParam("assignmentKey") String assignmentKey, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return governance assignments on all of your resources inside a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, String assessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -155,40 +139,31 @@ private Mono> listSinglePageAsync(Strin return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), apiVersion, scope, assessmentName, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return governance assignments on all of your resources inside a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String scope, String assessmentName, Context context) { + private Mono> listSinglePageAsync(String scope, String assessmentName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -199,71 +174,62 @@ private Mono> listSinglePageAsync( final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, assessmentName, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, assessmentName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignments on all of your resources inside a scope as paginated response with {@link - * PagedFlux}. + * @return governance assignments on all of your resources inside a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, String assessmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, assessmentName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, assessmentName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignments on all of your resources inside a scope as paginated response with {@link - * PagedFlux}. + * @return governance assignments on all of your resources inside a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, String assessmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, assessmentName, context), + return new PagedFlux<>(() -> listSinglePageAsync(scope, assessmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignments on all of your resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return governance assignments on all of your resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope, String assessmentName) { @@ -272,17 +238,17 @@ public PagedIterable list(String scope, String assess /** * Get governance assignments on all of your resources inside a scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignments on all of your resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return governance assignments on all of your resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope, String assessmentName, Context context) { @@ -291,26 +257,24 @@ public PagedIterable list(String scope, String assess /** * Get a specific governanceAssignment for the requested scope by AssignmentKey. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific governanceAssignment for the requested scope by AssignmentKey along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, String assessmentName, String assignmentKey) { + private Mono> getWithResponseAsync(String scope, String assessmentName, + String assignmentKey) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -324,26 +288,17 @@ private Mono> getWithResponseAsync( final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - scope, - assessmentName, - assignmentKey, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, scope, assessmentName, + assignmentKey, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a specific governanceAssignment for the requested scope by AssignmentKey. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param context The context to associate with this operation. @@ -351,16 +306,14 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific governanceAssignment for the requested scope by AssignmentKey along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, String assessmentName, String assignmentKey, Context context) { + private Mono> getWithResponseAsync(String scope, String assessmentName, + String assignmentKey, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -374,23 +327,23 @@ private Mono> getWithResponseAsync( final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), apiVersion, scope, assessmentName, assignmentKey, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, scope, assessmentName, assignmentKey, accept, + context); } /** * Get a specific governanceAssignment for the requested scope by AssignmentKey. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific governanceAssignment for the requested scope by AssignmentKey on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String scope, String assessmentName, String assignmentKey) { @@ -400,10 +353,10 @@ private Mono getAsync(String scope, String assessment /** * Get a specific governanceAssignment for the requested scope by AssignmentKey. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param context The context to associate with this operation. @@ -413,17 +366,17 @@ private Mono getAsync(String scope, String assessment * @return a specific governanceAssignment for the requested scope by AssignmentKey along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String scope, String assessmentName, String assignmentKey, Context context) { + public Response getWithResponse(String scope, String assessmentName, + String assignmentKey, Context context) { return getWithResponseAsync(scope, assessmentName, assignmentKey, context).block(); } /** * Get a specific governanceAssignment for the requested scope by AssignmentKey. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -438,27 +391,25 @@ public GovernanceAssignmentInner get(String scope, String assessmentName, String /** * Creates or updates a governance assignment on the given subscription. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param governanceAssignment Governance assignment over a subscription scope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignment over a given scope along with {@link Response} on successful completion of {@link - * Mono}. + * @return governance assignment over a given scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, String assessmentName, String assignmentKey, GovernanceAssignmentInner governanceAssignment) { + private Mono> createOrUpdateWithResponseAsync(String scope, + String assessmentName, String assignmentKey, GovernanceAssignmentInner governanceAssignment) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -478,27 +429,17 @@ private Mono> createOrUpdateWithResponseAsyn final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - scope, - assessmentName, - assignmentKey, - governanceAssignment, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, scope, assessmentName, + assignmentKey, governanceAssignment, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a governance assignment on the given subscription. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param governanceAssignment Governance assignment over a subscription scope. @@ -506,21 +447,15 @@ private Mono> createOrUpdateWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return governance assignment over a given scope along with {@link Response} on successful completion of {@link - * Mono}. + * @return governance assignment over a given scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, - String assessmentName, - String assignmentKey, - GovernanceAssignmentInner governanceAssignment, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String scope, + String assessmentName, String assignmentKey, GovernanceAssignmentInner governanceAssignment, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -540,24 +475,16 @@ private Mono> createOrUpdateWithResponseAsyn final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - scope, - assessmentName, - assignmentKey, - governanceAssignment, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, scope, assessmentName, assignmentKey, + governanceAssignment, accept, context); } /** * Creates or updates a governance assignment on the given subscription. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param governanceAssignment Governance assignment over a subscription scope. @@ -567,18 +494,18 @@ private Mono> createOrUpdateWithResponseAsyn * @return governance assignment over a given scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String scope, String assessmentName, String assignmentKey, GovernanceAssignmentInner governanceAssignment) { + private Mono createOrUpdateAsync(String scope, String assessmentName, + String assignmentKey, GovernanceAssignmentInner governanceAssignment) { return createOrUpdateWithResponseAsync(scope, assessmentName, assignmentKey, governanceAssignment) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a governance assignment on the given subscription. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param governanceAssignment Governance assignment over a subscription scope. @@ -589,22 +516,18 @@ private Mono createOrUpdateAsync( * @return governance assignment over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String scope, - String assessmentName, - String assignmentKey, - GovernanceAssignmentInner governanceAssignment, - Context context) { + public Response createOrUpdateWithResponse(String scope, String assessmentName, + String assignmentKey, GovernanceAssignmentInner governanceAssignment, Context context) { return createOrUpdateWithResponseAsync(scope, assessmentName, assignmentKey, governanceAssignment, context) .block(); } /** * Creates or updates a governance assignment on the given subscription. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param governanceAssignment Governance assignment over a subscription scope. @@ -614,18 +537,18 @@ public Response createOrUpdateWithResponse( * @return governance assignment over a given scope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GovernanceAssignmentInner createOrUpdate( - String scope, String assessmentName, String assignmentKey, GovernanceAssignmentInner governanceAssignment) { + public GovernanceAssignmentInner createOrUpdate(String scope, String assessmentName, String assignmentKey, + GovernanceAssignmentInner governanceAssignment) { return createOrUpdateWithResponse(scope, assessmentName, assignmentKey, governanceAssignment, Context.NONE) .getValue(); } /** * Delete a GovernanceAssignment over a given scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -636,10 +559,8 @@ public GovernanceAssignmentInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String scope, String assessmentName, String assignmentKey) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -652,19 +573,17 @@ private Mono> deleteWithResponseAsync(String scope, String assess } final String apiVersion = "2022-01-01-preview"; return FluxUtil - .withContext( - context -> - service - .delete(this.client.getEndpoint(), apiVersion, scope, assessmentName, assignmentKey, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, scope, assessmentName, + assignmentKey, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a GovernanceAssignment over a given scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param context The context to associate with this operation. @@ -674,13 +593,11 @@ private Mono> deleteWithResponseAsync(String scope, String assess * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String scope, String assessmentName, String assignmentKey, Context context) { + private Mono> deleteWithResponseAsync(String scope, String assessmentName, String assignmentKey, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -698,10 +615,10 @@ private Mono> deleteWithResponseAsync( /** * Delete a GovernanceAssignment over a given scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -716,10 +633,10 @@ private Mono deleteAsync(String scope, String assessmentName, String assig /** * Delete a GovernanceAssignment over a given scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @param context The context to associate with this operation. @@ -729,17 +646,17 @@ private Mono deleteAsync(String scope, String assessmentName, String assig * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String scope, String assessmentName, String assignmentKey, Context context) { + public Response deleteWithResponse(String scope, String assessmentName, String assignmentKey, + Context context) { return deleteWithResponseAsync(scope, assessmentName, assignmentKey, context).block(); } /** * Delete a GovernanceAssignment over a given scope. - * + * * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param assessmentName The Assessment Key - A unique key for the assessment type. * @param assignmentKey The governance assignment key - the assessment key of the required governance assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -753,14 +670,15 @@ public void delete(String scope, String assessmentName, String assignmentKey) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a governance assignments list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a governance assignments list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -768,37 +686,28 @@ private Mono> listNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a governance assignments list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a governance assignments list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -806,23 +715,13 @@ private Mono> listNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsImpl.java index d02b5180c6c0..54e9df9a52e2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceAssignmentsImpl.java @@ -21,31 +21,28 @@ public final class GovernanceAssignmentsImpl implements GovernanceAssignments { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public GovernanceAssignmentsImpl( - GovernanceAssignmentsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public GovernanceAssignmentsImpl(GovernanceAssignmentsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String scope, String assessmentName) { PagedIterable inner = this.serviceClient().list(scope, assessmentName); - return Utils.mapPage(inner, inner1 -> new GovernanceAssignmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GovernanceAssignmentImpl(inner1, this.manager())); } public PagedIterable list(String scope, String assessmentName, Context context) { PagedIterable inner = this.serviceClient().list(scope, assessmentName, context); - return Utils.mapPage(inner, inner1 -> new GovernanceAssignmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GovernanceAssignmentImpl(inner1, this.manager())); } - public Response getWithResponse( - String scope, String assessmentName, String assignmentKey, Context context) { - Response inner = - this.serviceClient().getWithResponse(scope, assessmentName, assignmentKey, context); + public Response getWithResponse(String scope, String assessmentName, String assignmentKey, + Context context) { + Response inner + = this.serviceClient().getWithResponse(scope, assessmentName, assignmentKey, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new GovernanceAssignmentImpl(inner.getValue(), this.manager())); } else { return null; @@ -61,8 +58,8 @@ public GovernanceAssignment get(String scope, String assessmentName, String assi } } - public Response deleteWithResponse( - String scope, String assessmentName, String assignmentKey, Context context) { + public Response deleteWithResponse(String scope, String assessmentName, String assignmentKey, + Context context) { return this.serviceClient().deleteWithResponse(scope, assessmentName, assignmentKey, context); } @@ -71,173 +68,101 @@ public void delete(String scope, String assessmentName, String assignmentKey) { } public GovernanceAssignment getById(String id) { - String scope = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } - String assignmentKey = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assignmentKey"); + String assignmentKey = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assignmentKey"); if (assignmentKey == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", id))); } return this.getWithResponse(scope, assessmentName, assignmentKey, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String scope = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } - String assignmentKey = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assignmentKey"); + String assignmentKey = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assignmentKey"); if (assignmentKey == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", id))); } return this.getWithResponse(scope, assessmentName, assignmentKey, context); } public void deleteById(String id) { - String scope = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } - String assignmentKey = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assignmentKey"); + String assignmentKey = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assignmentKey"); if (assignmentKey == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", id))); } this.deleteWithResponse(scope, assessmentName, assignmentKey, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String scope = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String assessmentName = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assessmentName"); + String assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assessmentName"); if (assessmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'assessments'.", id))); } - String assignmentKey = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", - "assignmentKey"); + String assignmentKey = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", + "assignmentKey"); if (assignmentKey == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceAssignments'.", id))); } return this.deleteWithResponse(scope, assessmentName, assignmentKey, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRuleImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRuleImpl.java index da9ab6f2522b..8d633f301656 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRuleImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRuleImpl.java @@ -121,22 +121,14 @@ public GovernanceRuleImpl withExistingScope(String scope) { } public GovernanceRule create() { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceRules() - .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceRules() + .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), Context.NONE).getValue(); return this; } public GovernanceRule create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceRules() - .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceRules() + .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), context).getValue(); return this; } @@ -151,48 +143,36 @@ public GovernanceRuleImpl update() { } public GovernanceRule apply() { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceRules() - .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceRules() + .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), Context.NONE).getValue(); return this; } public GovernanceRule apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGovernanceRules() - .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceRules() + .createOrUpdateWithResponse(scope, ruleId, this.innerModel(), context).getValue(); return this; } - GovernanceRuleImpl( - GovernanceRuleInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + GovernanceRuleImpl(GovernanceRuleInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.scope = - Utils - .getValueFromIdByParameterName( - innerObject.id(), "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); - this.ruleId = - Utils - .getValueFromIdByParameterName( - innerObject.id(), "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); + this.scope = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); + this.ruleId = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); } public GovernanceRule refresh() { - this.innerObject = - serviceManager.serviceClient().getGovernanceRules().getWithResponse(scope, ruleId, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient().getGovernanceRules() + .getWithResponse(scope, ruleId, Context.NONE).getValue(); return this; } public GovernanceRule refresh(Context context) { - this.innerObject = - serviceManager.serviceClient().getGovernanceRules().getWithResponse(scope, ruleId, context).getValue(); + this.innerObject + = serviceManager.serviceClient().getGovernanceRules().getWithResponse(scope, ruleId, context).getValue(); return this; } @@ -264,8 +244,8 @@ public GovernanceRuleImpl withOwnerSource(GovernanceRuleOwnerSource ownerSource) return this; } - public GovernanceRuleImpl withGovernanceEmailNotification( - GovernanceRuleEmailNotification governanceEmailNotification) { + public GovernanceRuleImpl + withGovernanceEmailNotification(GovernanceRuleEmailNotification governanceEmailNotification) { this.innerModel().withGovernanceEmailNotification(governanceEmailNotification); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesClientImpl.java index 011360e5c693..9edfb6e6a036 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesClientImpl.java @@ -42,22 +42,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in GovernanceRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in GovernanceRulesClient. + */ public final class GovernanceRulesClientImpl implements GovernanceRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final GovernanceRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of GovernanceRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ GovernanceRulesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(GovernanceRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(GovernanceRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -68,110 +74,84 @@ public final class GovernanceRulesClientImpl implements GovernanceRulesClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterGovern") public interface GovernanceRulesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/governanceRules") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("ruleId") String ruleId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("ruleId") String ruleId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("ruleId") String ruleId, - @BodyParam("application/json") GovernanceRuleInner governanceRule, - @HeaderParam("Accept") String accept, - Context context); + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("ruleId") String ruleId, @BodyParam("application/json") GovernanceRuleInner governanceRule, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("ruleId") String ruleId, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("ruleId") String ruleId, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}/execute") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> execute( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, + Mono>> execute(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, @PathParam("ruleId") String ruleId, @BodyParam("application/json") ExecuteGovernanceRuleParams executeGovernanceRuleParams, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono operationResults( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("scope") String scope, - @PathParam("ruleId") String ruleId, - @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, - Context context); + Mono operationResults(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("scope") String scope, + @PathParam("ruleId") String ruleId, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant governance rules over a scope along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -180,39 +160,30 @@ private Mono> listSinglePageAsync(String scop final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant governance rules over a scope along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -220,26 +191,18 @@ private Mono> listSinglePageAsync(String scop final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -252,11 +215,11 @@ private PagedFlux listAsync(String scope) { /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -265,17 +228,17 @@ private PagedFlux listAsync(String scope) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -288,11 +251,11 @@ public PagedIterable list(String scope) { /** * Get a list of all relevant governance rules over a scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -306,25 +269,23 @@ public PagedIterable list(String scope, Context context) { /** * Get a specific governance rule for the requested scope by ruleId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific governance rule for the requested scope by ruleId along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scope, String ruleId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -341,26 +302,24 @@ private Mono> getWithResponseAsync(String scope, S /** * Get a specific governance rule for the requested scope by ruleId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific governance rule for the requested scope by ruleId along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scope, String ruleId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -376,11 +335,11 @@ private Mono> getWithResponseAsync(String scope, S /** * Get a specific governance rule for the requested scope by ruleId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -394,11 +353,11 @@ private Mono getAsync(String scope, String ruleId) { /** * Get a specific governance rule for the requested scope by ruleId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -413,11 +372,11 @@ public Response getWithResponse(String scope, String ruleId /** * Get a specific governance rule for the requested scope by ruleId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -431,11 +390,11 @@ public GovernanceRuleInner get(String scope, String ruleId) { /** * Creates or updates a governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param governanceRule Governance rule over a given scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -444,13 +403,11 @@ public GovernanceRuleInner get(String scope, String ruleId) { * @return governance rule over a given scope along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, String ruleId, GovernanceRuleInner governanceRule) { + private Mono> createOrUpdateWithResponseAsync(String scope, String ruleId, + GovernanceRuleInner governanceRule) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -466,21 +423,18 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), apiVersion, scope, ruleId, governanceRule, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, scope, ruleId, + governanceRule, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param governanceRule Governance rule over a given scope. * @param context The context to associate with this operation. @@ -490,13 +444,11 @@ private Mono> createOrUpdateWithResponseAsync( * @return governance rule over a given scope along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, String ruleId, GovernanceRuleInner governanceRule, Context context) { + private Mono> createOrUpdateWithResponseAsync(String scope, String ruleId, + GovernanceRuleInner governanceRule, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -512,17 +464,17 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate(this.client.getEndpoint(), apiVersion, scope, ruleId, governanceRule, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, scope, ruleId, governanceRule, accept, + context); } /** * Creates or updates a governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param governanceRule Governance rule over a given scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -531,19 +483,19 @@ private Mono> createOrUpdateWithResponseAsync( * @return governance rule over a given scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String scope, String ruleId, GovernanceRuleInner governanceRule) { + private Mono createOrUpdateAsync(String scope, String ruleId, + GovernanceRuleInner governanceRule) { return createOrUpdateWithResponseAsync(scope, ruleId, governanceRule) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param governanceRule Governance rule over a given scope. * @param context The context to associate with this operation. @@ -553,18 +505,18 @@ private Mono createOrUpdateAsync( * @return governance rule over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String scope, String ruleId, GovernanceRuleInner governanceRule, Context context) { + public Response createOrUpdateWithResponse(String scope, String ruleId, + GovernanceRuleInner governanceRule, Context context) { return createOrUpdateWithResponseAsync(scope, ruleId, governanceRule, context).block(); } /** * Creates or updates a governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param governanceRule Governance rule over a given scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -579,11 +531,11 @@ public GovernanceRuleInner createOrUpdate(String scope, String ruleId, Governanc /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -593,10 +545,8 @@ public GovernanceRuleInner createOrUpdate(String scope, String ruleId, Governanc @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String scope, String ruleId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -612,11 +562,11 @@ private Mono>> deleteWithResponseAsync(String scope, S /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -627,10 +577,8 @@ private Mono>> deleteWithResponseAsync(String scope, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String scope, String ruleId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -645,11 +593,11 @@ private Mono>> deleteWithResponseAsync(String scope, S /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -659,19 +607,17 @@ private Mono>> deleteWithResponseAsync(String scope, S @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String scope, String ruleId) { Mono>> mono = deleteWithResponseAsync(scope, ruleId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -683,18 +629,17 @@ private PollerFlux, Void> beginDeleteAsync(String scope, String private PollerFlux, Void> beginDeleteAsync(String scope, String ruleId, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(scope, ruleId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -708,11 +653,11 @@ public SyncPoller, Void> beginDelete(String scope, String ruleI /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -727,11 +672,11 @@ public SyncPoller, Void> beginDelete(String scope, String ruleI /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -745,11 +690,11 @@ private Mono deleteAsync(String scope, String ruleId) { /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -764,11 +709,11 @@ private Mono deleteAsync(String scope, String ruleId, Context context) { /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -781,11 +726,11 @@ public void delete(String scope, String ruleId) { /** * Delete a Governance rule over a given scope. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -799,11 +744,11 @@ public void delete(String scope, String ruleId, Context context) { /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -812,13 +757,11 @@ public void delete(String scope, String ruleId, Context context) { * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> executeWithResponseAsync( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams) { + private Mono>> executeWithResponseAsync(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -832,27 +775,18 @@ private Mono>> executeWithResponseAsync( final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .execute( - this.client.getEndpoint(), - apiVersion, - scope, - ruleId, - executeGovernanceRuleParams, - accept, - context)) + .withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, scope, ruleId, + executeGovernanceRuleParams, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @param context The context to associate with this operation. @@ -862,13 +796,11 @@ private Mono>> executeWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> executeWithResponseAsync( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { + private Mono>> executeWithResponseAsync(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -882,18 +814,17 @@ private Mono>> executeWithResponseAsync( final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .execute( - this.client.getEndpoint(), apiVersion, scope, ruleId, executeGovernanceRuleParams, accept, context); + return service.execute(this.client.getEndpoint(), apiVersion, scope, ruleId, executeGovernanceRuleParams, + accept, context); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -902,22 +833,20 @@ private Mono>> executeWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginExecuteAsync( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams) { + private PollerFlux, Void> beginExecuteAsync(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams) { Mono>> mono = executeWithResponseAsync(scope, ruleId, executeGovernanceRuleParams); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -928,19 +857,17 @@ private PollerFlux, Void> beginExecuteAsync( private PollerFlux, Void> beginExecuteAsync(String scope, String ruleId) { final ExecuteGovernanceRuleParams executeGovernanceRuleParams = null; Mono>> mono = executeWithResponseAsync(scope, ruleId, executeGovernanceRuleParams); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @param context The context to associate with this operation. @@ -950,23 +877,22 @@ private PollerFlux, Void> beginExecuteAsync(String scope, Strin * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginExecuteAsync( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { + private PollerFlux, Void> beginExecuteAsync(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - executeWithResponseAsync(scope, ruleId, executeGovernanceRuleParams, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = executeWithResponseAsync(scope, ruleId, executeGovernanceRuleParams, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -981,11 +907,11 @@ public SyncPoller, Void> beginExecute(String scope, String rule /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @param context The context to associate with this operation. @@ -995,18 +921,18 @@ public SyncPoller, Void> beginExecute(String scope, String rule * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginExecute( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { + public SyncPoller, Void> beginExecute(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { return this.beginExecuteAsync(scope, ruleId, executeGovernanceRuleParams, context).getSyncPoller(); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1015,20 +941,19 @@ public SyncPoller, Void> beginExecute( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono executeAsync( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams) { - return beginExecuteAsync(scope, ruleId, executeGovernanceRuleParams) - .last() + private Mono executeAsync(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams) { + return beginExecuteAsync(scope, ruleId, executeGovernanceRuleParams).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1038,18 +963,17 @@ private Mono executeAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync(String scope, String ruleId) { final ExecuteGovernanceRuleParams executeGovernanceRuleParams = null; - return beginExecuteAsync(scope, ruleId, executeGovernanceRuleParams) - .last() + return beginExecuteAsync(scope, ruleId, executeGovernanceRuleParams).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @param context The context to associate with this operation. @@ -1059,20 +983,19 @@ private Mono executeAsync(String scope, String ruleId) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono executeAsync( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { - return beginExecuteAsync(scope, ruleId, executeGovernanceRuleParams, context) - .last() + private Mono executeAsync(String scope, String ruleId, + ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { + return beginExecuteAsync(scope, ruleId, executeGovernanceRuleParams, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1086,11 +1009,11 @@ public void execute(String scope, String ruleId) { /** * Execute a governance rule. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param executeGovernanceRuleParams Execute governance rule over a given scope. * @param context The context to associate with this operation. @@ -1099,34 +1022,32 @@ public void execute(String scope, String ruleId) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void execute( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { + public void execute(String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, + Context context) { executeAsync(scope, ruleId, executeGovernanceRuleParams, context).block(); } /** * Get governance rules long run operation result for the requested scope by ruleId and operationId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param operationId The governance rule long running operation unique key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return governance rules long run operation result for the requested scope by ruleId and operationId on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono operationResultsWithResponseAsync( - String scope, String ruleId, String operationId) { + private Mono operationResultsWithResponseAsync(String scope, String ruleId, + String operationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -1140,21 +1061,18 @@ private Mono operationResultsWithRespon final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .operationResults( - this.client.getEndpoint(), apiVersion, scope, ruleId, operationId, accept, context)) + .withContext(context -> service.operationResults(this.client.getEndpoint(), apiVersion, scope, ruleId, + operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get governance rules long run operation result for the requested scope by ruleId and operationId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param operationId The governance rule long running operation unique key. * @param context The context to associate with this operation. @@ -1162,16 +1080,14 @@ private Mono operationResultsWithRespon * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return governance rules long run operation result for the requested scope by ruleId and operationId on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono operationResultsWithResponseAsync( - String scope, String ruleId, String operationId, Context context) { + private Mono operationResultsWithResponseAsync(String scope, String ruleId, + String operationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -1185,39 +1101,39 @@ private Mono operationResultsWithRespon final String apiVersion = "2022-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .operationResults(this.client.getEndpoint(), apiVersion, scope, ruleId, operationId, accept, context); + return service.operationResults(this.client.getEndpoint(), apiVersion, scope, ruleId, operationId, accept, + context); } /** * Get governance rules long run operation result for the requested scope by ruleId and operationId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param operationId The governance rule long running operation unique key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return governance rules long run operation result for the requested scope by ruleId and operationId on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono operationResultsAsync( - String scope, String ruleId, String operationId) { + private Mono operationResultsAsync(String scope, String ruleId, + String operationId) { return operationResultsWithResponseAsync(scope, ruleId, operationId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get governance rules long run operation result for the requested scope by ruleId and operationId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param operationId The governance rule long running operation unique key. * @param context The context to associate with this operation. @@ -1227,18 +1143,18 @@ private Mono operationResultsAsync( * @return governance rules long run operation result for the requested scope by ruleId and operationId. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GovernanceRulesOperationResultsResponse operationResultsWithResponse( - String scope, String ruleId, String operationId, Context context) { + public GovernanceRulesOperationResultsResponse operationResultsWithResponse(String scope, String ruleId, + String operationId, Context context) { return operationResultsWithResponseAsync(scope, ruleId, operationId, context).block(); } /** * Get governance rules long run operation result for the requested scope by ruleId and operationId. - * + * * @param scope The scope of the Governance rules. Valid scopes are: management group (format: - * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: - * 'subscriptions/{subscriptionId}'), or security connector (format: - * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. * @param ruleId The governance rule key - unique key for the standard governance rule (GUID). * @param operationId The governance rule long running operation unique key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1253,14 +1169,15 @@ public OperationResultAutoGeneratedInner operationResults(String scope, String r /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a governance rules list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a governance rules list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1268,37 +1185,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a governance rules list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a governance rules list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1306,23 +1214,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesImpl.java index 30860d8f1e41..d225d2c02b16 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/GovernanceRulesImpl.java @@ -25,29 +25,26 @@ public final class GovernanceRulesImpl implements GovernanceRules { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public GovernanceRulesImpl( - GovernanceRulesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public GovernanceRulesImpl(GovernanceRulesClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String scope) { PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new GovernanceRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GovernanceRuleImpl(inner1, this.manager())); } public PagedIterable list(String scope, Context context) { PagedIterable inner = this.serviceClient().list(scope, context); - return Utils.mapPage(inner, inner1 -> new GovernanceRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GovernanceRuleImpl(inner1, this.manager())); } public Response getWithResponse(String scope, String ruleId, Context context) { Response inner = this.serviceClient().getWithResponse(scope, ruleId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new GovernanceRuleImpl(inner.getValue(), this.manager())); } else { return null; @@ -75,20 +72,17 @@ public void execute(String scope, String ruleId) { this.serviceClient().execute(scope, ruleId); } - public void execute( - String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context) { + public void execute(String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, + Context context) { this.serviceClient().execute(scope, ruleId, executeGovernanceRuleParams, context); } - public Response operationResultsWithResponse( - String scope, String ruleId, String operationId, Context context) { - GovernanceRulesOperationResultsResponse inner = - this.serviceClient().operationResultsWithResponse(scope, ruleId, operationId, context); + public Response operationResultsWithResponse(String scope, String ruleId, + String operationId, Context context) { + GovernanceRulesOperationResultsResponse inner + = this.serviceClient().operationResultsWithResponse(scope, ruleId, operationId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OperationResultAutoGeneratedImpl(inner.getValue(), this.manager())); } else { return null; @@ -105,101 +99,65 @@ public OperationResultAutoGenerated operationResults(String scope, String ruleId } public GovernanceRule getById(String id) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String ruleId = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); + String ruleId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); } return this.getWithResponse(scope, ruleId, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String ruleId = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); + String ruleId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); } return this.getWithResponse(scope, ruleId, context); } public void deleteById(String id) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String ruleId = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); + String ruleId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); } this.delete(scope, ruleId, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String ruleId = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); + String ruleId = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", "ruleId"); if (ruleId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'governanceRules'.", id))); } this.delete(scope, ruleId, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportImpl.java index e93fab68ae8e..f238c398a50c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportImpl.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.security.models.StatusAutoGenerated; import java.util.Collections; import java.util.List; +import java.util.Map; public final class HealthReportImpl implements HealthReport { private HealthReportInner innerObject; @@ -61,6 +62,24 @@ public List affectedDefendersPlans() { } } + public List affectedDefendersSubPlans() { + List inner = this.innerModel().affectedDefendersSubPlans(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Map reportAdditionalData() { + Map inner = this.innerModel().reportAdditionalData(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + public List issues() { List inner = this.innerModel().issues(); if (inner != null) { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsClientImpl.java deleted file mode 100644 index d2c16f0a8577..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsClientImpl.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.security.fluent.HealthReportOperationsClient; -import com.azure.resourcemanager.security.fluent.models.HealthReportInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in HealthReportOperationsClient. */ -public final class HealthReportOperationsClientImpl implements HealthReportOperationsClient { - /** The proxy service used to perform REST calls. */ - private final HealthReportOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of HealthReportOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - HealthReportOperationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(HealthReportOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterHealthReportOperations to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterHealth") - public interface HealthReportOperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/{resourceId}/providers/Microsoft.Security/healthReports/{healthReportName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("healthReportName") String healthReportName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get health report of resource. - * - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return health report of resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceId, String healthReportName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceId == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); - } - if (healthReportName == null) { - return Mono - .error(new IllegalArgumentException("Parameter healthReportName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.get(this.client.getEndpoint(), apiVersion, resourceId, healthReportName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get health report of resource. - * - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return health report of resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceId, String healthReportName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceId == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); - } - if (healthReportName == null) { - return Mono - .error(new IllegalArgumentException("Parameter healthReportName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, resourceId, healthReportName, accept, context); - } - - /** - * Get health report of resource. - * - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return health report of resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceId, String healthReportName) { - return getWithResponseAsync(resourceId, healthReportName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get health report of resource. - * - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return health report of resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceId, String healthReportName, Context context) { - return getWithResponseAsync(resourceId, healthReportName, context).block(); - } - - /** - * Get health report of resource. - * - * @param resourceId The identifier of the resource. - * @param healthReportName The health report Key - Unique key for the health report type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return health report of resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public HealthReportInner get(String resourceId, String healthReportName) { - return getWithResponse(resourceId, healthReportName, Context.NONE).getValue(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsImpl.java deleted file mode 100644 index 6824b37162f9..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportOperationsImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.HealthReportOperationsClient; -import com.azure.resourcemanager.security.fluent.models.HealthReportInner; -import com.azure.resourcemanager.security.models.HealthReport; -import com.azure.resourcemanager.security.models.HealthReportOperations; - -public final class HealthReportOperationsImpl implements HealthReportOperations { - private static final ClientLogger LOGGER = new ClientLogger(HealthReportOperationsImpl.class); - - private final HealthReportOperationsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public HealthReportOperationsImpl( - HealthReportOperationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceId, String healthReportName, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceId, healthReportName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new HealthReportImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public HealthReport get(String resourceId, String healthReportName) { - HealthReportInner inner = this.serviceClient().get(resourceId, healthReportName); - if (inner != null) { - return new HealthReportImpl(inner, this.manager()); - } else { - return null; - } - } - - private HealthReportOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsClientImpl.java index 06047bcaac58..f1e296fdb557 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.HealthReportsList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in HealthReportsClient. */ +/** + * An instance of this class provides access to all the operations defined in HealthReportsClient. + */ public final class HealthReportsClientImpl implements HealthReportsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final HealthReportsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of HealthReportsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ HealthReportsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(HealthReportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(HealthReportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,64 +62,59 @@ public final class HealthReportsClientImpl implements HealthReportsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterHealth") public interface HealthReportsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/healthReports") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceId}/providers/Microsoft.Security/healthReports/{healthReportName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, + @PathParam(value = "resourceId", encoded = true) String resourceId, + @PathParam("healthReportName") String healthReportName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all health reports inside a scope along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } - final String apiVersion = "2023-02-01-preview"; + final String apiVersion = "2023-05-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -121,47 +122,37 @@ private Mono> listSinglePageAsync(String scope) * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all health reports inside a scope along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } - final String apiVersion = "2023-02-01-preview"; + final String apiVersion = "2023-05-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -177,7 +168,7 @@ private PagedFlux listAsync(String scope) { * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,15 +178,15 @@ private PagedFlux listAsync(String scope) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -211,7 +202,7 @@ public PagedIterable list(String scope) { * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: * 'subscriptions/{subscriptionId}'), or security connector (format: * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'. - * + * * @param scope The scope at which the operation is performed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -224,11 +215,120 @@ public PagedIterable list(String scope, Context context) { return new PagedIterable<>(listAsync(scope, context)); } + /** + * Get health report of resource. + * + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return health report of resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceId, String healthReportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); + } + if (healthReportName == null) { + return Mono + .error(new IllegalArgumentException("Parameter healthReportName is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, resourceId, healthReportName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get health report of resource. + * + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return health report of resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceId, String healthReportName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); + } + if (healthReportName == null) { + return Mono + .error(new IllegalArgumentException("Parameter healthReportName is required and cannot be null.")); + } + final String apiVersion = "2023-05-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, resourceId, healthReportName, accept, context); + } + + /** + * Get health report of resource. + * + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return health report of resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceId, String healthReportName) { + return getWithResponseAsync(resourceId, healthReportName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get health report of resource. + * + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return health report of resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceId, String healthReportName, Context context) { + return getWithResponseAsync(resourceId, healthReportName, context).block(); + } + + /** + * Get health report of resource. + * + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return health report of resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HealthReportInner get(String resourceId, String healthReportName) { + return getWithResponse(resourceId, healthReportName, Context.NONE).getValue(); + } + /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -240,31 +340,22 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -277,23 +368,13 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsImpl.java index cf87726c0272..4fea8a3b2f19 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/HealthReportsImpl.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.security.implementation; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.security.fluent.HealthReportsClient; @@ -19,20 +21,39 @@ public final class HealthReportsImpl implements HealthReports { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public HealthReportsImpl( - HealthReportsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public HealthReportsImpl(HealthReportsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String scope) { PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new HealthReportImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthReportImpl(inner1, this.manager())); } public PagedIterable list(String scope, Context context) { PagedIterable inner = this.serviceClient().list(scope, context); - return Utils.mapPage(inner, inner1 -> new HealthReportImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthReportImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceId, String healthReportName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceId, healthReportName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new HealthReportImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HealthReport get(String resourceId, String healthReportName) { + HealthReportInner inner = this.serviceClient().get(resourceId, healthReportName); + if (inner != null) { + return new HealthReportImpl(inner, this.manager()); + } else { + return null; + } } private HealthReportsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesClientImpl.java index c766c7e38b84..23db3021a2bd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesClientImpl.java @@ -33,26 +33,28 @@ import com.azure.resourcemanager.security.models.InformationProtectionPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in InformationProtectionPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in InformationProtectionPoliciesClient. + */ public final class InformationProtectionPoliciesClientImpl implements InformationProtectionPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final InformationProtectionPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of InformationProtectionPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ InformationProtectionPoliciesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - InformationProtectionPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(InformationProtectionPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,60 +65,47 @@ public final class InformationProtectionPoliciesClientImpl implements Informatio @Host("{$host}") @ServiceInterface(name = "SecurityCenterInform") public interface InformationProtectionPoliciesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("informationProtectionPolicyName") - InformationProtectionPolicyName informationProtectionPolicyName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @PathParam("informationProtectionPolicyName") InformationProtectionPolicyName informationProtectionPolicyName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("informationProtectionPolicyName") - InformationProtectionPolicyName informationProtectionPolicyName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @PathParam("informationProtectionPolicyName") InformationProtectionPolicyName informationProtectionPolicyName, @BodyParam("application/json") InformationProtectionPolicyInner informationProtectionPolicy, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/informationProtectionPolicies") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -124,44 +113,32 @@ Mono> listNext( * @return information protection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, InformationProtectionPolicyName informationProtectionPolicyName) { + private Mono> getWithResponseAsync(String scope, + InformationProtectionPolicyName informationProtectionPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } if (informationProtectionPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter informationProtectionPolicyName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter informationProtectionPolicyName is required and cannot be null.")); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - scope, - informationProtectionPolicyName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, scope, + informationProtectionPolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,35 +147,31 @@ private Mono> getWithResponseAsync( * @return information protection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, InformationProtectionPolicyName informationProtectionPolicyName, Context context) { + private Mono> getWithResponseAsync(String scope, + InformationProtectionPolicyName informationProtectionPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } if (informationProtectionPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter informationProtectionPolicyName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter informationProtectionPolicyName is required and cannot be null.")); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), apiVersion, scope, informationProtectionPolicyName, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, scope, informationProtectionPolicyName, accept, + context); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -206,17 +179,17 @@ private Mono> getWithResponseAsync( * @return information protection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String scope, InformationProtectionPolicyName informationProtectionPolicyName) { + private Mono getAsync(String scope, + InformationProtectionPolicyName informationProtectionPolicyName) { return getWithResponseAsync(scope, informationProtectionPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -225,16 +198,16 @@ private Mono getAsync( * @return information protection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String scope, InformationProtectionPolicyName informationProtectionPolicyName, Context context) { + public Response getWithResponse(String scope, + InformationProtectionPolicyName informationProtectionPolicyName, Context context) { return getWithResponseAsync(scope, informationProtectionPolicyName, context).block(); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -242,16 +215,16 @@ public Response getWithResponse( * @return information protection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InformationProtectionPolicyInner get( - String scope, InformationProtectionPolicyName informationProtectionPolicyName) { + public InformationProtectionPolicyInner get(String scope, + InformationProtectionPolicyName informationProtectionPolicyName) { return getWithResponse(scope, informationProtectionPolicyName, Context.NONE).getValue(); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param informationProtectionPolicy Information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,55 +233,39 @@ public InformationProtectionPolicyInner get( * @return information protection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, + private Mono> createOrUpdateWithResponseAsync(String scope, InformationProtectionPolicyName informationProtectionPolicyName, InformationProtectionPolicyInner informationProtectionPolicy) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } if (informationProtectionPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter informationProtectionPolicyName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter informationProtectionPolicyName is required and cannot be null.")); } if (informationProtectionPolicy == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter informationProtectionPolicy is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter informationProtectionPolicy is required and cannot be null.")); } else { informationProtectionPolicy.validate(); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - scope, - informationProtectionPolicyName, - informationProtectionPolicy, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, scope, + informationProtectionPolicyName, informationProtectionPolicy, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param informationProtectionPolicy Information protection policy. * @param context The context to associate with this operation. @@ -318,53 +275,38 @@ private Mono> createOrUpdateWithRespo * @return information protection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, + private Mono> createOrUpdateWithResponseAsync(String scope, InformationProtectionPolicyName informationProtectionPolicyName, - InformationProtectionPolicyInner informationProtectionPolicy, - Context context) { + InformationProtectionPolicyInner informationProtectionPolicy, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); } if (informationProtectionPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter informationProtectionPolicyName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter informationProtectionPolicyName is required and cannot be null.")); } if (informationProtectionPolicy == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter informationProtectionPolicy is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter informationProtectionPolicy is required and cannot be null.")); } else { informationProtectionPolicy.validate(); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - scope, - informationProtectionPolicyName, - informationProtectionPolicy, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, scope, informationProtectionPolicyName, + informationProtectionPolicy, accept, context); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param informationProtectionPolicy Information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -373,8 +315,7 @@ private Mono> createOrUpdateWithRespo * @return information protection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String scope, + private Mono createOrUpdateAsync(String scope, InformationProtectionPolicyName informationProtectionPolicyName, InformationProtectionPolicyInner informationProtectionPolicy) { return createOrUpdateWithResponseAsync(scope, informationProtectionPolicyName, informationProtectionPolicy) @@ -383,9 +324,9 @@ private Mono createOrUpdateAsync( /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param informationProtectionPolicy Information protection policy. * @param context The context to associate with this operation. @@ -395,21 +336,18 @@ private Mono createOrUpdateAsync( * @return information protection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String scope, + public Response createOrUpdateWithResponse(String scope, InformationProtectionPolicyName informationProtectionPolicyName, - InformationProtectionPolicyInner informationProtectionPolicy, - Context context) { - return createOrUpdateWithResponseAsync( - scope, informationProtectionPolicyName, informationProtectionPolicy, context) - .block(); + InformationProtectionPolicyInner informationProtectionPolicy, Context context) { + return createOrUpdateWithResponseAsync(scope, informationProtectionPolicyName, informationProtectionPolicy, + context).block(); } /** * Details of the information protection policy. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param informationProtectionPolicyName Name of the information protection policy. * @param informationProtectionPolicy Information protection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -418,33 +356,29 @@ public Response createOrUpdateWithResponse( * @return information protection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InformationProtectionPolicyInner createOrUpdate( - String scope, + public InformationProtectionPolicyInner createOrUpdate(String scope, InformationProtectionPolicyName informationProtectionPolicyName, InformationProtectionPolicyInner informationProtectionPolicy) { - return createOrUpdateWithResponse( - scope, informationProtectionPolicyName, informationProtectionPolicy, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(scope, informationProtectionPolicyName, informationProtectionPolicy, + Context.NONE).getValue(); } /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information protection policies response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -453,37 +387,28 @@ private Mono> listSinglePageAsyn final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information protection policies response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -491,24 +416,16 @@ private Mono> listSinglePageAsyn final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -521,9 +438,9 @@ private PagedFlux listAsync(String scope) { /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -532,15 +449,15 @@ private PagedFlux listAsync(String scope) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -553,9 +470,9 @@ public PagedIterable list(String scope) { /** * Information protection policies of a specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -569,14 +486,15 @@ public PagedIterable list(String scope, Contex /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information protection policies response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -584,62 +502,43 @@ private Mono> listNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information protection policies response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesImpl.java index 708c43674c30..a4e09b7273f7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPoliciesImpl.java @@ -22,30 +22,26 @@ public final class InformationProtectionPoliciesImpl implements InformationProte private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public InformationProtectionPoliciesImpl( - InformationProtectionPoliciesClient innerClient, + public InformationProtectionPoliciesImpl(InformationProtectionPoliciesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String scope, InformationProtectionPolicyName informationProtectionPolicyName, Context context) { - Response inner = - this.serviceClient().getWithResponse(scope, informationProtectionPolicyName, context); + public Response getWithResponse(String scope, + InformationProtectionPolicyName informationProtectionPolicyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(scope, informationProtectionPolicyName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new InformationProtectionPolicyImpl(inner.getValue(), this.manager())); } else { return null; } } - public InformationProtectionPolicy get( - String scope, InformationProtectionPolicyName informationProtectionPolicyName) { + public InformationProtectionPolicy get(String scope, + InformationProtectionPolicyName informationProtectionPolicyName) { InformationProtectionPolicyInner inner = this.serviceClient().get(scope, informationProtectionPolicyName); if (inner != null) { return new InformationProtectionPolicyImpl(inner, this.manager()); @@ -56,79 +52,53 @@ public InformationProtectionPolicy get( public PagedIterable list(String scope) { PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new InformationProtectionPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new InformationProtectionPolicyImpl(inner1, this.manager())); } public PagedIterable list(String scope, Context context) { PagedIterable inner = this.serviceClient().list(scope, context); - return Utils.mapPage(inner, inner1 -> new InformationProtectionPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new InformationProtectionPolicyImpl(inner1, this.manager())); } public InformationProtectionPolicy getById(String id) { - String scope = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", - "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String informationProtectionPolicyNameLocal = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", - "informationProtectionPolicyName"); + String informationProtectionPolicyNameLocal = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + "informationProtectionPolicyName"); if (informationProtectionPolicyNameLocal == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'informationProtectionPolicies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'informationProtectionPolicies'.", id))); } - InformationProtectionPolicyName informationProtectionPolicyName = - InformationProtectionPolicyName.fromString(informationProtectionPolicyNameLocal); + InformationProtectionPolicyName informationProtectionPolicyName + = InformationProtectionPolicyName.fromString(informationProtectionPolicyNameLocal); return this.getWithResponse(scope, informationProtectionPolicyName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String scope = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", - "scope"); + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + "scope"); if (scope == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String informationProtectionPolicyNameLocal = - Utils - .getValueFromIdByParameterName( - id, - "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", - "informationProtectionPolicyName"); + String informationProtectionPolicyNameLocal = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + "informationProtectionPolicyName"); if (informationProtectionPolicyNameLocal == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment" - + " 'informationProtectionPolicies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'informationProtectionPolicies'.", id))); } - InformationProtectionPolicyName informationProtectionPolicyName = - InformationProtectionPolicyName.fromString(informationProtectionPolicyNameLocal); + InformationProtectionPolicyName informationProtectionPolicyName + = InformationProtectionPolicyName.fromString(informationProtectionPolicyNameLocal); return this.getWithResponse(scope, informationProtectionPolicyName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPolicyImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPolicyImpl.java index a470297b2563..f09b0bbb5114 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPolicyImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/InformationProtectionPolicyImpl.java @@ -76,27 +76,20 @@ public InformationProtectionPolicyImpl withExistingScope(String scope) { } public InformationProtectionPolicy create() { - this.innerObject = - serviceManager - .serviceClient() - .getInformationProtectionPolicies() - .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getInformationProtectionPolicies() + .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), Context.NONE) + .getValue(); return this; } public InformationProtectionPolicy create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getInformationProtectionPolicies() - .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getInformationProtectionPolicies() + .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), context).getValue(); return this; } - InformationProtectionPolicyImpl( - InformationProtectionPolicyName name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + InformationProtectionPolicyImpl(InformationProtectionPolicyName name, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = new InformationProtectionPolicyInner(); this.serviceManager = serviceManager; this.informationProtectionPolicyName = name; @@ -107,63 +100,40 @@ public InformationProtectionPolicyImpl update() { } public InformationProtectionPolicy apply() { - this.innerObject = - serviceManager - .serviceClient() - .getInformationProtectionPolicies() - .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getInformationProtectionPolicies() + .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), Context.NONE) + .getValue(); return this; } public InformationProtectionPolicy apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getInformationProtectionPolicies() - .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getInformationProtectionPolicies() + .createOrUpdateWithResponse(scope, informationProtectionPolicyName, this.innerModel(), context).getValue(); return this; } - InformationProtectionPolicyImpl( - InformationProtectionPolicyInner innerObject, + InformationProtectionPolicyImpl(InformationProtectionPolicyInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.scope = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", - "scope"); - this.informationProtectionPolicyName = - InformationProtectionPolicyName - .fromString( - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", - "informationProtectionPolicyName")); + this.scope = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + "scope"); + this.informationProtectionPolicyName = InformationProtectionPolicyName + .fromString(ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}", + "informationProtectionPolicyName")); } public InformationProtectionPolicy refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getInformationProtectionPolicies() - .getWithResponse(scope, informationProtectionPolicyName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getInformationProtectionPolicies() + .getWithResponse(scope, informationProtectionPolicyName, Context.NONE).getValue(); return this; } public InformationProtectionPolicy refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getInformationProtectionPolicies() - .getWithResponse(scope, informationProtectionPolicyName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getInformationProtectionPolicies() + .getWithResponse(scope, informationProtectionPolicyName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingImpl.java deleted file mode 100644 index 0100de28a14d..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IngestionSettingInner; -import com.azure.resourcemanager.security.models.ConnectionStrings; -import com.azure.resourcemanager.security.models.IngestionSetting; -import com.azure.resourcemanager.security.models.IngestionSettingToken; - -public final class IngestionSettingImpl implements IngestionSetting, IngestionSetting.Definition { - private IngestionSettingInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IngestionSettingImpl( - IngestionSettingInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public IngestionSettingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } - - private String ingestionSettingName; - - public IngestionSetting create() { - this.innerObject = - serviceManager - .serviceClient() - .getIngestionSettings() - .createWithResponse(ingestionSettingName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public IngestionSetting create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIngestionSettings() - .createWithResponse(ingestionSettingName, this.innerModel(), context) - .getValue(); - return this; - } - - IngestionSettingImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = new IngestionSettingInner(); - this.serviceManager = serviceManager; - this.ingestionSettingName = name; - } - - public IngestionSetting refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getIngestionSettings() - .getWithResponse(ingestionSettingName, Context.NONE) - .getValue(); - return this; - } - - public IngestionSetting refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIngestionSettings() - .getWithResponse(ingestionSettingName, context) - .getValue(); - return this; - } - - public Response listTokensWithResponse(Context context) { - return serviceManager.ingestionSettings().listTokensWithResponse(ingestionSettingName, context); - } - - public IngestionSettingToken listTokens() { - return serviceManager.ingestionSettings().listTokens(ingestionSettingName); - } - - public Response listConnectionStringsWithResponse(Context context) { - return serviceManager.ingestionSettings().listConnectionStringsWithResponse(ingestionSettingName, context); - } - - public ConnectionStrings listConnectionStrings() { - return serviceManager.ingestionSettings().listConnectionStrings(ingestionSettingName); - } - - public IngestionSettingImpl withProperties(Object properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingTokenImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingTokenImpl.java deleted file mode 100644 index 260f3548df8f..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingTokenImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IngestionSettingTokenInner; -import com.azure.resourcemanager.security.models.IngestionSettingToken; - -public final class IngestionSettingTokenImpl implements IngestionSettingToken { - private IngestionSettingTokenInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IngestionSettingTokenImpl( - IngestionSettingTokenInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String token() { - return this.innerModel().token(); - } - - public IngestionSettingTokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsClientImpl.java deleted file mode 100644 index 0ded97111c93..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsClientImpl.java +++ /dev/null @@ -1,1030 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.security.fluent.IngestionSettingsClient; -import com.azure.resourcemanager.security.fluent.models.ConnectionStringsInner; -import com.azure.resourcemanager.security.fluent.models.IngestionSettingInner; -import com.azure.resourcemanager.security.fluent.models.IngestionSettingTokenInner; -import com.azure.resourcemanager.security.models.IngestionSettingList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IngestionSettingsClient. */ -public final class IngestionSettingsClientImpl implements IngestionSettingsClient { - /** The proxy service used to perform REST calls. */ - private final IngestionSettingsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IngestionSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IngestionSettingsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(IngestionSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIngestionSettings to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIngest") - public interface IngestionSettingsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ingestionSettingName") String ingestionSettingName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ingestionSettingName") String ingestionSettingName, - @BodyParam("application/json") IngestionSettingInner ingestionSetting, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ingestionSettingName") String ingestionSettingName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listTokens") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listTokens( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ingestionSettingName") String ingestionSettingName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/ingestionSettings/{ingestionSettingName}/listConnectionStrings") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listConnectionStrings( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ingestionSettingName") String ingestionSettingName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String ingestionSettingName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String ingestionSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String ingestionSettingName) { - return getWithResponseAsync(ingestionSettingName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String ingestionSettingName, Context context) { - return getWithResponseAsync(ingestionSettingName, context).block(); - } - - /** - * Settings for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IngestionSettingInner get(String ingestionSettingName) { - return getWithResponse(ingestionSettingName, Context.NONE).getValue(); - } - - /** - * Create setting for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param ingestionSetting Ingestion setting object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String ingestionSettingName, IngestionSettingInner ingestionSetting) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - if (ingestionSetting == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSetting is required and cannot be null.")); - } else { - ingestionSetting.validate(); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - ingestionSetting, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create setting for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param ingestionSetting Ingestion setting object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String ingestionSettingName, IngestionSettingInner ingestionSetting, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - if (ingestionSetting == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSetting is required and cannot be null.")); - } else { - ingestionSetting.validate(); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - ingestionSetting, - accept, - context); - } - - /** - * Create setting for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param ingestionSetting Ingestion setting object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String ingestionSettingName, IngestionSettingInner ingestionSetting) { - return createWithResponseAsync(ingestionSettingName, ingestionSetting) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create setting for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param ingestionSetting Ingestion setting object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String ingestionSettingName, IngestionSettingInner ingestionSetting, Context context) { - return createWithResponseAsync(ingestionSettingName, ingestionSetting, context).block(); - } - - /** - * Create setting for ingesting security data and logs to correlate with resources associated with the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param ingestionSetting Ingestion setting object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IngestionSettingInner create(String ingestionSettingName, IngestionSettingInner ingestionSetting) { - return createWithResponse(ingestionSettingName, ingestionSetting, Context.NONE).getValue(); - } - - /** - * Deletes the ingestion settings for this subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String ingestionSettingName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the ingestion settings for this subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String ingestionSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context); - } - - /** - * Deletes the ingestion settings for this subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String ingestionSettingName) { - return deleteWithResponseAsync(ingestionSettingName).flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the ingestion settings for this subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String ingestionSettingName, Context context) { - return deleteWithResponseAsync(ingestionSettingName, context).block(); - } - - /** - * Deletes the ingestion settings for this subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String ingestionSettingName) { - deleteWithResponse(ingestionSettingName, Context.NONE); - } - - /** - * Returns the token that is used for correlating ingested telemetry with the resources in the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listTokensWithResponseAsync(String ingestionSettingName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listTokens( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns the token that is used for correlating ingested telemetry with the resources in the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listTokensWithResponseAsync( - String ingestionSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listTokens( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context); - } - - /** - * Returns the token that is used for correlating ingested telemetry with the resources in the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listTokensAsync(String ingestionSettingName) { - return listTokensWithResponseAsync(ingestionSettingName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Returns the token that is used for correlating ingested telemetry with the resources in the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listTokensWithResponse(String ingestionSettingName, Context context) { - return listTokensWithResponseAsync(ingestionSettingName, context).block(); - } - - /** - * Returns the token that is used for correlating ingested telemetry with the resources in the subscription. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configures how to correlate scan data and logs with resources associated with the subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IngestionSettingTokenInner listTokens(String ingestionSettingName) { - return listTokensWithResponse(ingestionSettingName, Context.NONE).getValue(); - } - - /** - * Connection strings for ingesting security scan logs and data. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return connection string for ingesting security data and logs along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConnectionStringsWithResponseAsync(String ingestionSettingName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listConnectionStrings( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Connection strings for ingesting security scan logs and data. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return connection string for ingesting security data and logs along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConnectionStringsWithResponseAsync( - String ingestionSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (ingestionSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ingestionSettingName is required and cannot be null.")); - } - final String apiVersion = "2021-01-15-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listConnectionStrings( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ingestionSettingName, - accept, - context); - } - - /** - * Connection strings for ingesting security scan logs and data. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return connection string for ingesting security data and logs on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listConnectionStringsAsync(String ingestionSettingName) { - return listConnectionStringsWithResponseAsync(ingestionSettingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Connection strings for ingesting security scan logs and data. - * - * @param ingestionSettingName Name of the ingestion setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return connection string for ingesting security data and logs along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listConnectionStringsWithResponse( - String ingestionSettingName, Context context) { - return listConnectionStringsWithResponseAsync(ingestionSettingName, context).block(); - } - - /** - * Connection strings for ingesting security scan logs and data. - * - * @param ingestionSettingName Name of the ingestion setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return connection string for ingesting security data and logs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectionStringsInner listConnectionStrings(String ingestionSettingName) { - return listConnectionStringsWithResponse(ingestionSettingName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ingestion settings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsImpl.java deleted file mode 100644 index da9c5111770e..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IngestionSettingsImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IngestionSettingsClient; -import com.azure.resourcemanager.security.fluent.models.ConnectionStringsInner; -import com.azure.resourcemanager.security.fluent.models.IngestionSettingInner; -import com.azure.resourcemanager.security.fluent.models.IngestionSettingTokenInner; -import com.azure.resourcemanager.security.models.ConnectionStrings; -import com.azure.resourcemanager.security.models.IngestionSetting; -import com.azure.resourcemanager.security.models.IngestionSettingToken; -import com.azure.resourcemanager.security.models.IngestionSettings; - -public final class IngestionSettingsImpl implements IngestionSettings { - private static final ClientLogger LOGGER = new ClientLogger(IngestionSettingsImpl.class); - - private final IngestionSettingsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IngestionSettingsImpl( - IngestionSettingsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new IngestionSettingImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new IngestionSettingImpl(inner1, this.manager())); - } - - public Response getWithResponse(String ingestionSettingName, Context context) { - Response inner = this.serviceClient().getWithResponse(ingestionSettingName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IngestionSettingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IngestionSetting get(String ingestionSettingName) { - IngestionSettingInner inner = this.serviceClient().get(ingestionSettingName); - if (inner != null) { - return new IngestionSettingImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String ingestionSettingName, Context context) { - return this.serviceClient().deleteWithResponse(ingestionSettingName, context); - } - - public void delete(String ingestionSettingName) { - this.serviceClient().delete(ingestionSettingName); - } - - public Response listTokensWithResponse(String ingestionSettingName, Context context) { - Response inner = - this.serviceClient().listTokensWithResponse(ingestionSettingName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IngestionSettingTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IngestionSettingToken listTokens(String ingestionSettingName) { - IngestionSettingTokenInner inner = this.serviceClient().listTokens(ingestionSettingName); - if (inner != null) { - return new IngestionSettingTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listConnectionStringsWithResponse(String ingestionSettingName, Context context) { - Response inner = - this.serviceClient().listConnectionStringsWithResponse(ingestionSettingName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ConnectionStringsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectionStrings listConnectionStrings(String ingestionSettingName) { - ConnectionStringsInner inner = this.serviceClient().listConnectionStrings(ingestionSettingName); - if (inner != null) { - return new ConnectionStringsImpl(inner, this.manager()); - } else { - return null; - } - } - - public IngestionSetting getById(String id) { - String ingestionSettingName = Utils.getValueFromIdByName(id, "ingestionSettings"); - if (ingestionSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'ingestionSettings'.", id))); - } - return this.getWithResponse(ingestionSettingName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String ingestionSettingName = Utils.getValueFromIdByName(id, "ingestionSettings"); - if (ingestionSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'ingestionSettings'.", id))); - } - return this.getWithResponse(ingestionSettingName, context); - } - - public void deleteById(String id) { - String ingestionSettingName = Utils.getValueFromIdByName(id, "ingestionSettings"); - if (ingestionSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'ingestionSettings'.", id))); - } - this.deleteWithResponse(ingestionSettingName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String ingestionSettingName = Utils.getValueFromIdByName(id, "ingestionSettings"); - if (ingestionSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'ingestionSettings'.", id))); - } - return this.deleteWithResponse(ingestionSettingName, context); - } - - private IngestionSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } - - public IngestionSettingImpl define(String name) { - return new IngestionSettingImpl(name, this.manager()); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedAlertImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedAlertImpl.java index b6ba40c4985e..261157ce0e67 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedAlertImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedAlertImpl.java @@ -18,8 +18,7 @@ public final class IoTSecurityAggregatedAlertImpl implements IoTSecurityAggregat private final com.azure.resourcemanager.security.SecurityManager serviceManager; - IoTSecurityAggregatedAlertImpl( - IoTSecurityAggregatedAlertInner innerObject, + IoTSecurityAggregatedAlertImpl(IoTSecurityAggregatedAlertInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedRecommendationImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedRecommendationImpl.java index 8b33589368a0..9ca207df4dd1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedRecommendationImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecurityAggregatedRecommendationImpl.java @@ -15,8 +15,7 @@ public final class IoTSecurityAggregatedRecommendationImpl implements IoTSecurit private final com.azure.resourcemanager.security.SecurityManager serviceManager; - IoTSecurityAggregatedRecommendationImpl( - IoTSecurityAggregatedRecommendationInner innerObject, + IoTSecurityAggregatedRecommendationImpl(IoTSecurityAggregatedRecommendationInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelImpl.java index 40b21a2f1404..0672331599ce 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelImpl.java @@ -19,8 +19,7 @@ public final class IoTSecuritySolutionAnalyticsModelImpl implements IoTSecurityS private final com.azure.resourcemanager.security.SecurityManager serviceManager; - IoTSecuritySolutionAnalyticsModelImpl( - IoTSecuritySolutionAnalyticsModelInner innerObject, + IoTSecuritySolutionAnalyticsModelImpl(IoTSecuritySolutionAnalyticsModelInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelListImpl.java index f8cf0fe29c55..5a154b64a23e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelListImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionAnalyticsModelListImpl.java @@ -17,8 +17,7 @@ public final class IoTSecuritySolutionAnalyticsModelListImpl implements IoTSecur private final com.azure.resourcemanager.security.SecurityManager serviceManager; - IoTSecuritySolutionAnalyticsModelListImpl( - IoTSecuritySolutionAnalyticsModelListInner innerObject, + IoTSecuritySolutionAnalyticsModelListImpl(IoTSecuritySolutionAnalyticsModelListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,12 +26,9 @@ public final class IoTSecuritySolutionAnalyticsModelListImpl implements IoTSecur public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new IoTSecuritySolutionAnalyticsModelImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new IoTSecuritySolutionAnalyticsModelImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionModelImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionModelImpl.java index 849907cb0bb6..ff865c0027bc 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionModelImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IoTSecuritySolutionModelImpl.java @@ -162,22 +162,14 @@ public IoTSecuritySolutionModelImpl withExistingResourceGroup(String resourceGro } public IoTSecuritySolutionModel create() { - this.innerObject = - serviceManager - .serviceClient() - .getIotSecuritySolutions() - .createOrUpdateWithResponse(resourceGroupName, solutionName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getIotSecuritySolutions() + .createOrUpdateWithResponse(resourceGroupName, solutionName, this.innerModel(), Context.NONE).getValue(); return this; } public IoTSecuritySolutionModel create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIotSecuritySolutions() - .createOrUpdateWithResponse(resourceGroupName, solutionName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getIotSecuritySolutions() + .createOrUpdateWithResponse(resourceGroupName, solutionName, this.innerModel(), context).getValue(); return this; } @@ -193,50 +185,36 @@ public IoTSecuritySolutionModelImpl update() { } public IoTSecuritySolutionModel apply() { - this.innerObject = - serviceManager - .serviceClient() - .getIotSecuritySolutions() - .updateWithResponse(resourceGroupName, solutionName, updateUpdateIotSecuritySolutionData, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getIotSecuritySolutions() + .updateWithResponse(resourceGroupName, solutionName, updateUpdateIotSecuritySolutionData, Context.NONE) + .getValue(); return this; } public IoTSecuritySolutionModel apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIotSecuritySolutions() - .updateWithResponse(resourceGroupName, solutionName, updateUpdateIotSecuritySolutionData, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getIotSecuritySolutions() + .updateWithResponse(resourceGroupName, solutionName, updateUpdateIotSecuritySolutionData, context) + .getValue(); return this; } - IoTSecuritySolutionModelImpl( - IoTSecuritySolutionModelInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + IoTSecuritySolutionModelImpl(IoTSecuritySolutionModelInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.solutionName = Utils.getValueFromIdByName(innerObject.id(), "iotSecuritySolutions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.solutionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "iotSecuritySolutions"); } public IoTSecuritySolutionModel refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getIotSecuritySolutions() - .getByResourceGroupWithResponse(resourceGroupName, solutionName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getIotSecuritySolutions() + .getByResourceGroupWithResponse(resourceGroupName, solutionName, Context.NONE).getValue(); return this; } public IoTSecuritySolutionModel refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIotSecuritySolutions() - .getByResourceGroupWithResponse(resourceGroupName, solutionName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getIotSecuritySolutions() + .getByResourceGroupWithResponse(resourceGroupName, solutionName, context).getValue(); return this; } @@ -300,8 +278,8 @@ public IoTSecuritySolutionModelImpl withUserDefinedResources(UserDefinedResource } } - public IoTSecuritySolutionModelImpl withRecommendationsConfiguration( - List recommendationsConfiguration) { + public IoTSecuritySolutionModelImpl + withRecommendationsConfiguration(List recommendationsConfiguration) { if (isInCreateMode()) { this.innerModel().withRecommendationsConfiguration(recommendationsConfiguration); return this; @@ -316,8 +294,8 @@ public IoTSecuritySolutionModelImpl withUnmaskedIpLoggingStatus(UnmaskedIpLoggin return this; } - public IoTSecuritySolutionModelImpl withAdditionalWorkspaces( - List additionalWorkspaces) { + public IoTSecuritySolutionModelImpl + withAdditionalWorkspaces(List additionalWorkspaces) { this.innerModel().withAdditionalWorkspaces(additionalWorkspaces); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsClientImpl.java index d047f7931d33..d7feb1c6f78a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsClientImpl.java @@ -26,24 +26,28 @@ import com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionAnalyticsModelListInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in IotSecuritySolutionAnalyticsClient. */ +/** + * An instance of this class provides access to all the operations defined in IotSecuritySolutionAnalyticsClient. + */ public final class IotSecuritySolutionAnalyticsClientImpl implements IotSecuritySolutionAnalyticsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final IotSecuritySolutionAnalyticsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of IotSecuritySolutionAnalyticsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ IotSecuritySolutionAnalyticsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - IotSecuritySolutionAnalyticsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(IotSecuritySolutionAnalyticsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -54,61 +58,47 @@ public final class IotSecuritySolutionAnalyticsClientImpl implements IotSecurity @Host("{$host}") @ServiceInterface(name = "SecurityCenterIotSec") public interface IotSecuritySolutionAnalyticsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @HeaderParam("Accept") String accept, Context context); } /** * Use this method to get IoT security Analytics metrics in an array. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Security analytics of your IoT Security solution along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String solutionName) { + private Mono> listWithResponseAsync(String resourceGroupName, + String solutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -120,47 +110,34 @@ private Mono> listWithRespo final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get IoT security Analytics metrics in an array. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Security analytics of your IoT Security solution along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String solutionName, Context context) { + private Mono> listWithResponseAsync(String resourceGroupName, + String solutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -172,22 +149,15 @@ private Mono> listWithRespo final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, accept, context); } /** * Use this method to get IoT security Analytics metrics in an array. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -201,9 +171,9 @@ private Mono listAsync(String resour /** * Use this method to get IoT security Analytics metrics in an array. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,16 +182,16 @@ private Mono listAsync(String resour * @return list of Security analytics of your IoT Security solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String solutionName, Context context) { + public Response listWithResponse(String resourceGroupName, + String solutionName, Context context) { return listWithResponseAsync(resourceGroupName, solutionName, context).block(); } /** * Use this method to get IoT security Analytics metrics in an array. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -235,30 +205,26 @@ public IoTSecuritySolutionAnalyticsModelListInner list(String resourceGroupName, /** * Use this method to get IoT Security Analytics metrics. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security analytics of your IoT Security solution along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String solutionName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String solutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -270,47 +236,34 @@ private Mono> getWithResponseAs final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get IoT Security Analytics metrics. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security analytics of your IoT Security solution along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String solutionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String solutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -322,22 +275,15 @@ private Mono> getWithResponseAs final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, accept, context); } /** * Use this method to get IoT Security Analytics metrics. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -351,9 +297,9 @@ private Mono getAsync(String resourceGro /** * Use this method to get IoT Security Analytics metrics. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,16 +308,16 @@ private Mono getAsync(String resourceGro * @return security analytics of your IoT Security solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String solutionName, Context context) { + public Response getWithResponse(String resourceGroupName, + String solutionName, Context context) { return getWithResponseAsync(resourceGroupName, solutionName, context).block(); } /** * Use this method to get IoT Security Analytics metrics. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsImpl.java index 23c075d86a6d..269039c13994 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionAnalyticsImpl.java @@ -22,22 +22,18 @@ public final class IotSecuritySolutionAnalyticsImpl implements IotSecuritySoluti private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public IotSecuritySolutionAnalyticsImpl( - IotSecuritySolutionAnalyticsClient innerClient, + public IotSecuritySolutionAnalyticsImpl(IotSecuritySolutionAnalyticsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response listWithResponse( - String resourceGroupName, String solutionName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, solutionName, context); + public Response listWithResponse(String resourceGroupName, + String solutionName, Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, solutionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IoTSecuritySolutionAnalyticsModelListImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,15 +49,12 @@ public IoTSecuritySolutionAnalyticsModelList list(String resourceGroupName, Stri } } - public Response getWithResponse( - String resourceGroupName, String solutionName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, solutionName, context); + public Response getWithResponse(String resourceGroupName, String solutionName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, solutionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IoTSecuritySolutionAnalyticsModelImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl.java index 9ec5cec7cd57..6fc478c09d4f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl.java @@ -37,24 +37,24 @@ */ public final class IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl implements IotSecuritySolutionsAnalyticsAggregatedAlertsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final IotSecuritySolutionsAnalyticsAggregatedAlertsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - IotSecuritySolutionsAnalyticsAggregatedAlertsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(IotSecuritySolutionsAnalyticsAggregatedAlertsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -65,89 +65,67 @@ public final class IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl @Host("{$host}") @ServiceInterface(name = "SecurityCenterIotSec") public interface IotSecuritySolutionsAnalyticsAggregatedAlertsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @QueryParam("$top") Integer top, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @PathParam("aggregatedAlertName") String aggregatedAlertName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @PathParam("aggregatedAlertName") String aggregatedAlertName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> dismiss( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> dismiss(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @PathParam("aggregatedAlertName") String aggregatedAlertName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @PathParam("aggregatedAlertName") String aggregatedAlertName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated alert data along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String solutionName, Integer top) { + private Mono> listSinglePageAsync(String resourceGroupName, + String solutionName, Integer top) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -159,35 +137,18 @@ private Mono> listSinglePageAsync final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - top, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, top, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. @@ -195,22 +156,18 @@ private Mono> listSinglePageAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated alert data along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String solutionName, Integer top, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String solutionName, Integer top, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -223,31 +180,17 @@ private Mono> listSinglePageAsync final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - top, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, top, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,18 +199,17 @@ private Mono> listSinglePageAsync * @return list of IoT Security solution aggregated alert data as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String solutionName, Integer top) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, solutionName, top), + private PagedFlux listAsync(String resourceGroupName, String solutionName, + Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, solutionName, top), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -277,16 +219,15 @@ private PagedFlux listAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String solutionName) { final Integer top = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, solutionName, top), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, solutionName, top), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. @@ -296,18 +237,17 @@ private PagedFlux listAsync(String resourceGrou * @return list of IoT Security solution aggregated alert data as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String solutionName, Integer top, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, solutionName, top, context), + private PagedFlux listAsync(String resourceGroupName, String solutionName, + Integer top, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, solutionName, top, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -322,9 +262,9 @@ public PagedIterable list(String resourceGroupN /** * Use this method to get the aggregated alert list of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. @@ -334,39 +274,35 @@ public PagedIterable list(String resourceGroupN * @return list of IoT Security solution aggregated alert data as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String solutionName, Integer top, Context context) { + public PagedIterable list(String resourceGroupName, String solutionName, + Integer top, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, solutionName, top, context)); } /** * Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security Solution Aggregated Alert information along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String solutionName, String aggregatedAlertName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String solutionName, String aggregatedAlertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -382,27 +318,17 @@ private Mono> getWithResponseAsync( final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - aggregatedAlertName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, aggregatedAlertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @param context The context to associate with this operation. @@ -410,22 +336,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security Solution Aggregated Alert information along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String solutionName, String aggregatedAlertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -441,24 +363,16 @@ private Mono> getWithResponseAsync( final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - aggregatedAlertName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, aggregatedAlertName, accept, context); } /** * Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -467,8 +381,8 @@ private Mono> getWithResponseAsync( * @return security Solution Aggregated Alert information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String solutionName, String aggregatedAlertName) { + private Mono getAsync(String resourceGroupName, String solutionName, + String aggregatedAlertName) { return getWithResponseAsync(resourceGroupName, solutionName, aggregatedAlertName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -476,9 +390,9 @@ private Mono getAsync( /** * Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @param context The context to associate with this operation. @@ -488,17 +402,17 @@ private Mono getAsync( * @return security Solution Aggregated Alert information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context) { + public Response getWithResponse(String resourceGroupName, String solutionName, + String aggregatedAlertName, Context context) { return getWithResponseAsync(resourceGroupName, solutionName, aggregatedAlertName, context).block(); } /** * Use this method to get a single the aggregated alert of yours IoT Security solution. This aggregation is * performed by alert name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -507,16 +421,16 @@ public Response getWithResponse( * @return security Solution Aggregated Alert information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IoTSecurityAggregatedAlertInner get( - String resourceGroupName, String solutionName, String aggregatedAlertName) { + public IoTSecurityAggregatedAlertInner get(String resourceGroupName, String solutionName, + String aggregatedAlertName) { return getWithResponse(resourceGroupName, solutionName, aggregatedAlertName, Context.NONE).getValue(); } /** * Use this method to dismiss an aggregated IoT Security Solution Alert. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,19 +439,15 @@ public IoTSecurityAggregatedAlertInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> dismissWithResponseAsync( - String resourceGroupName, String solutionName, String aggregatedAlertName) { + private Mono> dismissWithResponseAsync(String resourceGroupName, String solutionName, + String aggregatedAlertName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -553,26 +463,16 @@ private Mono> dismissWithResponseAsync( final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .dismiss( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - aggregatedAlertName, - accept, - context)) + .withContext(context -> service.dismiss(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, solutionName, aggregatedAlertName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to dismiss an aggregated IoT Security Solution Alert. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @param context The context to associate with this operation. @@ -582,19 +482,15 @@ private Mono> dismissWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> dismissWithResponseAsync( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context) { + private Mono> dismissWithResponseAsync(String resourceGroupName, String solutionName, + String aggregatedAlertName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -610,23 +506,15 @@ private Mono> dismissWithResponseAsync( final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .dismiss( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - aggregatedAlertName, - accept, - context); + return service.dismiss(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, aggregatedAlertName, accept, context); } /** * Use this method to dismiss an aggregated IoT Security Solution Alert. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -642,9 +530,9 @@ private Mono dismissAsync(String resourceGroupName, String solutionName, S /** * Use this method to dismiss an aggregated IoT Security Solution Alert. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @param context The context to associate with this operation. @@ -654,16 +542,16 @@ private Mono dismissAsync(String resourceGroupName, String solutionName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response dismissWithResponse( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context) { + public Response dismissWithResponse(String resourceGroupName, String solutionName, String aggregatedAlertName, + Context context) { return dismissWithResponseAsync(resourceGroupName, solutionName, aggregatedAlertName, context).block(); } /** * Use this method to dismiss an aggregated IoT Security Solution Alert. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedAlertName Identifier of the aggregated alert. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -677,14 +565,15 @@ public void dismiss(String resourceGroupName, String solutionName, String aggreg /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated alert data along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -692,62 +581,43 @@ private Mono> listNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated alert data along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsImpl.java index be131cbc5431..5875a3586a2d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsAggregatedAlertsImpl.java @@ -16,8 +16,8 @@ public final class IotSecuritySolutionsAnalyticsAggregatedAlertsImpl implements IotSecuritySolutionsAnalyticsAggregatedAlerts { - private static final ClientLogger LOGGER = - new ClientLogger(IotSecuritySolutionsAnalyticsAggregatedAlertsImpl.class); + private static final ClientLogger LOGGER + = new ClientLogger(IotSecuritySolutionsAnalyticsAggregatedAlertsImpl.class); private final IotSecuritySolutionsAnalyticsAggregatedAlertsClient innerClient; @@ -31,27 +31,26 @@ public IotSecuritySolutionsAnalyticsAggregatedAlertsImpl( } public PagedIterable list(String resourceGroupName, String solutionName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, solutionName); - return Utils.mapPage(inner, inner1 -> new IoTSecurityAggregatedAlertImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, solutionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new IoTSecurityAggregatedAlertImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String solutionName, Integer top, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, solutionName, top, context); - return Utils.mapPage(inner, inner1 -> new IoTSecurityAggregatedAlertImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String solutionName, Integer top, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, solutionName, top, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new IoTSecurityAggregatedAlertImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, solutionName, aggregatedAlertName, context); + public Response getWithResponse(String resourceGroupName, String solutionName, + String aggregatedAlertName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, solutionName, aggregatedAlertName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IoTSecurityAggregatedAlertImpl(inner.getValue(), this.manager())); } else { return null; @@ -59,8 +58,8 @@ public Response getWithResponse( } public IoTSecurityAggregatedAlert get(String resourceGroupName, String solutionName, String aggregatedAlertName) { - IoTSecurityAggregatedAlertInner inner = - this.serviceClient().get(resourceGroupName, solutionName, aggregatedAlertName); + IoTSecurityAggregatedAlertInner inner + = this.serviceClient().get(resourceGroupName, solutionName, aggregatedAlertName); if (inner != null) { return new IoTSecurityAggregatedAlertImpl(inner, this.manager()); } else { @@ -68,8 +67,8 @@ public IoTSecurityAggregatedAlert get(String resourceGroupName, String solutionN } } - public Response dismissWithResponse( - String resourceGroupName, String solutionName, String aggregatedAlertName, Context context) { + public Response dismissWithResponse(String resourceGroupName, String solutionName, String aggregatedAlertName, + Context context) { return this.serviceClient().dismissWithResponse(resourceGroupName, solutionName, aggregatedAlertName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsClientImpl.java index 606ce1248876..198d7643de70 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsClientImpl.java @@ -36,103 +36,86 @@ */ public final class IotSecuritySolutionsAnalyticsRecommendationsClientImpl implements IotSecuritySolutionsAnalyticsRecommendationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final IotSecuritySolutionsAnalyticsRecommendationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of IotSecuritySolutionsAnalyticsRecommendationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ IotSecuritySolutionsAnalyticsRecommendationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - IotSecuritySolutionsAnalyticsRecommendationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(IotSecuritySolutionsAnalyticsRecommendationsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterIotSecuritySolutionsAnalyticsRecommendations to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for SecurityCenterIotSecuritySolutionsAnalyticsRecommendations to be + * used by the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterIotSec") public interface IotSecuritySolutionsAnalyticsRecommendationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, @PathParam("aggregatedRecommendationName") String aggregatedRecommendationName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @QueryParam("$top") Integer top, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This * aggregation is performed by recommendation name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution recommendation information along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String solutionName, String aggregatedRecommendationName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String solutionName, String aggregatedRecommendationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -142,35 +125,23 @@ private Mono> getWithResponse return Mono.error(new IllegalArgumentException("Parameter solutionName is required and cannot be null.")); } if (aggregatedRecommendationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter aggregatedRecommendationName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter aggregatedRecommendationName is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - aggregatedRecommendationName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, aggregatedRecommendationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This * aggregation is performed by recommendation name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. * @param context The context to associate with this operation. @@ -178,22 +149,18 @@ private Mono> getWithResponse * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution recommendation information along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String solutionName, String aggregatedRecommendationName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String solutionName, String aggregatedRecommendationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -203,32 +170,22 @@ private Mono> getWithResponse return Mono.error(new IllegalArgumentException("Parameter solutionName is required and cannot be null.")); } if (aggregatedRecommendationName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter aggregatedRecommendationName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter aggregatedRecommendationName is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - aggregatedRecommendationName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, aggregatedRecommendationName, accept, context); } /** * Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This * aggregation is performed by recommendation name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,8 +194,8 @@ private Mono> getWithResponse * @return ioT Security solution recommendation information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String solutionName, String aggregatedRecommendationName) { + private Mono getAsync(String resourceGroupName, String solutionName, + String aggregatedRecommendationName) { return getWithResponseAsync(resourceGroupName, solutionName, aggregatedRecommendationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -246,9 +203,9 @@ private Mono getAsync( /** * Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This * aggregation is performed by recommendation name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. * @param context The context to associate with this operation. @@ -258,17 +215,17 @@ private Mono getAsync( * @return ioT Security solution recommendation information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String solutionName, String aggregatedRecommendationName, Context context) { + public Response getWithResponse(String resourceGroupName, + String solutionName, String aggregatedRecommendationName, Context context) { return getWithResponseAsync(resourceGroupName, solutionName, aggregatedRecommendationName, context).block(); } /** * Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This * aggregation is performed by recommendation name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param aggregatedRecommendationName Name of the recommendation aggregated for this query. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,38 +234,34 @@ public Response getWithResponse( * @return ioT Security solution recommendation information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IoTSecurityAggregatedRecommendationInner get( - String resourceGroupName, String solutionName, String aggregatedRecommendationName) { + public IoTSecurityAggregatedRecommendationInner get(String resourceGroupName, String solutionName, + String aggregatedRecommendationName) { return getWithResponse(resourceGroupName, solutionName, aggregatedRecommendationName, Context.NONE).getValue(); } /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated recommendations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String solutionName, Integer top) { + private Mono> listSinglePageAsync(String resourceGroupName, + String solutionName, Integer top) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -320,35 +273,19 @@ private Mono> listSingle final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - top, - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, top, accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. @@ -356,22 +293,18 @@ private Mono> listSingle * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated recommendations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String solutionName, Integer top, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String solutionName, Integer top, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -384,31 +317,17 @@ private Mono> listSingle final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - top, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, top, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -417,18 +336,17 @@ private Mono> listSingle * @return list of IoT Security solution aggregated recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String solutionName, Integer top) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, solutionName, top), + private PagedFlux listAsync(String resourceGroupName, String solutionName, + Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, solutionName, top), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -436,19 +354,18 @@ private PagedFlux listAsync( * @return list of IoT Security solution aggregated recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String solutionName) { + private PagedFlux listAsync(String resourceGroupName, + String solutionName) { final Integer top = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, solutionName, top), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, solutionName, top), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. @@ -458,24 +375,23 @@ private PagedFlux listAsync( * @return list of IoT Security solution aggregated recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String solutionName, Integer top, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, solutionName, top, context), + private PagedFlux listAsync(String resourceGroupName, String solutionName, + Integer top, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, solutionName, top, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Security solution aggregated recommendations as paginated response with {@link - * PagedIterable}. + * @return list of IoT Security solution aggregated recommendations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String solutionName) { @@ -485,34 +401,35 @@ public PagedIterable list(String resou /** * Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param top Number of results to retrieve. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Security solution aggregated recommendations as paginated response with {@link - * PagedIterable}. + * @return list of IoT Security solution aggregated recommendations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String solutionName, Integer top, Context context) { + public PagedIterable list(String resourceGroupName, String solutionName, + Integer top, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, solutionName, top, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated recommendations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -520,62 +437,44 @@ private Mono> listNextSi return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solution aggregated recommendations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsImpl.java index 785dc37759ab..bff70b76b0ff 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsImpl.java @@ -29,27 +29,22 @@ public IotSecuritySolutionsAnalyticsRecommendationsImpl( this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String solutionName, String aggregatedRecommendationName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, solutionName, aggregatedRecommendationName, context); + public Response getWithResponse(String resourceGroupName, String solutionName, + String aggregatedRecommendationName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, solutionName, aggregatedRecommendationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IoTSecurityAggregatedRecommendationImpl(inner.getValue(), this.manager())); } else { return null; } } - public IoTSecurityAggregatedRecommendation get( - String resourceGroupName, String solutionName, String aggregatedRecommendationName) { - IoTSecurityAggregatedRecommendationInner inner = - this.serviceClient().get(resourceGroupName, solutionName, aggregatedRecommendationName); + public IoTSecurityAggregatedRecommendation get(String resourceGroupName, String solutionName, + String aggregatedRecommendationName) { + IoTSecurityAggregatedRecommendationInner inner + = this.serviceClient().get(resourceGroupName, solutionName, aggregatedRecommendationName); if (inner != null) { return new IoTSecurityAggregatedRecommendationImpl(inner, this.manager()); } else { @@ -58,16 +53,18 @@ public IoTSecurityAggregatedRecommendation get( } public PagedIterable list(String resourceGroupName, String solutionName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, solutionName); - return Utils.mapPage(inner, inner1 -> new IoTSecurityAggregatedRecommendationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, solutionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new IoTSecurityAggregatedRecommendationImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String solutionName, Integer top, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, solutionName, top, context); - return Utils.mapPage(inner, inner1 -> new IoTSecurityAggregatedRecommendationImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String solutionName, + Integer top, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, solutionName, top, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new IoTSecurityAggregatedRecommendationImpl(inner1, this.manager())); } private IotSecuritySolutionsAnalyticsRecommendationsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsClientImpl.java index c91df12da6ce..21b11d992878 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsClientImpl.java @@ -35,141 +35,113 @@ import com.azure.resourcemanager.security.models.UpdateIotSecuritySolutionData; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in IotSecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in IotSecuritySolutionsClient. + */ public final class IotSecuritySolutionsClientImpl implements IotSecuritySolutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final IotSecuritySolutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of IotSecuritySolutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ IotSecuritySolutionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(IotSecuritySolutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(IotSecuritySolutionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterIotSecuritySolutions to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for SecurityCenterIotSecuritySolutions to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterIotSec") public interface IotSecuritySolutionsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @HeaderParam("Accept") String accept, - Context context); + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, @BodyParam("application/json") IoTSecuritySolutionModelInner iotSecuritySolutionData, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, @BodyParam("application/json") UpdateIotSecuritySolutionData updateIotSecuritySolutionData, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("solutionName") String solutionName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("solutionName") String solutionName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -179,45 +151,26 @@ Mono> listByResourceGroupNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -228,36 +181,25 @@ private Mono> listSinglePageAsync(S @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), filter, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -266,13 +208,13 @@ private Mono> listSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solutions as paginated response with {@link PagedFlux}. @@ -280,13 +222,13 @@ private PagedFlux listAsync(String filter) { @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { final String filter = null; - return new PagedFlux<>( - () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -296,14 +238,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter, context), + return new PagedFlux<>(() -> listSinglePageAsync(filter, context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of IoT Security solutions as paginated response with {@link PagedIterable}. @@ -316,7 +257,7 @@ public PagedIterable list() { /** * Use this method to get the list of IoT Security solutions by subscription. - * + * * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,9 +272,9 @@ public PagedIterable list(String filter, Context /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -341,19 +282,15 @@ public PagedIterable list(String filter, Context * @return list of IoT Security solutions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String filter) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -362,34 +299,18 @@ private Mono> listByResourceGroupSi final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -398,19 +319,15 @@ private Mono> listByResourceGroupSi * @return list of IoT Security solutions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String filter, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -420,30 +337,17 @@ private Mono> listByResourceGroupSi final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -452,16 +356,15 @@ private Mono> listByResourceGroupSi */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -470,16 +373,15 @@ private PagedFlux listByResourceGroupAsync(String @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -488,18 +390,17 @@ private PagedFlux listByResourceGroupAsync(String * @return list of IoT Security solutions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, String filter, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, context), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -513,9 +414,9 @@ public PagedIterable listByResourceGroup(String r /** * Use this method to get the list IoT Security solutions organized by resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param filter Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -524,37 +425,33 @@ public PagedIterable listByResourceGroup(String r * @return list of IoT Security solutions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, String filter, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, context)); } /** * User this method to get details of a specific IoT Security solution based on solution name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution configuration and resource information along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String solutionName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String solutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -566,47 +463,34 @@ private Mono> getByResourceGroupWithResp final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, solutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * User this method to get details of a specific IoT Security solution based on solution name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution configuration and resource information along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String solutionName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String solutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -618,22 +502,15 @@ private Mono> getByResourceGroupWithResp final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, accept, context); } /** * User this method to get details of a specific IoT Security solution based on solution name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -648,9 +525,9 @@ private Mono getByResourceGroupAsync(String resou /** * User this method to get details of a specific IoT Security solution based on solution name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -659,16 +536,16 @@ private Mono getByResourceGroupAsync(String resou * @return ioT Security solution configuration and resource information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String solutionName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String solutionName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, solutionName, context).block(); } /** * User this method to get details of a specific IoT Security solution based on solution name. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -682,31 +559,27 @@ public IoTSecuritySolutionModelInner getByResourceGroup(String resourceGroupName /** * Use this method to create or update yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param iotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution configuration and resource information along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String solutionName, IoTSecuritySolutionModelInner iotSecuritySolutionData) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String solutionName, IoTSecuritySolutionModelInner iotSecuritySolutionData) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -716,35 +589,23 @@ private Mono> createOrUpdateWithResponse return Mono.error(new IllegalArgumentException("Parameter solutionName is required and cannot be null.")); } if (iotSecuritySolutionData == null) { - return Mono - .error( - new IllegalArgumentException("Parameter iotSecuritySolutionData is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter iotSecuritySolutionData is required and cannot be null.")); } else { iotSecuritySolutionData.validate(); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - iotSecuritySolutionData, - accept, - context)) + return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, solutionName, iotSecuritySolutionData, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to create or update yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param iotSecuritySolutionData The security solution data. * @param context The context to associate with this operation. @@ -752,25 +613,18 @@ private Mono> createOrUpdateWithResponse * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution configuration and resource information along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String solutionName, - IoTSecuritySolutionModelInner iotSecuritySolutionData, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String solutionName, IoTSecuritySolutionModelInner iotSecuritySolutionData, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -780,32 +634,23 @@ private Mono> createOrUpdateWithResponse return Mono.error(new IllegalArgumentException("Parameter solutionName is required and cannot be null.")); } if (iotSecuritySolutionData == null) { - return Mono - .error( - new IllegalArgumentException("Parameter iotSecuritySolutionData is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter iotSecuritySolutionData is required and cannot be null.")); } else { iotSecuritySolutionData.validate(); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - iotSecuritySolutionData, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, iotSecuritySolutionData, accept, context); } /** * Use this method to create or update yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param iotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -814,17 +659,17 @@ private Mono> createOrUpdateWithResponse * @return ioT Security solution configuration and resource information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String solutionName, IoTSecuritySolutionModelInner iotSecuritySolutionData) { + private Mono createOrUpdateAsync(String resourceGroupName, String solutionName, + IoTSecuritySolutionModelInner iotSecuritySolutionData) { return createOrUpdateWithResponseAsync(resourceGroupName, solutionName, iotSecuritySolutionData) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Use this method to create or update yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param iotSecuritySolutionData The security solution data. * @param context The context to associate with this operation. @@ -834,20 +679,17 @@ private Mono createOrUpdateAsync( * @return ioT Security solution configuration and resource information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String solutionName, - IoTSecuritySolutionModelInner iotSecuritySolutionData, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String solutionName, IoTSecuritySolutionModelInner iotSecuritySolutionData, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, solutionName, iotSecuritySolutionData, context) .block(); } /** * Use this method to create or update yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param iotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -856,8 +698,8 @@ public Response createOrUpdateWithResponse( * @return ioT Security solution configuration and resource information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IoTSecuritySolutionModelInner createOrUpdate( - String resourceGroupName, String solutionName, IoTSecuritySolutionModelInner iotSecuritySolutionData) { + public IoTSecuritySolutionModelInner createOrUpdate(String resourceGroupName, String solutionName, + IoTSecuritySolutionModelInner iotSecuritySolutionData) { return createOrUpdateWithResponse(resourceGroupName, solutionName, iotSecuritySolutionData, Context.NONE) .getValue(); } @@ -865,31 +707,27 @@ public IoTSecuritySolutionModelInner createOrUpdate( /** * Use this method to update existing IoT Security solution tags or user defined resources. To update other fields * use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param updateIotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution configuration and resource information along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String solutionName, UpdateIotSecuritySolutionData updateIotSecuritySolutionData) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String solutionName, UpdateIotSecuritySolutionData updateIotSecuritySolutionData) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -899,10 +737,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter solutionName is required and cannot be null.")); } if (updateIotSecuritySolutionData == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter updateIotSecuritySolutionData is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter updateIotSecuritySolutionData is required and cannot be null.")); } else { updateIotSecuritySolutionData.validate(); } @@ -910,26 +746,17 @@ private Mono> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - updateIotSecuritySolutionData, - accept, - context)) + context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, solutionName, updateIotSecuritySolutionData, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to update existing IoT Security solution tags or user defined resources. To update other fields * use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param updateIotSecuritySolutionData The security solution data. * @param context The context to associate with this operation. @@ -937,25 +764,18 @@ private Mono> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return ioT Security solution configuration and resource information along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String solutionName, - UpdateIotSecuritySolutionData updateIotSecuritySolutionData, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String solutionName, UpdateIotSecuritySolutionData updateIotSecuritySolutionData, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -965,34 +785,24 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter solutionName is required and cannot be null.")); } if (updateIotSecuritySolutionData == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter updateIotSecuritySolutionData is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter updateIotSecuritySolutionData is required and cannot be null.")); } else { updateIotSecuritySolutionData.validate(); } final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - updateIotSecuritySolutionData, - accept, - context); + return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, updateIotSecuritySolutionData, accept, context); } /** * Use this method to update existing IoT Security solution tags or user defined resources. To update other fields * use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param updateIotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1001,8 +811,8 @@ private Mono> updateWithResponseAsync( * @return ioT Security solution configuration and resource information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String solutionName, UpdateIotSecuritySolutionData updateIotSecuritySolutionData) { + private Mono updateAsync(String resourceGroupName, String solutionName, + UpdateIotSecuritySolutionData updateIotSecuritySolutionData) { return updateWithResponseAsync(resourceGroupName, solutionName, updateIotSecuritySolutionData) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1010,9 +820,9 @@ private Mono updateAsync( /** * Use this method to update existing IoT Security solution tags or user defined resources. To update other fields * use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param updateIotSecuritySolutionData The security solution data. * @param context The context to associate with this operation. @@ -1022,20 +832,17 @@ private Mono updateAsync( * @return ioT Security solution configuration and resource information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String solutionName, - UpdateIotSecuritySolutionData updateIotSecuritySolutionData, - Context context) { + public Response updateWithResponse(String resourceGroupName, String solutionName, + UpdateIotSecuritySolutionData updateIotSecuritySolutionData, Context context) { return updateWithResponseAsync(resourceGroupName, solutionName, updateIotSecuritySolutionData, context).block(); } /** * Use this method to update existing IoT Security solution tags or user defined resources. To update other fields * use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param updateIotSecuritySolutionData The security solution data. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1044,17 +851,17 @@ public Response updateWithResponse( * @return ioT Security solution configuration and resource information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IoTSecuritySolutionModelInner update( - String resourceGroupName, String solutionName, UpdateIotSecuritySolutionData updateIotSecuritySolutionData) { + public IoTSecuritySolutionModelInner update(String resourceGroupName, String solutionName, + UpdateIotSecuritySolutionData updateIotSecuritySolutionData) { return updateWithResponse(resourceGroupName, solutionName, updateIotSecuritySolutionData, Context.NONE) .getValue(); } /** * Use this method to delete yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1064,16 +871,12 @@ public IoTSecuritySolutionModelInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String solutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1085,25 +888,16 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S final String apiVersion = "2019-08-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, solutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Use this method to delete yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1112,19 +906,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String solutionName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String solutionName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1136,22 +926,15 @@ private Mono> deleteWithResponseAsync( final String apiVersion = "2019-08-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - solutionName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + solutionName, accept, context); } /** * Use this method to delete yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1165,9 +948,9 @@ private Mono deleteAsync(String resourceGroupName, String solutionName) { /** * Use this method to delete yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1182,9 +965,9 @@ public Response deleteWithResponse(String resourceGroupName, String soluti /** * Use this method to delete yours IoT Security solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param solutionName The name of the IoT Security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1197,9 +980,10 @@ public void delete(String resourceGroupName, String solutionName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1211,32 +995,24 @@ private Mono> listBySubscriptionNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1244,37 +1020,28 @@ private Mono> listBySubscriptionNex * @return list of IoT Security solutions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1286,32 +1053,24 @@ private Mono> listByResourceGroupNe return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1319,29 +1078,19 @@ private Mono> listByResourceGroupNe * @return list of IoT Security solutions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsImpl.java index 157e75226a14..d1c50ef8066f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsImpl.java @@ -21,44 +21,41 @@ public final class IotSecuritySolutionsImpl implements IotSecuritySolutions { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public IotSecuritySolutionsImpl( - IotSecuritySolutionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public IotSecuritySolutionsImpl(IotSecuritySolutionsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); } public PagedIterable list(String filter, Context context) { PagedIterable inner = this.serviceClient().list(filter, context); - return Utils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup( - String resourceGroupName, String filter, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, filter, context); - return Utils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IoTSecuritySolutionModelImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String solutionName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, solutionName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String solutionName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, solutionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IoTSecuritySolutionModelImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,8 +71,8 @@ public IoTSecuritySolutionModel getByResourceGroup(String resourceGroupName, Str } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String solutionName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String solutionName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, solutionName, context); } @@ -84,89 +81,57 @@ public void deleteByResourceGroup(String resourceGroupName, String solutionName) } public IoTSecuritySolutionModel getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String solutionName = Utils.getValueFromIdByName(id, "iotSecuritySolutions"); + String solutionName = ResourceManagerUtils.getValueFromIdByName(id, "iotSecuritySolutions"); if (solutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, solutionName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String solutionName = Utils.getValueFromIdByName(id, "iotSecuritySolutions"); + String solutionName = ResourceManagerUtils.getValueFromIdByName(id, "iotSecuritySolutions"); if (solutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, solutionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String solutionName = Utils.getValueFromIdByName(id, "iotSecuritySolutions"); + String solutionName = ResourceManagerUtils.getValueFromIdByName(id, "iotSecuritySolutions"); if (solutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, solutionName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String solutionName = Utils.getValueFromIdByName(id, "iotSecuritySolutions"); + String solutionName = ResourceManagerUtils.getValueFromIdByName(id, "iotSecuritySolutions"); if (solutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iotSecuritySolutions'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, solutionName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesClientImpl.java index 1a990d30535c..9d5befbcde10 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesClientImpl.java @@ -36,23 +36,28 @@ import com.azure.resourcemanager.security.models.JitNetworkAccessPolicyInitiateRequest; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JitNetworkAccessPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in JitNetworkAccessPoliciesClient. + */ public final class JitNetworkAccessPoliciesClientImpl implements JitNetworkAccessPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JitNetworkAccessPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of JitNetworkAccessPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JitNetworkAccessPoliciesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(JitNetworkAccessPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(JitNetworkAccessPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,164 +68,121 @@ public final class JitNetworkAccessPoliciesClientImpl implements JitNetworkAcces @Host("{$host}") @ServiceInterface(name = "SecurityCenterJitNet") public interface JitNetworkAccessPoliciesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/jitNetworkAccessPolicies") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByRegion( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByRegion(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupAndRegion( - @HostParam("$host") String endpoint, + Mono> listByResourceGroupAndRegion(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("jitNetworkAccessPolicyName") String jitNetworkAccessPolicyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("jitNetworkAccessPolicyName") String jitNetworkAccessPolicyName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JitNetworkAccessPolicyInner body, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") JitNetworkAccessPolicyInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("jitNetworkAccessPolicyName") String jitNetworkAccessPolicyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}/{jitNetworkAccessPolicyInitiateType}") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}/{jitNetworkAccessPolicyInitiateType}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> initiate( - @HostParam("$host") String endpoint, + Mono> initiate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("jitNetworkAccessPolicyName") String jitNetworkAccessPolicyName, @PathParam("jitNetworkAccessPolicyInitiateType") String jitNetworkAccessPolicyInitiateType, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JitNetworkAccessPolicyInitiateRequest body, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupAndRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Policies for protecting resources using Just-in-Time access control. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -228,39 +190,26 @@ Mono> listByResourceGroupAndRegionNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Policies for protecting resources using Just-in-Time access control. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -270,36 +219,24 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Policies for protecting resources using Just-in-Time access control. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the paginated response with {@link PagedFlux}. @@ -311,7 +248,7 @@ private PagedFlux listAsync() { /** * Policies for protecting resources using Just-in-Time access control. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -320,13 +257,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Policies for protecting resources using Just-in-Time access control. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the paginated response with {@link PagedIterable}. @@ -338,7 +275,7 @@ public PagedIterable list() { /** * Policies for protecting resources using Just-in-Time access control. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -352,9 +289,9 @@ public PagedIterable list(Context context) { /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -363,16 +300,12 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByRegionSinglePageAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -380,33 +313,18 @@ private Mono> listByRegionSinglePageA final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), + ascLocation, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -414,19 +332,15 @@ private Mono> listByRegionSinglePageA * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByRegionSinglePageAsync( - String ascLocation, Context context) { + private Mono> listByRegionSinglePageAsync(String ascLocation, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -435,24 +349,17 @@ private Mono> listByRegionSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByRegion( - this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -460,15 +367,15 @@ private Mono> listByRegionSinglePageA */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByRegionAsync(String ascLocation) { - return new PagedFlux<>( - () -> listByRegionSinglePageAsync(ascLocation), nextLink -> listByRegionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByRegionSinglePageAsync(ascLocation), + nextLink -> listByRegionNextSinglePageAsync(nextLink)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -477,16 +384,15 @@ private PagedFlux listByRegionAsync(String ascLocat */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByRegionAsync(String ascLocation, Context context) { - return new PagedFlux<>( - () -> listByRegionSinglePageAsync(ascLocation, context), + return new PagedFlux<>(() -> listByRegionSinglePageAsync(ascLocation, context), nextLink -> listByRegionNextSinglePageAsync(nextLink, context)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -499,9 +405,9 @@ public PagedIterable listByRegion(String ascLocatio /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -515,28 +421,24 @@ public PagedIterable listByRegion(String ascLocatio /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -545,33 +447,18 @@ private Mono> listByResourceGroupSing final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -579,19 +466,15 @@ private Mono> listByResourceGroupSing * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -601,29 +484,17 @@ private Mono> listByResourceGroupSing final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -631,16 +502,15 @@ private Mono> listByResourceGroupSing */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -649,16 +519,15 @@ private PagedFlux listByResourceGroupAsync(String r */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -671,9 +540,9 @@ public PagedIterable listByResourceGroup(String res /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -687,30 +556,26 @@ public PagedIterable listByResourceGroup(String res /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupAndRegionSinglePageAsync( - String resourceGroupName, String ascLocation) { + private Mono> + listByResourceGroupAndRegionSinglePageAsync(String resourceGroupName, String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -722,36 +587,20 @@ private Mono> listByResourceGroupAndR final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroupAndRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroupAndRegion(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, ascLocation, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -759,19 +608,15 @@ private Mono> listByResourceGroupAndR * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupAndRegionSinglePageAsync( - String resourceGroupName, String ascLocation, Context context) { + private Mono> + listByResourceGroupAndRegionSinglePageAsync(String resourceGroupName, String ascLocation, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -784,52 +629,38 @@ private Mono> listByResourceGroupAndR final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroupAndRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroupAndRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + ascLocation, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAndRegionAsync( - String resourceGroupName, String ascLocation) { - return new PagedFlux<>( - () -> listByResourceGroupAndRegionSinglePageAsync(resourceGroupName, ascLocation), + private PagedFlux listByResourceGroupAndRegionAsync(String resourceGroupName, + String ascLocation) { + return new PagedFlux<>(() -> listByResourceGroupAndRegionSinglePageAsync(resourceGroupName, ascLocation), nextLink -> listByResourceGroupAndRegionNextSinglePageAsync(nextLink)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -837,8 +668,8 @@ private PagedFlux listByResourceGroupAndRegionAsync * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAndRegionAsync( - String resourceGroupName, String ascLocation, Context context) { + private PagedFlux listByResourceGroupAndRegionAsync(String resourceGroupName, + String ascLocation, Context context) { return new PagedFlux<>( () -> listByResourceGroupAndRegionSinglePageAsync(resourceGroupName, ascLocation, context), nextLink -> listByResourceGroupAndRegionNextSinglePageAsync(nextLink, context)); @@ -846,29 +677,29 @@ private PagedFlux listByResourceGroupAndRegionAsync /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupAndRegion( - String resourceGroupName, String ascLocation) { + public PagedIterable listByResourceGroupAndRegion(String resourceGroupName, + String ascLocation) { return new PagedIterable<>(listByResourceGroupAndRegionAsync(resourceGroupName, ascLocation)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -876,18 +707,18 @@ public PagedIterable listByResourceGroupAndRegion( * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupAndRegion( - String resourceGroupName, String ascLocation, Context context) { + public PagedIterable listByResourceGroupAndRegion(String resourceGroupName, + String ascLocation, Context context) { return new PagedIterable<>(listByResourceGroupAndRegionAsync(resourceGroupName, ascLocation, context)); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -895,19 +726,15 @@ public PagedIterable listByResourceGroupAndRegion( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, String jitNetworkAccessPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -917,36 +744,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, jitNetworkAccessPolicyName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -955,19 +770,15 @@ private Mono> getWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String ascLocation, String jitNetworkAccessPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -977,33 +788,23 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, ascLocation, + jitNetworkAccessPolicyName, apiVersion, accept, context); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1011,19 +812,19 @@ private Mono> getWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName) { + private Mono getAsync(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName) { return getWithResponseAsync(resourceGroupName, ascLocation, jitNetworkAccessPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1032,18 +833,18 @@ private Mono getAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context) { + public Response getWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context).block(); } /** * Policies for protecting resources using Just-in-Time access control for the subscription, location. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1051,18 +852,18 @@ public Response getWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JitNetworkAccessPolicyInner get( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName) { + public JitNetworkAccessPolicyInner get(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName) { return getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, Context.NONE).getValue(); } /** * Create a policy for protecting resources using Just-in-Time access control. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1071,22 +872,15 @@ public JitNetworkAccessPolicyInner get( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String ascLocation, String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1096,10 +890,8 @@ private Mono> createOrUpdateWithResponseAs return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } if (body == null) { return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); @@ -1109,29 +901,18 @@ private Mono> createOrUpdateWithResponseAs final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - apiVersion, - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, jitNetworkAccessPolicyName, apiVersion, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a policy for protecting resources using Just-in-Time access control. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @param context The context to associate with this operation. @@ -1141,23 +922,15 @@ private Mono> createOrUpdateWithResponseAs * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String ascLocation, String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1167,10 +940,8 @@ private Mono> createOrUpdateWithResponseAs return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } if (body == null) { return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); @@ -1180,26 +951,17 @@ private Mono> createOrUpdateWithResponseAs final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - apiVersion, - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, apiVersion, body, accept, context); } /** * Create a policy for protecting resources using Just-in-Time access control. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1208,22 +970,19 @@ private Mono> createOrUpdateWithResponseAs * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create a policy for protecting resources using Just-in-Time access control. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @param context The context to associate with this operation. @@ -1233,24 +992,19 @@ private Mono createOrUpdateAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInner body, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String ascLocation, String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body, + context).block(); } /** * Create a policy for protecting resources using Just-in-Time access control. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1259,23 +1013,19 @@ public Response createOrUpdateWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JitNetworkAccessPolicyInner createOrUpdate( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInner body) { - return createOrUpdateWithResponse( - resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body, Context.NONE) - .getValue(); + public JitNetworkAccessPolicyInner createOrUpdate(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInner body) { + return createOrUpdateWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body, + Context.NONE).getValue(); } /** * Delete a Just-in-Time access control policy. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1283,19 +1033,15 @@ public JitNetworkAccessPolicyInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1305,36 +1051,24 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - apiVersion, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, jitNetworkAccessPolicyName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Just-in-Time access control policy. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1343,19 +1077,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1365,33 +1095,23 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - apiVersion, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, apiVersion, accept, context); } /** * Delete a Just-in-Time access control policy. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1406,11 +1126,11 @@ private Mono deleteAsync(String resourceGroupName, String ascLocation, Str /** * Delete a Just-in-Time access control policy. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1419,18 +1139,18 @@ private Mono deleteAsync(String resourceGroupName, String ascLocation, Str * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, Context context) { return deleteWithResponseAsync(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context).block(); } /** * Delete a Just-in-Time access control policy. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1443,11 +1163,11 @@ public void delete(String resourceGroupName, String ascLocation, String jitNetwo /** * Initiate a JIT access from a specific Just-in-Time policy configuration. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1456,22 +1176,15 @@ public void delete(String resourceGroupName, String ascLocation, String jitNetwo * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> initiateWithResponseAsync( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body) { + private Mono> initiateWithResponseAsync(String resourceGroupName, + String ascLocation, String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1481,10 +1194,8 @@ private Mono> initiateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } if (body == null) { return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); @@ -1495,30 +1206,19 @@ private Mono> initiateWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .initiate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - jitNetworkAccessPolicyInitiateType, - apiVersion, - body, - accept, - context)) + .withContext(context -> service.initiate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, jitNetworkAccessPolicyName, jitNetworkAccessPolicyInitiateType, + apiVersion, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Initiate a JIT access from a specific Just-in-Time policy configuration. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @param context The context to associate with this operation. @@ -1528,23 +1228,16 @@ private Mono> initiateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> initiateWithResponseAsync( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body, + private Mono> initiateWithResponseAsync(String resourceGroupName, + String ascLocation, String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1554,10 +1247,8 @@ private Mono> initiateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); } if (jitNetworkAccessPolicyName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter jitNetworkAccessPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter jitNetworkAccessPolicyName is required and cannot be null.")); } if (body == null) { return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); @@ -1568,27 +1259,18 @@ private Mono> initiateWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .initiate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - jitNetworkAccessPolicyName, - jitNetworkAccessPolicyInitiateType, - apiVersion, - body, - accept, - context); + return service.initiate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, jitNetworkAccessPolicyInitiateType, apiVersion, body, accept, + context); } /** * Initiate a JIT access from a specific Just-in-Time policy configuration. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1597,22 +1279,19 @@ private Mono> initiateWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono initiateAsync( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body) { + private Mono initiateAsync(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body) { return initiateWithResponseAsync(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Initiate a JIT access from a specific Just-in-Time policy configuration. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @param context The context to associate with this operation. @@ -1622,23 +1301,19 @@ private Mono initiateAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response initiateWithResponse( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body, - Context context) { + public Response initiateWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body, Context context) { return initiateWithResponseAsync(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body, context) .block(); } /** * Initiate a JIT access from a specific Just-in-Time policy configuration. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param jitNetworkAccessPolicyName Name of a Just-in-Time access configuration policy. * @param body The body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1647,20 +1322,18 @@ public Response initiateWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JitNetworkAccessRequestInner initiate( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body) { + public JitNetworkAccessRequestInner initiate(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body) { return initiateWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1672,31 +1345,22 @@ private Mono> listNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1709,31 +1373,22 @@ private Mono> listNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1745,31 +1400,23 @@ private Mono> listByRegionNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1777,37 +1424,28 @@ private Mono> listByRegionNextSingleP * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1819,32 +1457,24 @@ private Mono> listByResourceGroupNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1852,76 +1482,57 @@ private Mono> listByResourceGroupNext * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupAndRegionNextSinglePageAsync( - String nextLink) { + private Mono> + listByResourceGroupAndRegionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listByResourceGroupAndRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext( + context -> service.listByResourceGroupAndRegionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1929,29 +1540,19 @@ private Mono> listByResourceGroupAndR * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupAndRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByResourceGroupAndRegionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupAndRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupAndRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesImpl.java index b9d9dcc313b6..b240153a75b7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPoliciesImpl.java @@ -24,66 +24,63 @@ public final class JitNetworkAccessPoliciesImpl implements JitNetworkAccessPolic private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public JitNetworkAccessPoliciesImpl( - JitNetworkAccessPoliciesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public JitNetworkAccessPoliciesImpl(JitNetworkAccessPoliciesClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } public PagedIterable listByRegion(String ascLocation) { PagedIterable inner = this.serviceClient().listByRegion(ascLocation); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } public PagedIterable listByRegion(String ascLocation, Context context) { PagedIterable inner = this.serviceClient().listByRegion(ascLocation, context); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroupAndRegion( - String resourceGroupName, String ascLocation) { - PagedIterable inner = - this.serviceClient().listByResourceGroupAndRegion(resourceGroupName, ascLocation); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + public PagedIterable listByResourceGroupAndRegion(String resourceGroupName, + String ascLocation) { + PagedIterable inner + = this.serviceClient().listByResourceGroupAndRegion(resourceGroupName, ascLocation); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroupAndRegion( - String resourceGroupName, String ascLocation, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroupAndRegion(resourceGroupName, ascLocation, context); - return Utils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); + public PagedIterable listByResourceGroupAndRegion(String resourceGroupName, + String ascLocation, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroupAndRegion(resourceGroupName, ascLocation, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JitNetworkAccessPolicyImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context); + public Response getWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new JitNetworkAccessPolicyImpl(inner.getValue(), this.manager())); } else { return null; @@ -91,8 +88,8 @@ public Response getWithResponse( } public JitNetworkAccessPolicy get(String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName) { - JitNetworkAccessPolicyInner inner = - this.serviceClient().get(resourceGroupName, ascLocation, jitNetworkAccessPolicyName); + JitNetworkAccessPolicyInner inner + = this.serviceClient().get(resourceGroupName, ascLocation, jitNetworkAccessPolicyName); if (inner != null) { return new JitNetworkAccessPolicyImpl(inner, this.manager()); } else { @@ -100,45 +97,32 @@ public JitNetworkAccessPolicy get(String resourceGroupName, String ascLocation, } } - public Response deleteWithResponse( - String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context); + public Response deleteWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, + context); } public void delete(String resourceGroupName, String ascLocation, String jitNetworkAccessPolicyName) { this.serviceClient().delete(resourceGroupName, ascLocation, jitNetworkAccessPolicyName); } - public Response initiateWithResponse( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body, - Context context) { - Response inner = - this - .serviceClient() - .initiateWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body, context); + public Response initiateWithResponse(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body, Context context) { + Response inner = this.serviceClient().initiateWithResponse(resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, body, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new JitNetworkAccessRequestImpl(inner.getValue(), this.manager())); } else { return null; } } - public JitNetworkAccessRequest initiate( - String resourceGroupName, - String ascLocation, - String jitNetworkAccessPolicyName, - JitNetworkAccessPolicyInitiateRequest body) { - JitNetworkAccessRequestInner inner = - this.serviceClient().initiate(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body); + public JitNetworkAccessRequest initiate(String resourceGroupName, String ascLocation, + String jitNetworkAccessPolicyName, JitNetworkAccessPolicyInitiateRequest body) { + JitNetworkAccessRequestInner inner + = this.serviceClient().initiate(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, body); if (inner != null) { return new JitNetworkAccessRequestImpl(inner, this.manager()); } else { @@ -147,119 +131,78 @@ public JitNetworkAccessRequest initiate( } public JitNetworkAccessPolicy getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String jitNetworkAccessPolicyName = Utils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); + String jitNetworkAccessPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); if (jitNetworkAccessPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", id))); } - return this - .getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, Context.NONE) + return this.getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String jitNetworkAccessPolicyName = Utils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); + String jitNetworkAccessPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); if (jitNetworkAccessPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", id))); } return this.getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String jitNetworkAccessPolicyName = Utils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); + String jitNetworkAccessPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); if (jitNetworkAccessPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", id))); } this.deleteWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String ascLocation = Utils.getValueFromIdByName(id, "locations"); + String ascLocation = ResourceManagerUtils.getValueFromIdByName(id, "locations"); if (ascLocation == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } - String jitNetworkAccessPolicyName = Utils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); + String jitNetworkAccessPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "jitNetworkAccessPolicies"); if (jitNetworkAccessPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'jitNetworkAccessPolicies'.", id))); } return this.deleteWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPolicyImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPolicyImpl.java index 570ed838040b..58955cb39532 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPolicyImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessPolicyImpl.java @@ -53,12 +53,8 @@ public List virtualMachines() { public List requests() { List inner = this.innerModel().requests(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new JitNetworkAccessRequestImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new JitNetworkAccessRequestImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } @@ -101,24 +97,16 @@ public JitNetworkAccessPolicyImpl withExistingLocation(String resourceGroupName, } public JitNetworkAccessPolicy create() { - this.innerObject = - serviceManager - .serviceClient() - .getJitNetworkAccessPolicies() - .createOrUpdateWithResponse( - resourceGroupName, ascLocation, jitNetworkAccessPolicyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getJitNetworkAccessPolicies().createOrUpdateWithResponse(resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, this.innerModel(), Context.NONE).getValue(); return this; } public JitNetworkAccessPolicy create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJitNetworkAccessPolicies() - .createOrUpdateWithResponse( - resourceGroupName, ascLocation, jitNetworkAccessPolicyName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getJitNetworkAccessPolicies().createOrUpdateWithResponse(resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, this.innerModel(), context).getValue(); return this; } @@ -133,53 +121,38 @@ public JitNetworkAccessPolicyImpl update() { } public JitNetworkAccessPolicy apply() { - this.innerObject = - serviceManager - .serviceClient() - .getJitNetworkAccessPolicies() - .createOrUpdateWithResponse( - resourceGroupName, ascLocation, jitNetworkAccessPolicyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getJitNetworkAccessPolicies().createOrUpdateWithResponse(resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, this.innerModel(), Context.NONE).getValue(); return this; } public JitNetworkAccessPolicy apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJitNetworkAccessPolicies() - .createOrUpdateWithResponse( - resourceGroupName, ascLocation, jitNetworkAccessPolicyName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getJitNetworkAccessPolicies().createOrUpdateWithResponse(resourceGroupName, + ascLocation, jitNetworkAccessPolicyName, this.innerModel(), context).getValue(); return this; } - JitNetworkAccessPolicyImpl( - JitNetworkAccessPolicyInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + JitNetworkAccessPolicyImpl(JitNetworkAccessPolicyInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.ascLocation = Utils.getValueFromIdByName(innerObject.id(), "locations"); - this.jitNetworkAccessPolicyName = Utils.getValueFromIdByName(innerObject.id(), "jitNetworkAccessPolicies"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.ascLocation = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "locations"); + this.jitNetworkAccessPolicyName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jitNetworkAccessPolicies"); } public JitNetworkAccessPolicy refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getJitNetworkAccessPolicies() - .getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJitNetworkAccessPolicies() + .getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, Context.NONE).getValue(); return this; } public JitNetworkAccessPolicy refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJitNetworkAccessPolicies() - .getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJitNetworkAccessPolicies() + .getWithResponse(resourceGroupName, ascLocation, jitNetworkAccessPolicyName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessRequestImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessRequestImpl.java index 0cf244c2e8b9..be0e133fab44 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessRequestImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/JitNetworkAccessRequestImpl.java @@ -16,8 +16,8 @@ public final class JitNetworkAccessRequestImpl implements JitNetworkAccessReques private final com.azure.resourcemanager.security.SecurityManager serviceManager; - JitNetworkAccessRequestImpl( - JitNetworkAccessRequestInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + JitNetworkAccessRequestImpl(JitNetworkAccessRequestInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsClientImpl.java index 7cb672fbf87c..c342d7b9fcf5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.AscLocationList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LocationsClient. + */ public final class LocationsClientImpl implements LocationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LocationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of LocationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LocationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,80 +62,57 @@ public final class LocationsClientImpl implements LocationsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterLocati") public interface LocationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of locations where ASC saves your data along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -137,49 +120,37 @@ private Mono> listSinglePageAsync() { * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of locations where ASC saves your data along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of locations where ASC saves your data as paginated response with {@link PagedFlux}. @@ -193,7 +164,7 @@ private PagedFlux listAsync() { * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -202,15 +173,15 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of locations where ASC saves your data as paginated response with {@link PagedIterable}. @@ -224,7 +195,7 @@ public PagedIterable list() { * The location of the responsible ASC of the specific subscription (home region). For each subscription there is * only one responsible location. The location in the response should be used to read or write other resources in * ASC according to their ID. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -238,28 +209,24 @@ public PagedIterable list(Context context) { /** * Details of a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the ASC location of the subscription is in the "name" field along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -267,44 +234,32 @@ private Mono> getWithResponseAsync(String ascLocation final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + ascLocation, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Details of a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the ASC location of the subscription is in the "name" field along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String ascLocation, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -312,15 +267,15 @@ private Mono> getWithResponseAsync(String ascLocation final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), ascLocation, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), ascLocation, accept, + context); } /** * Details of a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -333,9 +288,9 @@ private Mono getAsync(String ascLocation) { /** * Details of a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -349,9 +304,9 @@ public Response getWithResponse(String ascLocation, Context co /** * Details of a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -364,14 +319,15 @@ public AscLocationInner get(String ascLocation) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of locations where ASC saves your data along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -379,37 +335,28 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of locations where ASC saves your data along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -417,23 +364,13 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsImpl.java index d946db5d2e1a..cc476cfd3e1f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/LocationsImpl.java @@ -21,29 +21,26 @@ public final class LocationsImpl implements Locations { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public LocationsImpl( - LocationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public LocationsImpl(LocationsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new AscLocationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AscLocationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new AscLocationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AscLocationImpl(inner1, this.manager())); } public Response getWithResponse(String ascLocation, Context context) { Response inner = this.serviceClient().getWithResponse(ascLocation, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AscLocationImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataImpl.java index fdf2e0b92f46..bc505796e77c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataImpl.java @@ -12,8 +12,8 @@ public final class MdeOnboardingDataImpl implements MdeOnboardingData { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - MdeOnboardingDataImpl( - MdeOnboardingDataInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + MdeOnboardingDataImpl(MdeOnboardingDataInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataListImpl.java index a6a826ba3714..10b6744e2215 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataListImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingDataListImpl.java @@ -17,8 +17,8 @@ public final class MdeOnboardingDataListImpl implements MdeOnboardingDataList { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - MdeOnboardingDataListImpl( - MdeOnboardingDataListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + MdeOnboardingDataListImpl(MdeOnboardingDataListInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -26,12 +26,8 @@ public final class MdeOnboardingDataListImpl implements MdeOnboardingDataList { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new MdeOnboardingDataImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new MdeOnboardingDataImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsClientImpl.java index 1425b43ebbf4..d0367a847d38 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsClientImpl.java @@ -26,22 +26,28 @@ import com.azure.resourcemanager.security.fluent.models.MdeOnboardingDataListInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in MdeOnboardingsClient. */ +/** + * An instance of this class provides access to all the operations defined in MdeOnboardingsClient. + */ public final class MdeOnboardingsClientImpl implements MdeOnboardingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MdeOnboardingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of MdeOnboardingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MdeOnboardingsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(MdeOnboardingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(MdeOnboardingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -52,84 +58,68 @@ public final class MdeOnboardingsClientImpl implements MdeOnboardingsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterMdeOnb") public interface MdeOnboardingsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/mdeOnboardings") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/mdeOnboardings/default") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); } /** * The configuration or data needed to onboard the machine to MDE. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all MDE onboarding data resources along with {@link Response} on successful completion of {@link - * Mono}. + * @return list of all MDE onboarding data resources along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-10-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The configuration or data needed to onboard the machine to MDE. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all MDE onboarding data resources along with {@link Response} on successful completion of {@link - * Mono}. + * @return list of all MDE onboarding data resources along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-10-01-preview"; final String accept = "application/json"; @@ -139,7 +129,7 @@ private Mono> listWithResponseAsync(Context /** * The configuration or data needed to onboard the machine to MDE. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all MDE onboarding data resources on successful completion of {@link Mono}. @@ -151,7 +141,7 @@ private Mono listAsync() { /** * The configuration or data needed to onboard the machine to MDE. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -165,7 +155,7 @@ public Response listWithResponse(Context context) { /** * The configuration or data needed to onboard the machine to MDE. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all MDE onboarding data resources. @@ -177,59 +167,49 @@ public MdeOnboardingDataListInner list() { /** * The default configuration or data needed to onboard the machine to MDE. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource of the configuration or data needed to onboard the machine to MDE along with {@link - * Response} on successful completion of {@link Mono}. + * @return the resource of the configuration or data needed to onboard the machine to MDE along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-10-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The default configuration or data needed to onboard the machine to MDE. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource of the configuration or data needed to onboard the machine to MDE along with {@link - * Response} on successful completion of {@link Mono}. + * @return the resource of the configuration or data needed to onboard the machine to MDE along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-10-01-preview"; final String accept = "application/json"; @@ -239,11 +219,11 @@ private Mono> getWithResponseAsync(Context cont /** * The default configuration or data needed to onboard the machine to MDE. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource of the configuration or data needed to onboard the machine to MDE on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync() { @@ -252,13 +232,13 @@ private Mono getAsync() { /** * The default configuration or data needed to onboard the machine to MDE. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource of the configuration or data needed to onboard the machine to MDE along with {@link - * Response}. + * @return the resource of the configuration or data needed to onboard the machine to MDE along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(Context context) { @@ -267,7 +247,7 @@ public Response getWithResponse(Context context) { /** * The default configuration or data needed to onboard the machine to MDE. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource of the configuration or data needed to onboard the machine to MDE. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsImpl.java index 4a594ef5dc78..ad745ba5a6f9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/MdeOnboardingsImpl.java @@ -22,8 +22,8 @@ public final class MdeOnboardingsImpl implements MdeOnboardings { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public MdeOnboardingsImpl( - MdeOnboardingsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public MdeOnboardingsImpl(MdeOnboardingsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -31,10 +31,7 @@ public MdeOnboardingsImpl( public Response listWithResponse(Context context) { Response inner = this.serviceClient().listWithResponse(context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MdeOnboardingDataListImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,10 +50,7 @@ public MdeOnboardingDataList list() { public Response getWithResponse(Context context) { Response inner = this.serviceClient().getWithResponse(context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MdeOnboardingDataImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationResultAutoGeneratedImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationResultAutoGeneratedImpl.java index dc4835d2f4bc..bbeb3b70d2c4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationResultAutoGeneratedImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationResultAutoGeneratedImpl.java @@ -13,8 +13,7 @@ public final class OperationResultAutoGeneratedImpl implements OperationResultAu private final com.azure.resourcemanager.security.SecurityManager serviceManager; - OperationResultAutoGeneratedImpl( - OperationResultAutoGeneratedInner innerObject, + OperationResultAutoGeneratedImpl(OperationResultAutoGeneratedInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationStatusResultImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationStatusResultImpl.java new file mode 100644 index 000000000000..b16f6acad6f2 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationStatusResultImpl.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.security.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.security.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class OperationStatusResultImpl implements OperationStatusResult { + private OperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + OperationStatusResultImpl(OperationStatusResultInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Float percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public OperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsClientImpl.java index df2c60d733e3..ce9ead3feba0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.OperationList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,100 +62,74 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterOperat") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Security/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Exposes all available operations for discovery purposes. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of possible operations for Microsoft.Security resource provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Exposes all available operations for discovery purposes. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of possible operations for Microsoft.Security resource provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Exposes all available operations for discovery purposes. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of possible operations for Microsoft.Security resource provider as paginated response with {@link - * PagedFlux}. + * @return list of possible operations for Microsoft.Security resource provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -158,27 +138,27 @@ private PagedFlux listAsync() { /** * Exposes all available operations for discovery purposes. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of possible operations for Microsoft.Security resource provider as paginated response with {@link - * PagedFlux}. + * @return list of possible operations for Microsoft.Security resource provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Exposes all available operations for discovery purposes. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of possible operations for Microsoft.Security resource provider as paginated response with {@link - * PagedIterable}. + * @return list of possible operations for Microsoft.Security resource provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -187,13 +167,13 @@ public PagedIterable list() { /** * Exposes all available operations for discovery purposes. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of possible operations for Microsoft.Security resource provider as paginated response with {@link - * PagedIterable}. + * @return list of possible operations for Microsoft.Security resource provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -202,14 +182,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of possible operations for Microsoft.Security resource provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -217,37 +198,28 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of possible operations for Microsoft.Security resource provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -255,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsImpl.java index 4d0d7488ce5f..b40714e8b3e8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OperationsImpl.java @@ -19,20 +19,20 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java index 46e348a6d463..ab7e27cea485 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java @@ -5,9 +5,12 @@ package com.azure.resourcemanager.security.implementation; import com.azure.resourcemanager.security.fluent.models.PricingInner; +import com.azure.resourcemanager.security.models.Enforce; import com.azure.resourcemanager.security.models.Extension; +import com.azure.resourcemanager.security.models.Inherited; import com.azure.resourcemanager.security.models.Pricing; import com.azure.resourcemanager.security.models.PricingTier; +import com.azure.resourcemanager.security.models.ResourcesCoverageStatus; import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; @@ -51,12 +54,24 @@ public OffsetDateTime enablementTime() { return this.innerModel().enablementTime(); } - public Boolean deprecated() { - return this.innerModel().deprecated(); + public Enforce enforce() { + return this.innerModel().enforce(); } - public List replacedBy() { - List inner = this.innerModel().replacedBy(); + public Inherited inherited() { + return this.innerModel().inherited(); + } + + public String inheritedFrom() { + return this.innerModel().inheritedFrom(); + } + + public ResourcesCoverageStatus resourcesCoverageStatus() { + return this.innerModel().resourcesCoverageStatus(); + } + + public List extensions() { + List inner = this.innerModel().extensions(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -64,8 +79,12 @@ public List replacedBy() { } } - public List extensions() { - List inner = this.innerModel().extensions(); + public Boolean deprecated() { + return this.innerModel().deprecated(); + } + + public List replacedBy() { + List inner = this.innerModel().replacedBy(); if (inner != null) { return Collections.unmodifiableList(inner); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingListImpl.java index fce69ede7db3..17437a75891a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingListImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingListImpl.java @@ -25,9 +25,8 @@ public final class PricingListImpl implements PricingList { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new PricingImpl(inner1, this.manager())).collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new PricingImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java index d1e7fb2693c0..bc2876b3ba79 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.security.implementation; import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; @@ -28,17 +29,23 @@ import com.azure.resourcemanager.security.fluent.models.PricingListInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PricingsClient. */ +/** + * An instance of this class provides access to all the operations defined in PricingsClient. + */ public final class PricingsClientImpl implements PricingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PricingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of PricingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PricingsClientImpl(SecurityCenterImpl client) { @@ -53,410 +60,569 @@ public final class PricingsClientImpl implements PricingsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterPricin") public interface PricingsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/{scopeId}/providers/Microsoft.Security/pricings/{pricingName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scopeId", encoded = true) String scopeId, + @PathParam("pricingName") String pricingName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/{scopeId}/providers/Microsoft.Security/pricings/{pricingName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("pricingName") String pricingName, - @HeaderParam("Accept") String accept, - Context context); + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scopeId", encoded = true) String scopeId, + @PathParam("pricingName") String pricingName, @BodyParam("application/json") PricingInner pricing, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Delete("/{scopeId}/providers/Microsoft.Security/pricings/{pricingName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("pricingName") String pricingName, - @BodyParam("application/json") PricingInner pricing, - @HeaderParam("Accept") String accept, - Context context); + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam(value = "scopeId", encoded = true) String scopeId, @PathParam("pricingName") String pricingName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{scopeId}/providers/Microsoft.Security/pricings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scopeId", encoded = true) String scopeId, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); } /** - * Lists Microsoft Defender for Cloud pricing configurations in the subscription. - * + * Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param pricingName name of the pricing configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of pricing configurations response along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id) along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync() { + private Mono> getWithResponseAsync(String scopeId, String pricingName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); } - final String apiVersion = "2023-01-01"; + if (pricingName == null) { + return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); + } + final String apiVersion = "2024-01-01"; final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) + context -> service.get(this.client.getEndpoint(), apiVersion, scopeId, pricingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists Microsoft Defender for Cloud pricing configurations in the subscription. - * + * Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param pricingName name of the pricing configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of pricing configurations response along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id) along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(Context context) { + private Mono> getWithResponseAsync(String scopeId, String pricingName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); + } + if (pricingName == null) { + return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); } - final String apiVersion = "2023-01-01"; + final String apiVersion = "2024-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); + return service.get(this.client.getEndpoint(), apiVersion, scopeId, pricingName, accept, context); } /** - * Lists Microsoft Defender for Cloud pricing configurations in the subscription. - * + * Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param pricingName name of the pricing configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of pricing configurations response on successful completion of {@link Mono}. + * @return the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync() { - return listWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getAsync(String scopeId, String pricingName) { + return getWithResponseAsync(scopeId, pricingName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists Microsoft Defender for Cloud pricing configurations in the subscription. - * + * Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param pricingName name of the pricing configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of pricing configurations response along with {@link Response}. + * @return the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(Context context) { - return listWithResponseAsync(context).block(); + public Response getWithResponse(String scopeId, String pricingName, Context context) { + return getWithResponseAsync(scopeId, pricingName, context).block(); } /** - * Lists Microsoft Defender for Cloud pricing configurations in the subscription. - * + * Get the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). At the resource level, supported resource types are 'VirtualMachines, VMSS and ARC Machines'. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param pricingName name of the pricing configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of pricing configurations response. + * @return the Defender plans pricing configurations of the selected scope (valid scopes are resource id or a + * subscription id). */ @ServiceMethod(returns = ReturnType.SINGLE) - public PricingListInner list() { - return listWithResponse(Context.NONE).getValue(); + public PricingInner get(String scopeId, String pricingName) { + return getWithResponse(scopeId, pricingName, Context.NONE).getValue(); } /** - * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: + * subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and + * only for plan='VirtualMachines' and subPlan='P1'). + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). * @param pricingName name of the pricing configuration. + * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a provided Microsoft Defender for Cloud pricing configuration in the subscription along with {@link - * Response} on successful completion of {@link Mono}. + * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String pricingName) { + private Mono> updateWithResponseAsync(String scopeId, String pricingName, + PricingInner pricing) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); } - final String apiVersion = "2023-01-01"; + if (pricing == null) { + return Mono.error(new IllegalArgumentException("Parameter pricing is required and cannot be null.")); + } else { + pricing.validate(); + } + final String apiVersion = "2024-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, scopeId, pricingName, pricing, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: + * subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and + * only for plan='VirtualMachines' and subPlan='P1'). + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). * @param pricingName name of the pricing configuration. + * @param pricing Pricing object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a provided Microsoft Defender for Cloud pricing configuration in the subscription along with {@link - * Response} on successful completion of {@link Mono}. + * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String pricingName, Context context) { + private Mono> updateWithResponseAsync(String scopeId, String pricingName, + PricingInner pricing, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); } - final String apiVersion = "2023-01-01"; + if (pricing == null) { + return Mono.error(new IllegalArgumentException("Parameter pricing is required and cannot be null.")); + } else { + pricing.validate(); + } + final String apiVersion = "2024-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), pricingName, accept, context); + return service.update(this.client.getEndpoint(), apiVersion, scopeId, pricingName, pricing, accept, context); } /** - * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: + * subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and + * only for plan='VirtualMachines' and subPlan='P1'). + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). * @param pricingName name of the pricing configuration. + * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a provided Microsoft Defender for Cloud pricing configuration in the subscription on successful - * completion of {@link Mono}. + * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String pricingName) { - return getWithResponseAsync(pricingName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono updateAsync(String scopeId, String pricingName, PricingInner pricing) { + return updateWithResponseAsync(scopeId, pricingName, pricing).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: + * subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and + * only for plan='VirtualMachines' and subPlan='P1'). + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). * @param pricingName name of the pricing configuration. + * @param pricing Pricing object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a provided Microsoft Defender for Cloud pricing configuration in the subscription along with {@link - * Response}. + * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String pricingName, Context context) { - return getWithResponseAsync(pricingName, context).block(); + public Response updateWithResponse(String scopeId, String pricingName, PricingInner pricing, + Context context) { + return updateWithResponseAsync(scopeId, pricingName, pricing, context).block(); } /** - * Gets a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Updates a provided Microsoft Defender for Cloud pricing configuration in the scope. Valid scopes are: + * subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and ARC Machines' and + * only for plan='VirtualMachines' and subPlan='P1'). + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). * @param pricingName name of the pricing configuration. + * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a provided Microsoft Defender for Cloud pricing configuration in the subscription. + * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PricingInner get(String pricingName) { - return getWithResponse(pricingName, Context.NONE).getValue(); + public PricingInner update(String scopeId, String pricingName, PricingInner pricing) { + return updateWithResponse(scopeId, pricingName, pricing, Context.NONE).getValue(); } /** - * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for + * resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). + * + * @param scopeId The identifier of the resource, (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}). * @param pricingName name of the pricing configuration. - * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link - * Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String pricingName, PricingInner pricing) { + private Mono> deleteWithResponseAsync(String scopeId, String pricingName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); } - if (pricing == null) { - return Mono.error(new IllegalArgumentException("Parameter pricing is required and cannot be null.")); - } else { - pricing.validate(); - } - final String apiVersion = "2023-01-01"; + final String apiVersion = "2024-01-01"; final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - pricing, - accept, - context)) + context -> service.delete(this.client.getEndpoint(), apiVersion, scopeId, pricingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for + * resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). + * + * @param scopeId The identifier of the resource, (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}). * @param pricingName name of the pricing configuration. - * @param pricing Pricing object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link - * Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String pricingName, PricingInner pricing, Context context) { + private Mono> deleteWithResponseAsync(String scopeId, String pricingName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); } - if (pricing == null) { - return Mono.error(new IllegalArgumentException("Parameter pricing is required and cannot be null.")); - } else { - pricing.validate(); - } - final String apiVersion = "2023-01-01"; + final String apiVersion = "2024-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - pricing, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, scopeId, pricingName, accept, context); } /** - * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for + * resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). + * + * @param scopeId The identifier of the resource, (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}). * @param pricingName name of the pricing configuration. - * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard on successful completion - * of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String pricingName, PricingInner pricing) { - return updateWithResponseAsync(pricingName, pricing).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String scopeId, String pricingName) { + return deleteWithResponseAsync(scopeId, pricingName).flatMap(ignored -> Mono.empty()); } /** - * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for + * resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). + * + * @param scopeId The identifier of the resource, (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}). * @param pricingName name of the pricing configuration. - * @param pricing Pricing object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link - * Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String pricingName, PricingInner pricing, Context context) { - return updateWithResponseAsync(pricingName, pricing, context).block(); + public Response deleteWithResponse(String scopeId, String pricingName, Context context) { + return deleteWithResponseAsync(scopeId, pricingName, context).block(); } /** - * Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription. - * + * Deletes a provided Microsoft Defender for Cloud pricing configuration in a specific resource. Valid only for + * resource scope (Supported resources are: 'VirtualMachines, VMSS and ARC MachinesS'). + * + * @param scopeId The identifier of the resource, (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}). * @param pricingName name of the pricing configuration. - * @param pricing Pricing object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PricingInner update(String pricingName, PricingInner pricing) { - return updateWithResponse(pricingName, pricing, Context.NONE).getValue(); + public void delete(String scopeId, String pricingName) { + deleteWithResponse(scopeId, pricingName, Context.NONE); + } + + /** + * Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. + * Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and + * ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the + * unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list + * includes the pricings set for 'planName1' and 'planName2' only. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param filter OData filter. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of pricing configurations response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String scopeId, String filter) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); + } + final String apiVersion = "2024-01-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), apiVersion, scopeId, filter, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. + * Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and + * ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the + * unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list + * includes the pricings set for 'planName1' and 'planName2' only. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param filter OData filter. Optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of pricing configurations response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String scopeId, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scopeId == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeId is required and cannot be null.")); + } + final String apiVersion = "2024-01-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), apiVersion, scopeId, filter, accept, context); + } + + /** + * Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. + * Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and + * ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the + * unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list + * includes the pricings set for 'planName1' and 'planName2' only. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of pricing configurations response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String scopeId) { + final String filter = null; + return listWithResponseAsync(scopeId, filter).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. + * Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and + * ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the + * unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list + * includes the pricings set for 'planName1' and 'planName2' only. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @param filter OData filter. Optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of pricing configurations response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(String scopeId, String filter, Context context) { + return listWithResponseAsync(scopeId, filter, context).block(); + } + + /** + * Lists Microsoft Defender for Cloud pricing configurations of the scopeId, that match the optional given $filter. + * Valid scopes are: subscription id or a specific resource id (Supported resources are: 'VirtualMachines, VMSS and + * ARC Machines'). Valid $filter is: 'name in ({planName1},{planName2},...)'. If $filter is not provided, the + * unfiltered list will be returned. If '$filter=name in (planName1,planName2)' is provided, the returned list + * includes the pricings set for 'planName1' and 'planName2' only. + * + * @param scopeId The scope id of the pricing. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or a specific resource (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}) + * - Supported resources are (VirtualMachines). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of pricing configurations response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PricingListInner list(String scopeId) { + final String filter = null; + return listWithResponse(scopeId, filter, Context.NONE).getValue(); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsImpl.java index 99ea26d48734..d74c9313bcc9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsImpl.java @@ -27,43 +27,38 @@ public PricingsImpl(PricingsClient innerClient, com.azure.resourcemanager.securi this.serviceManager = serviceManager; } - public Response listWithResponse(Context context) { - Response inner = this.serviceClient().listWithResponse(context); + public Response getWithResponse(String scopeId, String pricingName, Context context) { + Response inner = this.serviceClient().getWithResponse(scopeId, pricingName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PricingListImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PricingImpl(inner.getValue(), this.manager())); } else { return null; } } - public PricingList list() { - PricingListInner inner = this.serviceClient().list(); + public Pricing get(String scopeId, String pricingName) { + PricingInner inner = this.serviceClient().get(scopeId, pricingName); if (inner != null) { - return new PricingListImpl(inner, this.manager()); + return new PricingImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse(String pricingName, Context context) { - Response inner = this.serviceClient().getWithResponse(pricingName, context); + public Response updateWithResponse(String scopeId, String pricingName, PricingInner pricing, + Context context) { + Response inner = this.serviceClient().updateWithResponse(scopeId, pricingName, pricing, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PricingImpl(inner.getValue(), this.manager())); } else { return null; } } - public Pricing get(String pricingName) { - PricingInner inner = this.serviceClient().get(pricingName); + public Pricing update(String scopeId, String pricingName, PricingInner pricing) { + PricingInner inner = this.serviceClient().update(scopeId, pricingName, pricing); if (inner != null) { return new PricingImpl(inner, this.manager()); } else { @@ -71,23 +66,28 @@ public Pricing get(String pricingName) { } } - public Response updateWithResponse(String pricingName, PricingInner pricing, Context context) { - Response inner = this.serviceClient().updateWithResponse(pricingName, pricing, context); + public Response deleteByResourceGroupWithResponse(String scopeId, String pricingName, Context context) { + return this.serviceClient().deleteWithResponse(scopeId, pricingName, context); + } + + public void deleteByResourceGroup(String scopeId, String pricingName) { + this.serviceClient().delete(scopeId, pricingName); + } + + public Response listWithResponse(String scopeId, String filter, Context context) { + Response inner = this.serviceClient().listWithResponse(scopeId, filter, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PricingImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PricingListImpl(inner.getValue(), this.manager())); } else { return null; } } - public Pricing update(String pricingName, PricingInner pricing) { - PricingInner inner = this.serviceClient().update(pricingName, pricing); + public PricingList list(String scopeId) { + PricingListInner inner = this.serviceClient().list(scopeId); if (inner != null) { - return new PricingImpl(inner, this.manager()); + return new PricingListImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentImpl.java index d83de36d26c9..8345f2183601 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentImpl.java @@ -13,8 +13,7 @@ public final class RegulatoryComplianceAssessmentImpl implements RegulatoryCompl private final com.azure.resourcemanager.security.SecurityManager serviceManager; - RegulatoryComplianceAssessmentImpl( - RegulatoryComplianceAssessmentInner innerObject, + RegulatoryComplianceAssessmentImpl(RegulatoryComplianceAssessmentInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsClientImpl.java index 90b9f8738eda..5da14f069015 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsClientImpl.java @@ -30,80 +30,71 @@ import com.azure.resourcemanager.security.models.RegulatoryComplianceAssessmentList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RegulatoryComplianceAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in RegulatoryComplianceAssessmentsClient. + */ public final class RegulatoryComplianceAssessmentsClientImpl implements RegulatoryComplianceAssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RegulatoryComplianceAssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of RegulatoryComplianceAssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RegulatoryComplianceAssessmentsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - RegulatoryComplianceAssessmentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(RegulatoryComplianceAssessmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterRegulatoryComplianceAssessments to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for SecurityCenterRegulatoryComplianceAssessments to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterRegula") public interface RegulatoryComplianceAssessmentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("regulatoryComplianceStandardName") String regulatoryComplianceStandardName, @PathParam("regulatoryComplianceControlName") String regulatoryComplianceControlName, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("regulatoryComplianceStandardName") String regulatoryComplianceStandardName, @PathParam("regulatoryComplianceControlName") String regulatoryComplianceControlName, @PathParam("regulatoryComplianceAssessmentName") String regulatoryComplianceAssessmentName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param filter OData filter. Optional. @@ -111,65 +102,40 @@ Mono> listNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance assessment response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( String regulatoryComplianceStandardName, String regulatoryComplianceControlName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } if (regulatoryComplianceControlName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceControlName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceControlName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, regulatoryComplianceControlName, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param filter OData filter. Optional. @@ -178,65 +144,41 @@ private Mono> listSinglePageA * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance assessment response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String filter, + String regulatoryComplianceStandardName, String regulatoryComplianceControlName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } if (regulatoryComplianceControlName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceControlName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceControlName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, regulatoryComplianceControlName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param filter OData filter. Optional. @@ -246,8 +188,8 @@ private Mono> listSinglePageA * @return list of regulatory compliance assessment response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName, String filter) { + private PagedFlux listAsync(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String filter) { return new PagedFlux<>( () -> listSinglePageAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, filter), nextLink -> listNextSinglePageAsync(nextLink)); @@ -255,7 +197,7 @@ private PagedFlux listAsync( /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,8 +206,8 @@ private PagedFlux listAsync( * @return list of regulatory compliance assessment response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { + private PagedFlux listAsync(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName) { final String filter = null; return new PagedFlux<>( () -> listSinglePageAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, filter), @@ -274,7 +216,7 @@ private PagedFlux listAsync( /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param filter OData filter. Optional. @@ -285,20 +227,15 @@ private PagedFlux listAsync( * @return list of regulatory compliance assessment response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String filter, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String filter, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(regulatoryComplianceStandardName, + regulatoryComplianceControlName, filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,8 +244,8 @@ private PagedFlux listAsync( * @return list of regulatory compliance assessment response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { + public PagedIterable list(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName) { final String filter = null; return new PagedIterable<>( listAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, filter)); @@ -316,7 +253,7 @@ public PagedIterable list( /** * Details and state of assessments mapped to selected regulatory compliance control. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param filter OData filter. Optional. @@ -327,18 +264,15 @@ public PagedIterable list( * @return list of regulatory compliance assessment response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String filter, - Context context) { + public PagedIterable list(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String filter, Context context) { return new PagedIterable<>( listAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, filter, context)); } /** * Supported regulatory compliance details and state for selected assessment. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object. @@ -346,64 +280,44 @@ public PagedIterable list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return regulatory compliance assessment details and state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, + String regulatoryComplianceStandardName, String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } if (regulatoryComplianceControlName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceControlName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceControlName is required and cannot be null.")); } if (regulatoryComplianceAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceAssessmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceAssessmentName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - regulatoryComplianceAssessmentName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Supported regulatory compliance details and state for selected assessment. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object. @@ -412,62 +326,43 @@ private Mono> getWithResponseAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return regulatory compliance assessment details and state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName, - Context context) { + String regulatoryComplianceStandardName, String regulatoryComplianceControlName, + String regulatoryComplianceAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } if (regulatoryComplianceControlName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceControlName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceControlName is required and cannot be null.")); } if (regulatoryComplianceAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceAssessmentName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceAssessmentName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - regulatoryComplianceAssessmentName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName, + accept, context); } /** * Supported regulatory compliance details and state for selected assessment. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object. @@ -477,18 +372,15 @@ private Mono> getWithResponseAsync * @return regulatory compliance assessment details and state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName) { - return getWithResponseAsync( - regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getAsync(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName) { + return getWithResponseAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, + regulatoryComplianceAssessmentName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Supported regulatory compliance details and state for selected assessment. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object. @@ -499,22 +391,15 @@ private Mono getAsync( * @return regulatory compliance assessment details and state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName, - Context context) { - return getWithResponseAsync( - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - regulatoryComplianceAssessmentName, - context) - .block(); + public Response getWithResponse(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName, Context context) { + return getWithResponseAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, + regulatoryComplianceAssessmentName, context).block(); } /** * Supported regulatory compliance details and state for selected assessment. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param regulatoryComplianceAssessmentName Name of the regulatory compliance assessment object. @@ -524,28 +409,23 @@ public Response getWithResponse( * @return regulatory compliance assessment details and state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegulatoryComplianceAssessmentInner get( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName) { - return getWithResponse( - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - regulatoryComplianceAssessmentName, - Context.NONE) - .getValue(); + public RegulatoryComplianceAssessmentInner get(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName) { + return getWithResponse(regulatoryComplianceStandardName, regulatoryComplianceControlName, + regulatoryComplianceAssessmentName, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance assessment response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -553,62 +433,43 @@ private Mono> listNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance assessment response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsImpl.java index 222a4ee49b8b..93ca5a7b9bd5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceAssessmentsImpl.java @@ -21,67 +21,45 @@ public final class RegulatoryComplianceAssessmentsImpl implements RegulatoryComp private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public RegulatoryComplianceAssessmentsImpl( - RegulatoryComplianceAssessmentsClient innerClient, + public RegulatoryComplianceAssessmentsImpl(RegulatoryComplianceAssessmentsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { - PagedIterable inner = - this.serviceClient().list(regulatoryComplianceStandardName, regulatoryComplianceControlName); - return Utils.mapPage(inner, inner1 -> new RegulatoryComplianceAssessmentImpl(inner1, this.manager())); + public PagedIterable list(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName) { + PagedIterable inner + = this.serviceClient().list(regulatoryComplianceStandardName, regulatoryComplianceControlName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RegulatoryComplianceAssessmentImpl(inner1, this.manager())); } - public PagedIterable list( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String filter, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(regulatoryComplianceStandardName, regulatoryComplianceControlName, filter, context); - return Utils.mapPage(inner, inner1 -> new RegulatoryComplianceAssessmentImpl(inner1, this.manager())); + public PagedIterable list(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String filter, Context context) { + PagedIterable inner = this.serviceClient() + .list(regulatoryComplianceStandardName, regulatoryComplianceControlName, filter, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RegulatoryComplianceAssessmentImpl(inner1, this.manager())); } - public Response getWithResponse( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse( - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - regulatoryComplianceAssessmentName, - context); + public Response getWithResponse(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName, Context context) { + Response inner + = this.serviceClient().getWithResponse(regulatoryComplianceStandardName, regulatoryComplianceControlName, + regulatoryComplianceAssessmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RegulatoryComplianceAssessmentImpl(inner.getValue(), this.manager())); } else { return null; } } - public RegulatoryComplianceAssessment get( - String regulatoryComplianceStandardName, - String regulatoryComplianceControlName, - String regulatoryComplianceAssessmentName) { - RegulatoryComplianceAssessmentInner inner = - this - .serviceClient() - .get( - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - regulatoryComplianceAssessmentName); + public RegulatoryComplianceAssessment get(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, String regulatoryComplianceAssessmentName) { + RegulatoryComplianceAssessmentInner inner = this.serviceClient().get(regulatoryComplianceStandardName, + regulatoryComplianceControlName, regulatoryComplianceAssessmentName); if (inner != null) { return new RegulatoryComplianceAssessmentImpl(inner, this.manager()); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlImpl.java index b51b1ed37d11..9c60baec0bd4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlImpl.java @@ -13,8 +13,7 @@ public final class RegulatoryComplianceControlImpl implements RegulatoryComplian private final com.azure.resourcemanager.security.SecurityManager serviceManager; - RegulatoryComplianceControlImpl( - RegulatoryComplianceControlInner innerObject, + RegulatoryComplianceControlImpl(RegulatoryComplianceControlInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsClientImpl.java index a1bf42ba21da..96e7ae2abab0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsClientImpl.java @@ -30,24 +30,28 @@ import com.azure.resourcemanager.security.models.RegulatoryComplianceControlList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RegulatoryComplianceControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in RegulatoryComplianceControlsClient. + */ public final class RegulatoryComplianceControlsClientImpl implements RegulatoryComplianceControlsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RegulatoryComplianceControlsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of RegulatoryComplianceControlsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RegulatoryComplianceControlsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - RegulatoryComplianceControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(RegulatoryComplianceControlsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,106 +62,73 @@ public final class RegulatoryComplianceControlsClientImpl implements RegulatoryC @Host("{$host}") @ServiceInterface(name = "SecurityCenterRegula") public interface RegulatoryComplianceControlsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("regulatoryComplianceStandardName") String regulatoryComplianceStandardName, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("regulatoryComplianceStandardName") String regulatoryComplianceStandardName, @PathParam("regulatoryComplianceControlName") String regulatoryComplianceControlName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance controls response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String regulatoryComplianceStandardName, String filter) { + private Mono> + listSinglePageAsync(String regulatoryComplianceStandardName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param filter OData filter. Optional. * @param context The context to associate with this operation. @@ -165,55 +136,36 @@ private Mono> listSinglePageAsyn * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance controls response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String regulatoryComplianceStandardName, String filter, Context context) { + private Mono> + listSinglePageAsync(String regulatoryComplianceStandardName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -222,16 +174,15 @@ private Mono> listSinglePageAsyn * @return list of regulatory compliance controls response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String regulatoryComplianceStandardName, String filter) { - return new PagedFlux<>( - () -> listSinglePageAsync(regulatoryComplianceStandardName, filter), + private PagedFlux listAsync(String regulatoryComplianceStandardName, + String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(regulatoryComplianceStandardName, filter), nextLink -> listNextSinglePageAsync(nextLink)); } /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -241,14 +192,13 @@ private PagedFlux listAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regulatoryComplianceStandardName) { final String filter = null; - return new PagedFlux<>( - () -> listSinglePageAsync(regulatoryComplianceStandardName, filter), + return new PagedFlux<>(() -> listSinglePageAsync(regulatoryComplianceStandardName, filter), nextLink -> listNextSinglePageAsync(nextLink)); } /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param filter OData filter. Optional. * @param context The context to associate with this operation. @@ -258,16 +208,15 @@ private PagedFlux listAsync(String regulatoryC * @return list of regulatory compliance controls response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String regulatoryComplianceStandardName, String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(regulatoryComplianceStandardName, filter, context), + private PagedFlux listAsync(String regulatoryComplianceStandardName, + String filter, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(regulatoryComplianceStandardName, filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -282,7 +231,7 @@ public PagedIterable list(String regulatoryCom /** * All supported regulatory compliance controls details and state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param filter OData filter. Optional. * @param context The context to associate with this operation. @@ -292,69 +241,52 @@ public PagedIterable list(String regulatoryCom * @return list of regulatory compliance controls response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String regulatoryComplianceStandardName, String filter, Context context) { + public PagedIterable list(String regulatoryComplianceStandardName, String filter, + Context context) { return new PagedIterable<>(listAsync(regulatoryComplianceStandardName, filter, context)); } /** * Selected regulatory compliance control details and state. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return regulatory compliance control details and state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { + private Mono> + getWithResponseAsync(String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } if (regulatoryComplianceControlName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceControlName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceControlName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, regulatoryComplianceControlName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Selected regulatory compliance control details and state. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param context The context to associate with this operation. @@ -362,52 +294,37 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return regulatory compliance control details and state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( String regulatoryComplianceStandardName, String regulatoryComplianceControlName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } if (regulatoryComplianceControlName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceControlName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceControlName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - regulatoryComplianceControlName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, regulatoryComplianceControlName, accept, context); } /** * Selected regulatory compliance control details and state. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -416,15 +333,15 @@ private Mono> getWithResponseAsync( * @return regulatory compliance control details and state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { + private Mono getAsync(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName) { return getWithResponseAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Selected regulatory compliance control details and state. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @param context The context to associate with this operation. @@ -434,14 +351,14 @@ private Mono getAsync( * @return regulatory compliance control details and state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName, Context context) { + public Response getWithResponse(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, Context context) { return getWithResponseAsync(regulatoryComplianceStandardName, regulatoryComplianceControlName, context).block(); } /** * Selected regulatory compliance control details and state. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param regulatoryComplianceControlName Name of the regulatory compliance control object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -450,22 +367,23 @@ public Response getWithResponse( * @return regulatory compliance control details and state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegulatoryComplianceControlInner get( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { + public RegulatoryComplianceControlInner get(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName) { return getWithResponse(regulatoryComplianceStandardName, regulatoryComplianceControlName, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance controls response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -473,62 +391,43 @@ private Mono> listNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance controls response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsImpl.java index 31f2bb559139..253dcaf1bbf5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceControlsImpl.java @@ -21,47 +21,43 @@ public final class RegulatoryComplianceControlsImpl implements RegulatoryComplia private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public RegulatoryComplianceControlsImpl( - RegulatoryComplianceControlsClient innerClient, + public RegulatoryComplianceControlsImpl(RegulatoryComplianceControlsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String regulatoryComplianceStandardName) { - PagedIterable inner = - this.serviceClient().list(regulatoryComplianceStandardName); - return Utils.mapPage(inner, inner1 -> new RegulatoryComplianceControlImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(regulatoryComplianceStandardName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RegulatoryComplianceControlImpl(inner1, this.manager())); } - public PagedIterable list( - String regulatoryComplianceStandardName, String filter, Context context) { - PagedIterable inner = - this.serviceClient().list(regulatoryComplianceStandardName, filter, context); - return Utils.mapPage(inner, inner1 -> new RegulatoryComplianceControlImpl(inner1, this.manager())); + public PagedIterable list(String regulatoryComplianceStandardName, String filter, + Context context) { + PagedIterable inner + = this.serviceClient().list(regulatoryComplianceStandardName, filter, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RegulatoryComplianceControlImpl(inner1, this.manager())); } - public Response getWithResponse( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(regulatoryComplianceStandardName, regulatoryComplianceControlName, context); + public Response getWithResponse(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(regulatoryComplianceStandardName, regulatoryComplianceControlName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RegulatoryComplianceControlImpl(inner.getValue(), this.manager())); } else { return null; } } - public RegulatoryComplianceControl get( - String regulatoryComplianceStandardName, String regulatoryComplianceControlName) { - RegulatoryComplianceControlInner inner = - this.serviceClient().get(regulatoryComplianceStandardName, regulatoryComplianceControlName); + public RegulatoryComplianceControl get(String regulatoryComplianceStandardName, + String regulatoryComplianceControlName) { + RegulatoryComplianceControlInner inner + = this.serviceClient().get(regulatoryComplianceStandardName, regulatoryComplianceControlName); if (inner != null) { return new RegulatoryComplianceControlImpl(inner, this.manager()); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardImpl.java index 19762eafd251..ac80baff8529 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardImpl.java @@ -13,8 +13,7 @@ public final class RegulatoryComplianceStandardImpl implements RegulatoryComplia private final com.azure.resourcemanager.security.SecurityManager serviceManager; - RegulatoryComplianceStandardImpl( - RegulatoryComplianceStandardInner innerObject, + RegulatoryComplianceStandardImpl(RegulatoryComplianceStandardInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsClientImpl.java index 9c58140377cb..5682fe203485 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsClientImpl.java @@ -30,26 +30,28 @@ import com.azure.resourcemanager.security.models.RegulatoryComplianceStandardList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RegulatoryComplianceStandardsClient. */ +/** + * An instance of this class provides access to all the operations defined in RegulatoryComplianceStandardsClient. + */ public final class RegulatoryComplianceStandardsClientImpl implements RegulatoryComplianceStandardsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RegulatoryComplianceStandardsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of RegulatoryComplianceStandardsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RegulatoryComplianceStandardsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - RegulatoryComplianceStandardsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(RegulatoryComplianceStandardsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,135 +62,95 @@ public final class RegulatoryComplianceStandardsClientImpl implements Regulatory @Host("{$host}") @ServiceInterface(name = "SecurityCenterRegula") public interface RegulatoryComplianceStandardsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("regulatoryComplianceStandardName") String regulatoryComplianceStandardName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Supported regulatory compliance standards details and state. - * + * * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance standards response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Supported regulatory compliance standards details and state. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance standards response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), filter, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Supported regulatory compliance standards details and state. - * + * * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -202,7 +164,7 @@ private PagedFlux listAsync(String filter) { /** * Supported regulatory compliance standards details and state. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance standards response as paginated response with {@link PagedFlux}. @@ -215,7 +177,7 @@ private PagedFlux listAsync() { /** * Supported regulatory compliance standards details and state. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -225,13 +187,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Supported regulatory compliance standards details and state. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance standards response as paginated response with {@link PagedIterable}. @@ -244,7 +206,7 @@ public PagedIterable list() { /** * Supported regulatory compliance standards details and state. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -259,99 +221,73 @@ public PagedIterable list(String filter, Cont /** * Supported regulatory compliance details state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return regulatory compliance standard details and state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String regulatoryComplianceStandardName) { + private Mono> + getWithResponseAsync(String regulatoryComplianceStandardName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Supported regulatory compliance details state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return regulatory compliance standard details and state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String regulatoryComplianceStandardName, Context context) { + private Mono> + getWithResponseAsync(String regulatoryComplianceStandardName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (regulatoryComplianceStandardName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter regulatoryComplianceStandardName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter regulatoryComplianceStandardName is required and cannot be null.")); } final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - regulatoryComplianceStandardName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + regulatoryComplianceStandardName, accept, context); } /** * Supported regulatory compliance details state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -365,7 +301,7 @@ private Mono getAsync(String regulatoryCompli /** * Supported regulatory compliance details state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,14 +310,14 @@ private Mono getAsync(String regulatoryCompli * @return regulatory compliance standard details and state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String regulatoryComplianceStandardName, Context context) { + public Response getWithResponse(String regulatoryComplianceStandardName, + Context context) { return getWithResponseAsync(regulatoryComplianceStandardName, context).block(); } /** * Supported regulatory compliance details state for selected standard. - * + * * @param regulatoryComplianceStandardName Name of the regulatory compliance standard object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -395,14 +331,15 @@ public RegulatoryComplianceStandardInner get(String regulatoryComplianceStandard /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance standards response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -410,62 +347,43 @@ private Mono> listNextSinglePag return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of regulatory compliance standards response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsImpl.java index 8f57bbcd3d41..b6a36939c29e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RegulatoryComplianceStandardsImpl.java @@ -21,8 +21,7 @@ public final class RegulatoryComplianceStandardsImpl implements RegulatoryCompli private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public RegulatoryComplianceStandardsImpl( - RegulatoryComplianceStandardsClient innerClient, + public RegulatoryComplianceStandardsImpl(RegulatoryComplianceStandardsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,23 +29,22 @@ public RegulatoryComplianceStandardsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new RegulatoryComplianceStandardImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RegulatoryComplianceStandardImpl(inner1, this.manager())); } public PagedIterable list(String filter, Context context) { PagedIterable inner = this.serviceClient().list(filter, context); - return Utils.mapPage(inner, inner1 -> new RegulatoryComplianceStandardImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RegulatoryComplianceStandardImpl(inner1, this.manager())); } - public Response getWithResponse( - String regulatoryComplianceStandardName, Context context) { - Response inner = - this.serviceClient().getWithResponse(regulatoryComplianceStandardName, context); + public Response getWithResponse(String regulatoryComplianceStandardName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(regulatoryComplianceStandardName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RegulatoryComplianceStandardImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/Utils.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceManagerUtils.java similarity index 79% rename from sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/Utils.java rename to sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceManagerUtils.java index 210bf291fe60..9f956c1dc42e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/Utils.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersClientImpl.java new file mode 100644 index 000000000000..cf7bc0ec09e2 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersClientImpl.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner; +import com.azure.resourcemanager.security.models.UpdateSensitivitySettingsRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ResourceProvidersClient. + */ +public final class ResourceProvidersClientImpl implements ResourceProvidersClient { + /** + * The proxy service used to perform REST calls. + */ + private final ResourceProvidersService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of ResourceProvidersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResourceProvidersClientImpl(SecurityCenterImpl client) { + this.service + = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterResourceProviders to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterResour") + public interface ResourceProvidersService { + @Headers({ "Content-Type: application/json" }) + @Put("/providers/Microsoft.Security/sensitivitySettings/current") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateSensitivitySettings( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UpdateSensitivitySettingsRequest sensitivitySettings, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Security/sensitivitySettings/current") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSensitivitySettings(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Updates data sensitivity settings for sensitive data discovery. + * + * @param sensitivitySettings The data sensitivity settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + updateSensitivitySettingsWithResponseAsync(UpdateSensitivitySettingsRequest sensitivitySettings) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (sensitivitySettings == null) { + return Mono + .error(new IllegalArgumentException("Parameter sensitivitySettings is required and cannot be null.")); + } else { + sensitivitySettings.validate(); + } + final String apiVersion = "2023-02-15-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateSensitivitySettings(this.client.getEndpoint(), apiVersion, + sensitivitySettings, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates data sensitivity settings for sensitive data discovery. + * + * @param sensitivitySettings The data sensitivity settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSensitivitySettingsWithResponseAsync( + UpdateSensitivitySettingsRequest sensitivitySettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (sensitivitySettings == null) { + return Mono + .error(new IllegalArgumentException("Parameter sensitivitySettings is required and cannot be null.")); + } else { + sensitivitySettings.validate(); + } + final String apiVersion = "2023-02-15-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateSensitivitySettings(this.client.getEndpoint(), apiVersion, sensitivitySettings, accept, + context); + } + + /** + * Updates data sensitivity settings for sensitive data discovery. + * + * @param sensitivitySettings The data sensitivity settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + updateSensitivitySettingsAsync(UpdateSensitivitySettingsRequest sensitivitySettings) { + return updateSensitivitySettingsWithResponseAsync(sensitivitySettings) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates data sensitivity settings for sensitive data discovery. + * + * @param sensitivitySettings The data sensitivity settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + updateSensitivitySettingsWithResponse(UpdateSensitivitySettingsRequest sensitivitySettings, Context context) { + return updateSensitivitySettingsWithResponseAsync(sensitivitySettings, context).block(); + } + + /** + * Updates data sensitivity settings for sensitive data discovery. + * + * @param sensitivitySettings The data sensitivity settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GetSensitivitySettingsResponseInner + updateSensitivitySettings(UpdateSensitivitySettingsRequest sensitivitySettings) { + return updateSensitivitySettingsWithResponse(sensitivitySettings, Context.NONE).getValue(); + } + + /** + * Gets data sensitivity settings for sensitive data discovery. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSensitivitySettingsWithResponseAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2023-02-15-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getSensitivitySettings(this.client.getEndpoint(), apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets data sensitivity settings for sensitive data discovery. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getSensitivitySettingsWithResponseAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2023-02-15-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getSensitivitySettings(this.client.getEndpoint(), apiVersion, accept, context); + } + + /** + * Gets data sensitivity settings for sensitive data discovery. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSensitivitySettingsAsync() { + return getSensitivitySettingsWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets data sensitivity settings for sensitive data discovery. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSensitivitySettingsWithResponse(Context context) { + return getSensitivitySettingsWithResponseAsync(context).block(); + } + + /** + * Gets data sensitivity settings for sensitive data discovery. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data sensitivity settings for sensitive data discovery. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GetSensitivitySettingsResponseInner getSensitivitySettings() { + return getSensitivitySettingsWithResponse(Context.NONE).getValue(); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersImpl.java new file mode 100644 index 000000000000..ed462c3f41d3 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ResourceProvidersImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner; +import com.azure.resourcemanager.security.models.GetSensitivitySettingsResponse; +import com.azure.resourcemanager.security.models.ResourceProviders; +import com.azure.resourcemanager.security.models.UpdateSensitivitySettingsRequest; + +public final class ResourceProvidersImpl implements ResourceProviders { + private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); + + private final ResourceProvidersClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public ResourceProvidersImpl(ResourceProvidersClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response + updateSensitivitySettingsWithResponse(UpdateSensitivitySettingsRequest sensitivitySettings, Context context) { + Response inner + = this.serviceClient().updateSensitivitySettingsWithResponse(sensitivitySettings, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GetSensitivitySettingsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GetSensitivitySettingsResponse + updateSensitivitySettings(UpdateSensitivitySettingsRequest sensitivitySettings) { + GetSensitivitySettingsResponseInner inner = this.serviceClient().updateSensitivitySettings(sensitivitySettings); + if (inner != null) { + return new GetSensitivitySettingsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSensitivitySettingsWithResponse(Context context) { + Response inner + = this.serviceClient().getSensitivitySettingsWithResponse(context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GetSensitivitySettingsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GetSensitivitySettingsResponse getSensitivitySettings() { + GetSensitivitySettingsResponseInner inner = this.serviceClient().getSensitivitySettings(); + if (inner != null) { + return new GetSensitivitySettingsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private ResourceProvidersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RuleResultsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RuleResultsImpl.java index 82aeae996a3c..efb8a0eab819 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RuleResultsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RuleResultsImpl.java @@ -58,22 +58,14 @@ public RuleResultsImpl withExistingResourceId(String resourceId) { } public RuleResults create() { - this.innerObject = - serviceManager - .serviceClient() - .getSqlVulnerabilityAssessmentBaselineRules() - .createOrUpdateWithResponse(ruleId, createWorkspaceId, resourceId, createBody, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSqlVulnerabilityAssessmentBaselineRules() + .createOrUpdateWithResponse(ruleId, createWorkspaceId, resourceId, createBody, Context.NONE).getValue(); return this; } public RuleResults create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSqlVulnerabilityAssessmentBaselineRules() - .createOrUpdateWithResponse(ruleId, createWorkspaceId, resourceId, createBody, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSqlVulnerabilityAssessmentBaselineRules() + .createOrUpdateWithResponse(ruleId, createWorkspaceId, resourceId, createBody, context).getValue(); return this; } @@ -92,40 +84,26 @@ public RuleResultsImpl update() { } public RuleResults apply() { - this.innerObject = - serviceManager - .serviceClient() - .getSqlVulnerabilityAssessmentBaselineRules() - .createOrUpdateWithResponse(ruleId, updateWorkspaceId, resourceId, updateBody, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSqlVulnerabilityAssessmentBaselineRules() + .createOrUpdateWithResponse(ruleId, updateWorkspaceId, resourceId, updateBody, Context.NONE).getValue(); return this; } public RuleResults apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSqlVulnerabilityAssessmentBaselineRules() - .createOrUpdateWithResponse(ruleId, updateWorkspaceId, resourceId, updateBody, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSqlVulnerabilityAssessmentBaselineRules() + .createOrUpdateWithResponse(ruleId, updateWorkspaceId, resourceId, updateBody, context).getValue(); return this; } RuleResultsImpl(RuleResultsInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.ruleId = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", - "ruleId"); - this.resourceId = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", - "resourceId"); + this.ruleId = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + "ruleId"); + this.resourceId = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", + "resourceId"); } public RuleResultsImpl withLatestScan(Boolean latestScan) { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RulesResultsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RulesResultsImpl.java index d048424ac5cb..6daf8a684865 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RulesResultsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/RulesResultsImpl.java @@ -25,12 +25,8 @@ public final class RulesResultsImpl implements RulesResults { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new RuleResultsImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new RuleResultsImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScanResultsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScanResultsImpl.java index 0380f7db5b05..b6497100bdfd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScanResultsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScanResultsImpl.java @@ -25,12 +25,8 @@ public final class ScanResultsImpl implements ScanResults { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ScanResultImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new ScanResultImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScansImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScansImpl.java index 0b79bb6484c4..8c61fe7739ea 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScansImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ScansImpl.java @@ -25,9 +25,8 @@ public final class ScansImpl implements Scans { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new ScanImpl(inner1, this.manager())).collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new ScanImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionItemImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionItemImpl.java index 0e0464933445..95cbe7eda848 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionItemImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionItemImpl.java @@ -16,8 +16,7 @@ public final class SecureScoreControlDefinitionItemImpl implements SecureScoreCo private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecureScoreControlDefinitionItemImpl( - SecureScoreControlDefinitionItemInner innerObject, + SecureScoreControlDefinitionItemImpl(SecureScoreControlDefinitionItemInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsClientImpl.java index 8ed2fc1ff10f..162e49e2dd06 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsClientImpl.java @@ -30,26 +30,28 @@ import com.azure.resourcemanager.security.models.SecureScoreControlDefinitionList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecureScoreControlDefinitionsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecureScoreControlDefinitionsClient. + */ public final class SecureScoreControlDefinitionsClientImpl implements SecureScoreControlDefinitionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecureScoreControlDefinitionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecureScoreControlDefinitionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecureScoreControlDefinitionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - SecureScoreControlDefinitionsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(SecureScoreControlDefinitionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,117 +62,87 @@ public final class SecureScoreControlDefinitionsClientImpl implements SecureScor @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecure") public interface SecureScoreControlDefinitionsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Security/secureScoreControlDefinitions") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScoreControlDefinitions") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscription( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> listBySubscription(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the available security controls, their assessments, and the max score. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the available security controls, their assessments, and the max score. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security controls definition as paginated response with {@link PagedFlux}. @@ -182,7 +154,7 @@ private PagedFlux listAsync() { /** * List the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -191,13 +163,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List the available security controls, their assessments, and the max score. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security controls definition as paginated response with {@link PagedIterable}. @@ -209,7 +181,7 @@ public PagedIterable list() { /** * List the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -223,103 +195,78 @@ public PagedIterable list(Context context /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listBySubscription( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listBySubscription(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionSinglePageAsync( - Context context) { + private Mono> + listBySubscriptionSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .listBySubscription(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security controls definition as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySubscriptionAsync() { - return new PagedFlux<>( - () -> listBySubscriptionSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -328,14 +275,13 @@ private PagedFlux listBySubscriptionAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySubscriptionAsync(Context context) { - return new PagedFlux<>( - () -> listBySubscriptionSinglePageAsync(context), + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security controls definition as paginated response with {@link PagedIterable}. @@ -347,7 +293,7 @@ public PagedIterable listBySubscription() /** * For a specified subscription, list the available security controls, their assessments, and the max score. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -361,14 +307,15 @@ public PagedIterable listBySubscription(C /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -376,140 +323,104 @@ private Mono> listNextSingl return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink) { + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security controls definition along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security controls definition along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsImpl.java index 6e0346a7e536..5423f04374f9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDefinitionsImpl.java @@ -19,8 +19,7 @@ public final class SecureScoreControlDefinitionsImpl implements SecureScoreContr private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecureScoreControlDefinitionsImpl( - SecureScoreControlDefinitionsClient innerClient, + public SecureScoreControlDefinitionsImpl(SecureScoreControlDefinitionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,22 +27,26 @@ public SecureScoreControlDefinitionsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); } public PagedIterable listBySubscription() { PagedIterable inner = this.serviceClient().listBySubscription(); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); } public PagedIterable listBySubscription(Context context) { PagedIterable inner = this.serviceClient().listBySubscription(context); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new SecureScoreControlDefinitionItemImpl(inner1, this.manager())); } private SecureScoreControlDefinitionsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDetailsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDetailsImpl.java index 98ebfdf2afba..c9717c67992a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDetailsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlDetailsImpl.java @@ -14,8 +14,8 @@ public final class SecureScoreControlDetailsImpl implements SecureScoreControlDe private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecureScoreControlDetailsImpl( - SecureScoreControlDetailsInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecureScoreControlDetailsImpl(SecureScoreControlDetailsInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlScoreDetailsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlScoreDetailsImpl.java index d3a1b368b1f6..5c32b8c68890 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlScoreDetailsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlScoreDetailsImpl.java @@ -14,8 +14,7 @@ public final class SecureScoreControlScoreDetailsImpl implements SecureScoreCont private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecureScoreControlScoreDetailsImpl( - SecureScoreControlScoreDetailsInner innerObject, + SecureScoreControlScoreDetailsImpl(SecureScoreControlScoreDetailsInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsClientImpl.java index 198a22b386af..d9047aab8625 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsClientImpl.java @@ -31,22 +31,28 @@ import com.azure.resourcemanager.security.models.SecureScoreControlList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecureScoreControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecureScoreControlsClient. + */ public final class SecureScoreControlsClientImpl implements SecureScoreControlsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecureScoreControlsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecureScoreControlsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecureScoreControlsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SecureScoreControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(SecureScoreControlsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,79 +63,61 @@ public final class SecureScoreControlsClientImpl implements SecureScoreControlsC @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecure") public interface SecureScoreControlsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}/secureScoreControls") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}/secureScoreControls") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySecureScore( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("secureScoreName") String secureScoreName, - @QueryParam("$expand") ExpandControlsEnum expand, - @HeaderParam("Accept") String accept, - Context context); + Mono> listBySecureScore(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("secureScoreName") String secureScoreName, @QueryParam("$expand") ExpandControlsEnum expand, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScoreControls") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$expand") ExpandControlsEnum expand, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$expand") ExpandControlsEnum expand, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySecureScoreNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param expand OData expand. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all security controls for a specific initiative within a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySecureScoreSinglePageAsync( - String secureScoreName, ExpandControlsEnum expand) { + private Mono> listBySecureScoreSinglePageAsync(String secureScoreName, + ExpandControlsEnum expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (secureScoreName == null) { return Mono @@ -138,56 +126,36 @@ private Mono> listBySecureScoreSin final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listBySecureScore( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - secureScoreName, - expand, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listBySecureScore(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), secureScoreName, expand, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all security controls for a specific initiative within a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySecureScoreSinglePageAsync( - String secureScoreName, ExpandControlsEnum expand, Context context) { + private Mono> listBySecureScoreSinglePageAsync(String secureScoreName, + ExpandControlsEnum expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (secureScoreName == null) { return Mono @@ -197,95 +165,79 @@ private Mono> listBySecureScoreSin final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listBySecureScore( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - secureScoreName, - expand, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listBySecureScore(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), secureScoreName, + expand, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param expand OData expand. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls for a specific initiative within a scope as paginated response with {@link - * PagedFlux}. + * @return all security controls for a specific initiative within a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySecureScoreAsync( - String secureScoreName, ExpandControlsEnum expand) { - return new PagedFlux<>( - () -> listBySecureScoreSinglePageAsync(secureScoreName, expand), + private PagedFlux listBySecureScoreAsync(String secureScoreName, + ExpandControlsEnum expand) { + return new PagedFlux<>(() -> listBySecureScoreSinglePageAsync(secureScoreName, expand), nextLink -> listBySecureScoreNextSinglePageAsync(nextLink)); } /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls for a specific initiative within a scope as paginated response with {@link - * PagedFlux}. + * @return all security controls for a specific initiative within a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySecureScoreAsync(String secureScoreName) { final ExpandControlsEnum expand = null; - return new PagedFlux<>( - () -> listBySecureScoreSinglePageAsync(secureScoreName, expand), + return new PagedFlux<>(() -> listBySecureScoreSinglePageAsync(secureScoreName, expand), nextLink -> listBySecureScoreNextSinglePageAsync(nextLink)); } /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls for a specific initiative within a scope as paginated response with {@link - * PagedFlux}. + * @return all security controls for a specific initiative within a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySecureScoreAsync( - String secureScoreName, ExpandControlsEnum expand, Context context) { - return new PagedFlux<>( - () -> listBySecureScoreSinglePageAsync(secureScoreName, expand, context), + private PagedFlux listBySecureScoreAsync(String secureScoreName, + ExpandControlsEnum expand, Context context) { + return new PagedFlux<>(() -> listBySecureScoreSinglePageAsync(secureScoreName, expand, context), nextLink -> listBySecureScoreNextSinglePageAsync(nextLink, context)); } /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls for a specific initiative within a scope as paginated response with {@link - * PagedIterable}. + * @return all security controls for a specific initiative within a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySecureScore(String secureScoreName) { @@ -295,117 +247,87 @@ public PagedIterable listBySecureScore(String se /** * Get all security controls for a specific initiative within a scope. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls for a specific initiative within a scope as paginated response with {@link - * PagedIterable}. + * @return all security controls for a specific initiative within a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySecureScore( - String secureScoreName, ExpandControlsEnum expand, Context context) { + public PagedIterable listBySecureScore(String secureScoreName, + ExpandControlsEnum expand, Context context) { return new PagedIterable<>(listBySecureScoreAsync(secureScoreName, expand, context)); } /** * Get all security controls within a scope. - * + * * @param expand OData expand. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls within a scope along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return all security controls within a scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(ExpandControlsEnum expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - expand, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + expand, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all security controls within a scope. - * + * * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all security controls within a scope along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return all security controls within a scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - ExpandControlsEnum expand, Context context) { + private Mono> listSinglePageAsync(ExpandControlsEnum expand, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), expand, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get all security controls within a scope. - * + * * @param expand OData expand. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -419,7 +341,7 @@ private PagedFlux listAsync(ExpandControlsEnum e /** * Get all security controls within a scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all security controls within a scope as paginated response with {@link PagedFlux}. @@ -432,7 +354,7 @@ private PagedFlux listAsync() { /** * Get all security controls within a scope. - * + * * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -442,13 +364,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(ExpandControlsEnum expand, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(expand, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(expand, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get all security controls within a scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all security controls within a scope as paginated response with {@link PagedIterable}. @@ -461,7 +383,7 @@ public PagedIterable list() { /** * Get all security controls within a scope. - * + * * @param expand OData expand. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -476,9 +398,10 @@ public PagedIterable list(ExpandControlsEnum exp /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -490,31 +413,23 @@ private Mono> listBySecureScoreNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBySecureScoreNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -522,37 +437,28 @@ private Mono> listBySecureScoreNex * @return list of security controls along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySecureScoreNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySecureScoreNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySecureScoreNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySecureScoreNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -564,31 +470,22 @@ private Mono> listNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -596,29 +493,19 @@ private Mono> listNextSinglePageAs * @return list of security controls along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsImpl.java index ddce15948c30..8c10b8f58ec8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreControlsImpl.java @@ -20,32 +20,32 @@ public final class SecureScoreControlsImpl implements SecureScoreControls { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecureScoreControlsImpl( - SecureScoreControlsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SecureScoreControlsImpl(SecureScoreControlsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listBySecureScore(String secureScoreName) { PagedIterable inner = this.serviceClient().listBySecureScore(secureScoreName); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); } - public PagedIterable listBySecureScore( - String secureScoreName, ExpandControlsEnum expand, Context context) { - PagedIterable inner = - this.serviceClient().listBySecureScore(secureScoreName, expand, context); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); + public PagedIterable listBySecureScore(String secureScoreName, ExpandControlsEnum expand, + Context context) { + PagedIterable inner + = this.serviceClient().listBySecureScore(secureScoreName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); } public PagedIterable list(ExpandControlsEnum expand, Context context) { PagedIterable inner = this.serviceClient().list(expand, context); - return Utils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecureScoreControlDetailsImpl(inner1, this.manager())); } private SecureScoreControlsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreItemImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreItemImpl.java index b7b5a90f0ae9..fc83a1473b34 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreItemImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoreItemImpl.java @@ -12,8 +12,8 @@ public final class SecureScoreItemImpl implements SecureScoreItem { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecureScoreItemImpl( - SecureScoreItemInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecureScoreItemImpl(SecureScoreItemInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresClientImpl.java index 91d2496b7feb..668ebc1899f5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresClientImpl.java @@ -30,69 +30,66 @@ import com.azure.resourcemanager.security.models.SecureScoresList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecureScoresClient. */ +/** + * An instance of this class provides access to all the operations defined in SecureScoresClient. + */ public final class SecureScoresClientImpl implements SecureScoresClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecureScoresService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecureScoresClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecureScoresClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SecureScoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SecureScoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterSecureScores to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for SecurityCenterSecureScores to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecure") public interface SecureScoresService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("secureScoreName") String secureScoreName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("secureScoreName") String secureScoreName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of secure scores along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -100,39 +97,26 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -142,36 +126,24 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of secure scores as paginated response with {@link PagedFlux}. @@ -183,7 +155,7 @@ private PagedFlux listAsync() { /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -192,13 +164,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of secure scores as paginated response with {@link PagedIterable}. @@ -210,7 +182,7 @@ public PagedIterable list() { /** * List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -225,28 +197,24 @@ public PagedIterable list(Context context) { /** * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC * Default initiative, use 'ascScore'. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return secure score for a specific Microsoft Defender for Cloud initiative within your current scope along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String secureScoreName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (secureScoreName == null) { return Mono @@ -255,45 +223,33 @@ private Mono> getWithResponseAsync(String secureS final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - secureScoreName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + secureScoreName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC * Default initiative, use 'ascScore'. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return secure score for a specific Microsoft Defender for Cloud initiative within your current scope along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String secureScoreName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (secureScoreName == null) { return Mono @@ -302,27 +258,21 @@ private Mono> getWithResponseAsync(String secureS final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - secureScoreName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), secureScoreName, + accept, context); } /** * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC * Default initiative, use 'ascScore'. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return secure score for a specific Microsoft Defender for Cloud initiative within your current scope on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String secureScoreName) { @@ -332,15 +282,15 @@ private Mono getAsync(String secureScoreName) { /** * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC * Default initiative, use 'ascScore'. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return secure score for a specific Microsoft Defender for Cloud initiative within your current scope along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String secureScoreName, Context context) { @@ -350,9 +300,9 @@ public Response getWithResponse(String secureScoreName, Co /** * Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC * Default initiative, use 'ascScore'. - * + * * @param secureScoreName The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample - * request below. + * request below. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -365,9 +315,10 @@ public SecureScoreItemInner get(String secureScoreName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -379,31 +330,22 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -416,23 +358,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresImpl.java index 2f6dbe759c03..4f0ab3083a89 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecureScoresImpl.java @@ -21,29 +21,26 @@ public final class SecureScoresImpl implements SecureScores { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecureScoresImpl( - SecureScoresClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SecureScoresImpl(SecureScoresClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecureScoreItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecureScoreItemImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SecureScoreItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecureScoreItemImpl(inner1, this.manager())); } public Response getWithResponse(String secureScoreName, Context context) { Response inner = this.serviceClient().getWithResponse(secureScoreName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecureScoreItemImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentMetadataResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentMetadataResponseImpl.java index 7455b39d5a29..7dfffc78186b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentMetadataResponseImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentMetadataResponseImpl.java @@ -26,8 +26,7 @@ public final class SecurityAssessmentMetadataResponseImpl private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecurityAssessmentMetadataResponseImpl( - SecurityAssessmentMetadataResponseInner innerObject, + SecurityAssessmentMetadataResponseImpl(SecurityAssessmentMetadataResponseInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -140,54 +139,38 @@ private com.azure.resourcemanager.security.SecurityManager manager() { private String assessmentMetadataName; public SecurityAssessmentMetadataResponse create() { - this.innerObject = - serviceManager - .serviceClient() - .getAssessmentsMetadatas() - .createInSubscriptionWithResponse(assessmentMetadataName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessmentsMetadatas() + .createInSubscriptionWithResponse(assessmentMetadataName, this.innerModel(), Context.NONE).getValue(); return this; } public SecurityAssessmentMetadataResponse create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAssessmentsMetadatas() - .createInSubscriptionWithResponse(assessmentMetadataName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessmentsMetadatas() + .createInSubscriptionWithResponse(assessmentMetadataName, this.innerModel(), context).getValue(); return this; } - SecurityAssessmentMetadataResponseImpl( - String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecurityAssessmentMetadataResponseImpl(String name, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = new SecurityAssessmentMetadataResponseInner(); this.serviceManager = serviceManager; this.assessmentMetadataName = name; } public SecurityAssessmentMetadataResponse refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAssessmentsMetadatas() - .getInSubscriptionWithResponse(assessmentMetadataName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessmentsMetadatas() + .getInSubscriptionWithResponse(assessmentMetadataName, Context.NONE).getValue(); return this; } public SecurityAssessmentMetadataResponse refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAssessmentsMetadatas() - .getInSubscriptionWithResponse(assessmentMetadataName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessmentsMetadatas() + .getInSubscriptionWithResponse(assessmentMetadataName, context).getValue(); return this; } - public SecurityAssessmentMetadataResponseImpl withPublishDates( - SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates) { + public SecurityAssessmentMetadataResponseImpl + withPublishDates(SecurityAssessmentMetadataPropertiesResponsePublishDates publishDates) { this.innerModel().withPublishDates(publishDates); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentResponseImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentResponseImpl.java index b589cb09daae..4be437fd92c3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentResponseImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityAssessmentResponseImpl.java @@ -91,22 +91,14 @@ public SecurityAssessmentResponseImpl withExistingResourceId(String resourceId) } public SecurityAssessmentResponse create() { - this.innerObject = - serviceManager - .serviceClient() - .getAssessments() - .createOrUpdateWithResponse(resourceId, assessmentName, createAssessment, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessments() + .createOrUpdateWithResponse(resourceId, assessmentName, createAssessment, Context.NONE).getValue(); return this; } public SecurityAssessmentResponse create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAssessments() - .createOrUpdateWithResponse(resourceId, assessmentName, createAssessment, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessments() + .createOrUpdateWithResponse(resourceId, assessmentName, createAssessment, context).getValue(); return this; } @@ -123,63 +115,38 @@ public SecurityAssessmentResponseImpl update() { } public SecurityAssessmentResponse apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAssessments() - .createOrUpdateWithResponse(resourceId, assessmentName, updateAssessment, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessments() + .createOrUpdateWithResponse(resourceId, assessmentName, updateAssessment, Context.NONE).getValue(); return this; } public SecurityAssessmentResponse apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAssessments() - .createOrUpdateWithResponse(resourceId, assessmentName, updateAssessment, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessments() + .createOrUpdateWithResponse(resourceId, assessmentName, updateAssessment, context).getValue(); return this; } - SecurityAssessmentResponseImpl( - SecurityAssessmentResponseInner innerObject, + SecurityAssessmentResponseImpl(SecurityAssessmentResponseInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceId = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", - "resourceId"); - this.assessmentName = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", - "assessmentName"); + this.resourceId = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "resourceId"); + this.assessmentName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", "assessmentName"); } public SecurityAssessmentResponse refresh() { ExpandEnum localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getAssessments() - .getWithResponse(resourceId, assessmentName, localExpand, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessments() + .getWithResponse(resourceId, assessmentName, localExpand, Context.NONE).getValue(); return this; } public SecurityAssessmentResponse refresh(Context context) { ExpandEnum localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getAssessments() - .getWithResponse(resourceId, assessmentName, localExpand, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAssessments() + .getWithResponse(resourceId, assessmentName, localExpand, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterBuilder.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterBuilder.java index ff42af6d88d6..ab8c0a8b8fde 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterBuilder.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the SecurityCenterImpl type. */ -@ServiceClientBuilder(serviceClients = {SecurityCenterImpl.class}) +/** + * A builder for creating a new instance of the SecurityCenterImpl type. + */ +@ServiceClientBuilder(serviceClients = { SecurityCenterImpl.class }) public final class SecurityCenterBuilder { /* * Azure subscription ID @@ -24,7 +26,7 @@ public final class SecurityCenterBuilder { /** * Sets Azure subscription ID. - * + * * @param subscriptionId the subscriptionId value. * @return the SecurityCenterBuilder. */ @@ -40,7 +42,7 @@ public SecurityCenterBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the SecurityCenterBuilder. */ @@ -56,7 +58,7 @@ public SecurityCenterBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the SecurityCenterBuilder. */ @@ -72,7 +74,7 @@ public SecurityCenterBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the SecurityCenterBuilder. */ @@ -88,7 +90,7 @@ public SecurityCenterBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the SecurityCenterBuilder. */ @@ -104,7 +106,7 @@ public SecurityCenterBuilder defaultPollInterval(Duration defaultPollInterval) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the SecurityCenterBuilder. */ @@ -115,30 +117,20 @@ public SecurityCenterBuilder serializerAdapter(SerializerAdapter serializerAdapt /** * Builds an instance of SecurityCenterImpl with the provided parameters. - * + * * @return an instance of SecurityCenterImpl. */ public SecurityCenterImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - SecurityCenterImpl client = - new SecurityCenterImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + SecurityCenterImpl client = new SecurityCenterImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java index 2f43f2f9a553..a8fd13d16565 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java @@ -28,8 +28,6 @@ import com.azure.resourcemanager.security.fluent.AlertsClient; import com.azure.resourcemanager.security.fluent.AlertsSuppressionRulesClient; import com.azure.resourcemanager.security.fluent.AllowedConnectionsClient; -import com.azure.resourcemanager.security.fluent.ApiCollectionOffboardingsClient; -import com.azure.resourcemanager.security.fluent.ApiCollectionOnboardingsClient; import com.azure.resourcemanager.security.fluent.ApiCollectionsClient; import com.azure.resourcemanager.security.fluent.ApplicationOperationsClient; import com.azure.resourcemanager.security.fluent.ApplicationsClient; @@ -37,20 +35,29 @@ import com.azure.resourcemanager.security.fluent.AssessmentsMetadatasClient; import com.azure.resourcemanager.security.fluent.AutoProvisioningSettingsClient; import com.azure.resourcemanager.security.fluent.AutomationsClient; +import com.azure.resourcemanager.security.fluent.AzureDevOpsOrgsClient; +import com.azure.resourcemanager.security.fluent.AzureDevOpsProjectsClient; +import com.azure.resourcemanager.security.fluent.AzureDevOpsReposClient; import com.azure.resourcemanager.security.fluent.ComplianceResultsClient; import com.azure.resourcemanager.security.fluent.CompliancesClient; import com.azure.resourcemanager.security.fluent.ConnectorsClient; import com.azure.resourcemanager.security.fluent.CustomAssessmentAutomationsClient; import com.azure.resourcemanager.security.fluent.CustomEntityStoreAssignmentsClient; +import com.azure.resourcemanager.security.fluent.DefenderForStoragesClient; +import com.azure.resourcemanager.security.fluent.DevOpsConfigurationsClient; +import com.azure.resourcemanager.security.fluent.DevOpsOperationResultsClient; import com.azure.resourcemanager.security.fluent.DeviceSecurityGroupsClient; import com.azure.resourcemanager.security.fluent.DiscoveredSecuritySolutionsClient; import com.azure.resourcemanager.security.fluent.ExternalSecuritySolutionsClient; +import com.azure.resourcemanager.security.fluent.GitHubOwnersClient; +import com.azure.resourcemanager.security.fluent.GitHubReposClient; +import com.azure.resourcemanager.security.fluent.GitLabGroupsClient; +import com.azure.resourcemanager.security.fluent.GitLabProjectsClient; +import com.azure.resourcemanager.security.fluent.GitLabSubgroupsClient; import com.azure.resourcemanager.security.fluent.GovernanceAssignmentsClient; import com.azure.resourcemanager.security.fluent.GovernanceRulesClient; -import com.azure.resourcemanager.security.fluent.HealthReportOperationsClient; import com.azure.resourcemanager.security.fluent.HealthReportsClient; import com.azure.resourcemanager.security.fluent.InformationProtectionPoliciesClient; -import com.azure.resourcemanager.security.fluent.IngestionSettingsClient; import com.azure.resourcemanager.security.fluent.IotSecuritySolutionAnalyticsClient; import com.azure.resourcemanager.security.fluent.IotSecuritySolutionsAnalyticsAggregatedAlertsClient; import com.azure.resourcemanager.security.fluent.IotSecuritySolutionsAnalyticsRecommendationsClient; @@ -63,6 +70,7 @@ import com.azure.resourcemanager.security.fluent.RegulatoryComplianceAssessmentsClient; import com.azure.resourcemanager.security.fluent.RegulatoryComplianceControlsClient; import com.azure.resourcemanager.security.fluent.RegulatoryComplianceStandardsClient; +import com.azure.resourcemanager.security.fluent.ResourceProvidersClient; import com.azure.resourcemanager.security.fluent.SecureScoreControlDefinitionsClient; import com.azure.resourcemanager.security.fluent.SecureScoreControlsClient; import com.azure.resourcemanager.security.fluent.SecureScoresClient; @@ -74,7 +82,9 @@ import com.azure.resourcemanager.security.fluent.SecurityOperatorsClient; import com.azure.resourcemanager.security.fluent.SecuritySolutionsClient; import com.azure.resourcemanager.security.fluent.SecuritySolutionsReferenceDatasClient; +import com.azure.resourcemanager.security.fluent.SensitivitySettingsClient; import com.azure.resourcemanager.security.fluent.ServerVulnerabilityAssessmentsClient; +import com.azure.resourcemanager.security.fluent.ServerVulnerabilityAssessmentsSettingsClient; import com.azure.resourcemanager.security.fluent.SettingsClient; import com.azure.resourcemanager.security.fluent.SoftwareInventoriesClient; import com.azure.resourcemanager.security.fluent.SqlVulnerabilityAssessmentBaselineRulesClient; @@ -93,804 +103,1078 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the SecurityCenterImpl type. */ +/** + * Initializes a new instance of the SecurityCenterImpl type. + */ @ServiceClient(builder = SecurityCenterBuilder.class) public final class SecurityCenterImpl implements SecurityCenter { - /** Azure subscription ID. */ + /** + * Azure subscription ID. + */ private final String subscriptionId; /** * Gets Azure subscription ID. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The MdeOnboardingsClient object to access its operations. */ - private final MdeOnboardingsClient mdeOnboardings; - - /** - * Gets the MdeOnboardingsClient object to access its operations. - * - * @return the MdeOnboardingsClient object. - */ - public MdeOnboardingsClient getMdeOnboardings() { - return this.mdeOnboardings; - } - - /** The CustomAssessmentAutomationsClient object to access its operations. */ - private final CustomAssessmentAutomationsClient customAssessmentAutomations; - - /** - * Gets the CustomAssessmentAutomationsClient object to access its operations. - * - * @return the CustomAssessmentAutomationsClient object. - */ - public CustomAssessmentAutomationsClient getCustomAssessmentAutomations() { - return this.customAssessmentAutomations; - } - - /** The CustomEntityStoreAssignmentsClient object to access its operations. */ - private final CustomEntityStoreAssignmentsClient customEntityStoreAssignments; - - /** - * Gets the CustomEntityStoreAssignmentsClient object to access its operations. - * - * @return the CustomEntityStoreAssignmentsClient object. - */ - public CustomEntityStoreAssignmentsClient getCustomEntityStoreAssignments() { - return this.customEntityStoreAssignments; - } - - /** The ComplianceResultsClient object to access its operations. */ - private final ComplianceResultsClient complianceResults; - - /** - * Gets the ComplianceResultsClient object to access its operations. - * - * @return the ComplianceResultsClient object. - */ - public ComplianceResultsClient getComplianceResults() { - return this.complianceResults; - } - - /** The PricingsClient object to access its operations. */ - private final PricingsClient pricings; - - /** - * Gets the PricingsClient object to access its operations. - * - * @return the PricingsClient object. - */ - public PricingsClient getPricings() { - return this.pricings; - } - - /** The AdvancedThreatProtectionsClient object to access its operations. */ - private final AdvancedThreatProtectionsClient advancedThreatProtections; - - /** - * Gets the AdvancedThreatProtectionsClient object to access its operations. - * - * @return the AdvancedThreatProtectionsClient object. - */ - public AdvancedThreatProtectionsClient getAdvancedThreatProtections() { - return this.advancedThreatProtections; - } - - /** The DeviceSecurityGroupsClient object to access its operations. */ - private final DeviceSecurityGroupsClient deviceSecurityGroups; - - /** - * Gets the DeviceSecurityGroupsClient object to access its operations. - * - * @return the DeviceSecurityGroupsClient object. - */ - public DeviceSecurityGroupsClient getDeviceSecurityGroups() { - return this.deviceSecurityGroups; - } - - /** The IotSecuritySolutionsClient object to access its operations. */ - private final IotSecuritySolutionsClient iotSecuritySolutions; - - /** - * Gets the IotSecuritySolutionsClient object to access its operations. - * - * @return the IotSecuritySolutionsClient object. - */ - public IotSecuritySolutionsClient getIotSecuritySolutions() { - return this.iotSecuritySolutions; - } - - /** The IotSecuritySolutionAnalyticsClient object to access its operations. */ - private final IotSecuritySolutionAnalyticsClient iotSecuritySolutionAnalytics; - - /** - * Gets the IotSecuritySolutionAnalyticsClient object to access its operations. - * - * @return the IotSecuritySolutionAnalyticsClient object. - */ - public IotSecuritySolutionAnalyticsClient getIotSecuritySolutionAnalytics() { - return this.iotSecuritySolutionAnalytics; - } - - /** The IotSecuritySolutionsAnalyticsAggregatedAlertsClient object to access its operations. */ - private final IotSecuritySolutionsAnalyticsAggregatedAlertsClient iotSecuritySolutionsAnalyticsAggregatedAlerts; - - /** - * Gets the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object to access its operations. - * - * @return the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object. - */ - public IotSecuritySolutionsAnalyticsAggregatedAlertsClient getIotSecuritySolutionsAnalyticsAggregatedAlerts() { - return this.iotSecuritySolutionsAnalyticsAggregatedAlerts; - } - - /** The IotSecuritySolutionsAnalyticsRecommendationsClient object to access its operations. */ - private final IotSecuritySolutionsAnalyticsRecommendationsClient iotSecuritySolutionsAnalyticsRecommendations; - /** - * Gets the IotSecuritySolutionsAnalyticsRecommendationsClient object to access its operations. - * - * @return the IotSecuritySolutionsAnalyticsRecommendationsClient object. + * The LocationsClient object to access its operations. */ - public IotSecuritySolutionsAnalyticsRecommendationsClient getIotSecuritySolutionsAnalyticsRecommendations() { - return this.iotSecuritySolutionsAnalyticsRecommendations; - } - - /** The LocationsClient object to access its operations. */ private final LocationsClient locations; /** * Gets the LocationsClient object to access its operations. - * + * * @return the LocationsClient object. */ public LocationsClient getLocations() { return this.locations; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The TasksClient object to access its operations. */ + /** + * The TasksClient object to access its operations. + */ private final TasksClient tasks; /** * Gets the TasksClient object to access its operations. - * + * * @return the TasksClient object. */ public TasksClient getTasks() { return this.tasks; } - /** The AutoProvisioningSettingsClient object to access its operations. */ + /** + * The AutoProvisioningSettingsClient object to access its operations. + */ private final AutoProvisioningSettingsClient autoProvisioningSettings; /** * Gets the AutoProvisioningSettingsClient object to access its operations. - * + * * @return the AutoProvisioningSettingsClient object. */ public AutoProvisioningSettingsClient getAutoProvisioningSettings() { return this.autoProvisioningSettings; } - /** The CompliancesClient object to access its operations. */ + /** + * The CompliancesClient object to access its operations. + */ private final CompliancesClient compliances; /** * Gets the CompliancesClient object to access its operations. - * + * * @return the CompliancesClient object. */ public CompliancesClient getCompliances() { return this.compliances; } - /** The InformationProtectionPoliciesClient object to access its operations. */ + /** + * The InformationProtectionPoliciesClient object to access its operations. + */ private final InformationProtectionPoliciesClient informationProtectionPolicies; /** * Gets the InformationProtectionPoliciesClient object to access its operations. - * + * * @return the InformationProtectionPoliciesClient object. */ public InformationProtectionPoliciesClient getInformationProtectionPolicies() { return this.informationProtectionPolicies; } - /** The SecurityContactsClient object to access its operations. */ - private final SecurityContactsClient securityContacts; - /** - * Gets the SecurityContactsClient object to access its operations. - * - * @return the SecurityContactsClient object. + * The WorkspaceSettingsClient object to access its operations. */ - public SecurityContactsClient getSecurityContacts() { - return this.securityContacts; - } - - /** The WorkspaceSettingsClient object to access its operations. */ private final WorkspaceSettingsClient workspaceSettings; /** * Gets the WorkspaceSettingsClient object to access its operations. - * + * * @return the WorkspaceSettingsClient object. */ public WorkspaceSettingsClient getWorkspaceSettings() { return this.workspaceSettings; } - /** The RegulatoryComplianceStandardsClient object to access its operations. */ + /** + * The AlertsSuppressionRulesClient object to access its operations. + */ + private final AlertsSuppressionRulesClient alertsSuppressionRules; + + /** + * Gets the AlertsSuppressionRulesClient object to access its operations. + * + * @return the AlertsSuppressionRulesClient object. + */ + public AlertsSuppressionRulesClient getAlertsSuppressionRules() { + return this.alertsSuppressionRules; + } + + /** + * The AutomationsClient object to access its operations. + */ + private final AutomationsClient automations; + + /** + * Gets the AutomationsClient object to access its operations. + * + * @return the AutomationsClient object. + */ + public AutomationsClient getAutomations() { + return this.automations; + } + + /** + * The RegulatoryComplianceStandardsClient object to access its operations. + */ private final RegulatoryComplianceStandardsClient regulatoryComplianceStandards; /** * Gets the RegulatoryComplianceStandardsClient object to access its operations. - * + * * @return the RegulatoryComplianceStandardsClient object. */ public RegulatoryComplianceStandardsClient getRegulatoryComplianceStandards() { return this.regulatoryComplianceStandards; } - /** The RegulatoryComplianceControlsClient object to access its operations. */ + /** + * The RegulatoryComplianceControlsClient object to access its operations. + */ private final RegulatoryComplianceControlsClient regulatoryComplianceControls; /** * Gets the RegulatoryComplianceControlsClient object to access its operations. - * + * * @return the RegulatoryComplianceControlsClient object. */ public RegulatoryComplianceControlsClient getRegulatoryComplianceControls() { return this.regulatoryComplianceControls; } - /** The RegulatoryComplianceAssessmentsClient object to access its operations. */ + /** + * The RegulatoryComplianceAssessmentsClient object to access its operations. + */ private final RegulatoryComplianceAssessmentsClient regulatoryComplianceAssessments; /** * Gets the RegulatoryComplianceAssessmentsClient object to access its operations. - * + * * @return the RegulatoryComplianceAssessmentsClient object. */ public RegulatoryComplianceAssessmentsClient getRegulatoryComplianceAssessments() { return this.regulatoryComplianceAssessments; } - /** The SubAssessmentsClient object to access its operations. */ + /** + * The SubAssessmentsClient object to access its operations. + */ private final SubAssessmentsClient subAssessments; /** * Gets the SubAssessmentsClient object to access its operations. - * + * * @return the SubAssessmentsClient object. */ public SubAssessmentsClient getSubAssessments() { return this.subAssessments; } - /** The AutomationsClient object to access its operations. */ - private final AutomationsClient automations; + /** + * The ConnectorsClient object to access its operations. + */ + private final ConnectorsClient connectors; /** - * Gets the AutomationsClient object to access its operations. - * - * @return the AutomationsClient object. + * Gets the ConnectorsClient object to access its operations. + * + * @return the ConnectorsClient object. */ - public AutomationsClient getAutomations() { - return this.automations; + public ConnectorsClient getConnectors() { + return this.connectors; } - /** The AlertsSuppressionRulesClient object to access its operations. */ - private final AlertsSuppressionRulesClient alertsSuppressionRules; + /** + * The SecurityContactsClient object to access its operations. + */ + private final SecurityContactsClient securityContacts; /** - * Gets the AlertsSuppressionRulesClient object to access its operations. - * - * @return the AlertsSuppressionRulesClient object. + * Gets the SecurityContactsClient object to access its operations. + * + * @return the SecurityContactsClient object. */ - public AlertsSuppressionRulesClient getAlertsSuppressionRules() { - return this.alertsSuppressionRules; + public SecurityContactsClient getSecurityContacts() { + return this.securityContacts; } - /** The ServerVulnerabilityAssessmentsClient object to access its operations. */ - private final ServerVulnerabilityAssessmentsClient serverVulnerabilityAssessments; + /** + * The SoftwareInventoriesClient object to access its operations. + */ + private final SoftwareInventoriesClient softwareInventories; /** - * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. - * - * @return the ServerVulnerabilityAssessmentsClient object. + * Gets the SoftwareInventoriesClient object to access its operations. + * + * @return the SoftwareInventoriesClient object. */ - public ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments() { - return this.serverVulnerabilityAssessments; + public SoftwareInventoriesClient getSoftwareInventories() { + return this.softwareInventories; } - /** The AssessmentsMetadatasClient object to access its operations. */ - private final AssessmentsMetadatasClient assessmentsMetadatas; + /** + * The CustomAssessmentAutomationsClient object to access its operations. + */ + private final CustomAssessmentAutomationsClient customAssessmentAutomations; /** - * Gets the AssessmentsMetadatasClient object to access its operations. - * - * @return the AssessmentsMetadatasClient object. + * Gets the CustomAssessmentAutomationsClient object to access its operations. + * + * @return the CustomAssessmentAutomationsClient object. */ - public AssessmentsMetadatasClient getAssessmentsMetadatas() { - return this.assessmentsMetadatas; + public CustomAssessmentAutomationsClient getCustomAssessmentAutomations() { + return this.customAssessmentAutomations; } - /** The AssessmentsClient object to access its operations. */ - private final AssessmentsClient assessments; + /** + * The CustomEntityStoreAssignmentsClient object to access its operations. + */ + private final CustomEntityStoreAssignmentsClient customEntityStoreAssignments; /** - * Gets the AssessmentsClient object to access its operations. - * - * @return the AssessmentsClient object. + * Gets the CustomEntityStoreAssignmentsClient object to access its operations. + * + * @return the CustomEntityStoreAssignmentsClient object. */ - public AssessmentsClient getAssessments() { - return this.assessments; + public CustomEntityStoreAssignmentsClient getCustomEntityStoreAssignments() { + return this.customEntityStoreAssignments; } - /** The AdaptiveApplicationControlsClient object to access its operations. */ - private final AdaptiveApplicationControlsClient adaptiveApplicationControls; + /** + * The MdeOnboardingsClient object to access its operations. + */ + private final MdeOnboardingsClient mdeOnboardings; /** - * Gets the AdaptiveApplicationControlsClient object to access its operations. - * - * @return the AdaptiveApplicationControlsClient object. + * Gets the MdeOnboardingsClient object to access its operations. + * + * @return the MdeOnboardingsClient object. */ - public AdaptiveApplicationControlsClient getAdaptiveApplicationControls() { - return this.adaptiveApplicationControls; + public MdeOnboardingsClient getMdeOnboardings() { + return this.mdeOnboardings; } - /** The AdaptiveNetworkHardeningsClient object to access its operations. */ - private final AdaptiveNetworkHardeningsClient adaptiveNetworkHardenings; + /** + * The GovernanceAssignmentsClient object to access its operations. + */ + private final GovernanceAssignmentsClient governanceAssignments; /** - * Gets the AdaptiveNetworkHardeningsClient object to access its operations. - * - * @return the AdaptiveNetworkHardeningsClient object. + * Gets the GovernanceAssignmentsClient object to access its operations. + * + * @return the GovernanceAssignmentsClient object. */ - public AdaptiveNetworkHardeningsClient getAdaptiveNetworkHardenings() { - return this.adaptiveNetworkHardenings; + public GovernanceAssignmentsClient getGovernanceAssignments() { + return this.governanceAssignments; } - /** The AllowedConnectionsClient object to access its operations. */ - private final AllowedConnectionsClient allowedConnections; - /** - * Gets the AllowedConnectionsClient object to access its operations. - * - * @return the AllowedConnectionsClient object. + * The GovernanceRulesClient object to access its operations. */ - public AllowedConnectionsClient getAllowedConnections() { - return this.allowedConnections; + private final GovernanceRulesClient governanceRules; + + /** + * Gets the GovernanceRulesClient object to access its operations. + * + * @return the GovernanceRulesClient object. + */ + public GovernanceRulesClient getGovernanceRules() { + return this.governanceRules; } - /** The TopologiesClient object to access its operations. */ - private final TopologiesClient topologies; + /** + * The ApplicationsClient object to access its operations. + */ + private final ApplicationsClient applications; /** - * Gets the TopologiesClient object to access its operations. - * - * @return the TopologiesClient object. + * Gets the ApplicationsClient object to access its operations. + * + * @return the ApplicationsClient object. */ - public TopologiesClient getTopologies() { - return this.topologies; + public ApplicationsClient getApplications() { + return this.applications; } - /** The JitNetworkAccessPoliciesClient object to access its operations. */ - private final JitNetworkAccessPoliciesClient jitNetworkAccessPolicies; + /** + * The ApplicationOperationsClient object to access its operations. + */ + private final ApplicationOperationsClient applicationOperations; /** - * Gets the JitNetworkAccessPoliciesClient object to access its operations. - * - * @return the JitNetworkAccessPoliciesClient object. + * Gets the ApplicationOperationsClient object to access its operations. + * + * @return the ApplicationOperationsClient object. */ - public JitNetworkAccessPoliciesClient getJitNetworkAccessPolicies() { - return this.jitNetworkAccessPolicies; + public ApplicationOperationsClient getApplicationOperations() { + return this.applicationOperations; } - /** The DiscoveredSecuritySolutionsClient object to access its operations. */ - private final DiscoveredSecuritySolutionsClient discoveredSecuritySolutions; + /** + * The SecurityConnectorApplicationsClient object to access its operations. + */ + private final SecurityConnectorApplicationsClient securityConnectorApplications; /** - * Gets the DiscoveredSecuritySolutionsClient object to access its operations. - * - * @return the DiscoveredSecuritySolutionsClient object. + * Gets the SecurityConnectorApplicationsClient object to access its operations. + * + * @return the SecurityConnectorApplicationsClient object. */ - public DiscoveredSecuritySolutionsClient getDiscoveredSecuritySolutions() { - return this.discoveredSecuritySolutions; + public SecurityConnectorApplicationsClient getSecurityConnectorApplications() { + return this.securityConnectorApplications; } - /** The SecuritySolutionsReferenceDatasClient object to access its operations. */ - private final SecuritySolutionsReferenceDatasClient securitySolutionsReferenceDatas; + /** + * The SecurityConnectorApplicationOperationsClient object to access its operations. + */ + private final SecurityConnectorApplicationOperationsClient securityConnectorApplicationOperations; /** - * Gets the SecuritySolutionsReferenceDatasClient object to access its operations. - * - * @return the SecuritySolutionsReferenceDatasClient object. + * Gets the SecurityConnectorApplicationOperationsClient object to access its operations. + * + * @return the SecurityConnectorApplicationOperationsClient object. */ - public SecuritySolutionsReferenceDatasClient getSecuritySolutionsReferenceDatas() { - return this.securitySolutionsReferenceDatas; + public SecurityConnectorApplicationOperationsClient getSecurityConnectorApplicationOperations() { + return this.securityConnectorApplicationOperations; + } + + /** + * The DefenderForStoragesClient object to access its operations. + */ + private final DefenderForStoragesClient defenderForStorages; + + /** + * Gets the DefenderForStoragesClient object to access its operations. + * + * @return the DefenderForStoragesClient object. + */ + public DefenderForStoragesClient getDefenderForStorages() { + return this.defenderForStorages; + } + + /** + * The SecurityOperatorsClient object to access its operations. + */ + private final SecurityOperatorsClient securityOperators; + + /** + * Gets the SecurityOperatorsClient object to access its operations. + * + * @return the SecurityOperatorsClient object. + */ + public SecurityOperatorsClient getSecurityOperators() { + return this.securityOperators; + } + + /** + * The SqlVulnerabilityAssessmentBaselineRulesClient object to access its operations. + */ + private final SqlVulnerabilityAssessmentBaselineRulesClient sqlVulnerabilityAssessmentBaselineRules; + + /** + * Gets the SqlVulnerabilityAssessmentBaselineRulesClient object to access its operations. + * + * @return the SqlVulnerabilityAssessmentBaselineRulesClient object. + */ + public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessmentBaselineRules() { + return this.sqlVulnerabilityAssessmentBaselineRules; + } + + /** + * The SqlVulnerabilityAssessmentScansClient object to access its operations. + */ + private final SqlVulnerabilityAssessmentScansClient sqlVulnerabilityAssessmentScans; + + /** + * Gets the SqlVulnerabilityAssessmentScansClient object to access its operations. + * + * @return the SqlVulnerabilityAssessmentScansClient object. + */ + public SqlVulnerabilityAssessmentScansClient getSqlVulnerabilityAssessmentScans() { + return this.sqlVulnerabilityAssessmentScans; + } + + /** + * The SqlVulnerabilityAssessmentScanResultsClient object to access its operations. + */ + private final SqlVulnerabilityAssessmentScanResultsClient sqlVulnerabilityAssessmentScanResults; + + /** + * Gets the SqlVulnerabilityAssessmentScanResultsClient object to access its operations. + * + * @return the SqlVulnerabilityAssessmentScanResultsClient object. + */ + public SqlVulnerabilityAssessmentScanResultsClient getSqlVulnerabilityAssessmentScanResults() { + return this.sqlVulnerabilityAssessmentScanResults; + } + + /** + * The ResourceProvidersClient object to access its operations. + */ + private final ResourceProvidersClient resourceProviders; + + /** + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. + */ + public ResourceProvidersClient getResourceProviders() { + return this.resourceProviders; + } + + /** + * The SensitivitySettingsClient object to access its operations. + */ + private final SensitivitySettingsClient sensitivitySettings; + + /** + * Gets the SensitivitySettingsClient object to access its operations. + * + * @return the SensitivitySettingsClient object. + */ + public SensitivitySettingsClient getSensitivitySettings() { + return this.sensitivitySettings; + } + + /** + * The HealthReportsClient object to access its operations. + */ + private final HealthReportsClient healthReports; + + /** + * Gets the HealthReportsClient object to access its operations. + * + * @return the HealthReportsClient object. + */ + public HealthReportsClient getHealthReports() { + return this.healthReports; + } + + /** + * The AzureDevOpsOrgsClient object to access its operations. + */ + private final AzureDevOpsOrgsClient azureDevOpsOrgs; + + /** + * Gets the AzureDevOpsOrgsClient object to access its operations. + * + * @return the AzureDevOpsOrgsClient object. + */ + public AzureDevOpsOrgsClient getAzureDevOpsOrgs() { + return this.azureDevOpsOrgs; + } + + /** + * The AzureDevOpsProjectsClient object to access its operations. + */ + private final AzureDevOpsProjectsClient azureDevOpsProjects; + + /** + * Gets the AzureDevOpsProjectsClient object to access its operations. + * + * @return the AzureDevOpsProjectsClient object. + */ + public AzureDevOpsProjectsClient getAzureDevOpsProjects() { + return this.azureDevOpsProjects; + } + + /** + * The AzureDevOpsReposClient object to access its operations. + */ + private final AzureDevOpsReposClient azureDevOpsRepos; + + /** + * Gets the AzureDevOpsReposClient object to access its operations. + * + * @return the AzureDevOpsReposClient object. + */ + public AzureDevOpsReposClient getAzureDevOpsRepos() { + return this.azureDevOpsRepos; + } + + /** + * The DevOpsConfigurationsClient object to access its operations. + */ + private final DevOpsConfigurationsClient devOpsConfigurations; + + /** + * Gets the DevOpsConfigurationsClient object to access its operations. + * + * @return the DevOpsConfigurationsClient object. + */ + public DevOpsConfigurationsClient getDevOpsConfigurations() { + return this.devOpsConfigurations; + } + + /** + * The GitHubOwnersClient object to access its operations. + */ + private final GitHubOwnersClient gitHubOwners; + + /** + * Gets the GitHubOwnersClient object to access its operations. + * + * @return the GitHubOwnersClient object. + */ + public GitHubOwnersClient getGitHubOwners() { + return this.gitHubOwners; + } + + /** + * The GitHubReposClient object to access its operations. + */ + private final GitHubReposClient gitHubRepos; + + /** + * Gets the GitHubReposClient object to access its operations. + * + * @return the GitHubReposClient object. + */ + public GitHubReposClient getGitHubRepos() { + return this.gitHubRepos; + } + + /** + * The GitLabGroupsClient object to access its operations. + */ + private final GitLabGroupsClient gitLabGroups; + + /** + * Gets the GitLabGroupsClient object to access its operations. + * + * @return the GitLabGroupsClient object. + */ + public GitLabGroupsClient getGitLabGroups() { + return this.gitLabGroups; + } + + /** + * The GitLabSubgroupsClient object to access its operations. + */ + private final GitLabSubgroupsClient gitLabSubgroups; + + /** + * Gets the GitLabSubgroupsClient object to access its operations. + * + * @return the GitLabSubgroupsClient object. + */ + public GitLabSubgroupsClient getGitLabSubgroups() { + return this.gitLabSubgroups; + } + + /** + * The GitLabProjectsClient object to access its operations. + */ + private final GitLabProjectsClient gitLabProjects; + + /** + * Gets the GitLabProjectsClient object to access its operations. + * + * @return the GitLabProjectsClient object. + */ + public GitLabProjectsClient getGitLabProjects() { + return this.gitLabProjects; + } + + /** + * The DevOpsOperationResultsClient object to access its operations. + */ + private final DevOpsOperationResultsClient devOpsOperationResults; + + /** + * Gets the DevOpsOperationResultsClient object to access its operations. + * + * @return the DevOpsOperationResultsClient object. + */ + public DevOpsOperationResultsClient getDevOpsOperationResults() { + return this.devOpsOperationResults; + } + + /** + * The SecurityConnectorsClient object to access its operations. + */ + private final SecurityConnectorsClient securityConnectors; + + /** + * Gets the SecurityConnectorsClient object to access its operations. + * + * @return the SecurityConnectorsClient object. + */ + public SecurityConnectorsClient getSecurityConnectors() { + return this.securityConnectors; + } + + /** + * The ComplianceResultsClient object to access its operations. + */ + private final ComplianceResultsClient complianceResults; + + /** + * Gets the ComplianceResultsClient object to access its operations. + * + * @return the ComplianceResultsClient object. + */ + public ComplianceResultsClient getComplianceResults() { + return this.complianceResults; + } + + /** + * The AdvancedThreatProtectionsClient object to access its operations. + */ + private final AdvancedThreatProtectionsClient advancedThreatProtections; + + /** + * Gets the AdvancedThreatProtectionsClient object to access its operations. + * + * @return the AdvancedThreatProtectionsClient object. + */ + public AdvancedThreatProtectionsClient getAdvancedThreatProtections() { + return this.advancedThreatProtections; + } + + /** + * The DeviceSecurityGroupsClient object to access its operations. + */ + private final DeviceSecurityGroupsClient deviceSecurityGroups; + + /** + * Gets the DeviceSecurityGroupsClient object to access its operations. + * + * @return the DeviceSecurityGroupsClient object. + */ + public DeviceSecurityGroupsClient getDeviceSecurityGroups() { + return this.deviceSecurityGroups; + } + + /** + * The IotSecuritySolutionAnalyticsClient object to access its operations. + */ + private final IotSecuritySolutionAnalyticsClient iotSecuritySolutionAnalytics; + + /** + * Gets the IotSecuritySolutionAnalyticsClient object to access its operations. + * + * @return the IotSecuritySolutionAnalyticsClient object. + */ + public IotSecuritySolutionAnalyticsClient getIotSecuritySolutionAnalytics() { + return this.iotSecuritySolutionAnalytics; + } + + /** + * The IotSecuritySolutionsAnalyticsAggregatedAlertsClient object to access its operations. + */ + private final IotSecuritySolutionsAnalyticsAggregatedAlertsClient iotSecuritySolutionsAnalyticsAggregatedAlerts; + + /** + * Gets the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object to access its operations. + * + * @return the IotSecuritySolutionsAnalyticsAggregatedAlertsClient object. + */ + public IotSecuritySolutionsAnalyticsAggregatedAlertsClient getIotSecuritySolutionsAnalyticsAggregatedAlerts() { + return this.iotSecuritySolutionsAnalyticsAggregatedAlerts; + } + + /** + * The IotSecuritySolutionsAnalyticsRecommendationsClient object to access its operations. + */ + private final IotSecuritySolutionsAnalyticsRecommendationsClient iotSecuritySolutionsAnalyticsRecommendations; + + /** + * Gets the IotSecuritySolutionsAnalyticsRecommendationsClient object to access its operations. + * + * @return the IotSecuritySolutionsAnalyticsRecommendationsClient object. + */ + public IotSecuritySolutionsAnalyticsRecommendationsClient getIotSecuritySolutionsAnalyticsRecommendations() { + return this.iotSecuritySolutionsAnalyticsRecommendations; + } + + /** + * The IotSecuritySolutionsClient object to access its operations. + */ + private final IotSecuritySolutionsClient iotSecuritySolutions; + + /** + * Gets the IotSecuritySolutionsClient object to access its operations. + * + * @return the IotSecuritySolutionsClient object. + */ + public IotSecuritySolutionsClient getIotSecuritySolutions() { + return this.iotSecuritySolutions; + } + + /** + * The AdaptiveNetworkHardeningsClient object to access its operations. + */ + private final AdaptiveNetworkHardeningsClient adaptiveNetworkHardenings; + + /** + * Gets the AdaptiveNetworkHardeningsClient object to access its operations. + * + * @return the AdaptiveNetworkHardeningsClient object. + */ + public AdaptiveNetworkHardeningsClient getAdaptiveNetworkHardenings() { + return this.adaptiveNetworkHardenings; + } + + /** + * The AllowedConnectionsClient object to access its operations. + */ + private final AllowedConnectionsClient allowedConnections; + + /** + * Gets the AllowedConnectionsClient object to access its operations. + * + * @return the AllowedConnectionsClient object. + */ + public AllowedConnectionsClient getAllowedConnections() { + return this.allowedConnections; + } + + /** + * The AdaptiveApplicationControlsClient object to access its operations. + */ + private final AdaptiveApplicationControlsClient adaptiveApplicationControls; + + /** + * Gets the AdaptiveApplicationControlsClient object to access its operations. + * + * @return the AdaptiveApplicationControlsClient object. + */ + public AdaptiveApplicationControlsClient getAdaptiveApplicationControls() { + return this.adaptiveApplicationControls; + } + + /** + * The DiscoveredSecuritySolutionsClient object to access its operations. + */ + private final DiscoveredSecuritySolutionsClient discoveredSecuritySolutions; + + /** + * Gets the DiscoveredSecuritySolutionsClient object to access its operations. + * + * @return the DiscoveredSecuritySolutionsClient object. + */ + public DiscoveredSecuritySolutionsClient getDiscoveredSecuritySolutions() { + return this.discoveredSecuritySolutions; } - /** The ExternalSecuritySolutionsClient object to access its operations. */ + /** + * The ExternalSecuritySolutionsClient object to access its operations. + */ private final ExternalSecuritySolutionsClient externalSecuritySolutions; /** * Gets the ExternalSecuritySolutionsClient object to access its operations. - * + * * @return the ExternalSecuritySolutionsClient object. */ public ExternalSecuritySolutionsClient getExternalSecuritySolutions() { return this.externalSecuritySolutions; } - /** The SecureScoresClient object to access its operations. */ + /** + * The JitNetworkAccessPoliciesClient object to access its operations. + */ + private final JitNetworkAccessPoliciesClient jitNetworkAccessPolicies; + + /** + * Gets the JitNetworkAccessPoliciesClient object to access its operations. + * + * @return the JitNetworkAccessPoliciesClient object. + */ + public JitNetworkAccessPoliciesClient getJitNetworkAccessPolicies() { + return this.jitNetworkAccessPolicies; + } + + /** + * The SecureScoresClient object to access its operations. + */ private final SecureScoresClient secureScores; /** * Gets the SecureScoresClient object to access its operations. - * + * * @return the SecureScoresClient object. */ public SecureScoresClient getSecureScores() { return this.secureScores; } - /** The SecureScoreControlsClient object to access its operations. */ + /** + * The SecureScoreControlsClient object to access its operations. + */ private final SecureScoreControlsClient secureScoreControls; /** * Gets the SecureScoreControlsClient object to access its operations. - * + * * @return the SecureScoreControlsClient object. */ public SecureScoreControlsClient getSecureScoreControls() { return this.secureScoreControls; } - /** The SecureScoreControlDefinitionsClient object to access its operations. */ + /** + * The SecureScoreControlDefinitionsClient object to access its operations. + */ private final SecureScoreControlDefinitionsClient secureScoreControlDefinitions; /** * Gets the SecureScoreControlDefinitionsClient object to access its operations. - * + * * @return the SecureScoreControlDefinitionsClient object. */ public SecureScoreControlDefinitionsClient getSecureScoreControlDefinitions() { return this.secureScoreControlDefinitions; } - /** The SecuritySolutionsClient object to access its operations. */ + /** + * The SecuritySolutionsClient object to access its operations. + */ private final SecuritySolutionsClient securitySolutions; /** * Gets the SecuritySolutionsClient object to access its operations. - * + * * @return the SecuritySolutionsClient object. */ public SecuritySolutionsClient getSecuritySolutions() { return this.securitySolutions; } - /** The ConnectorsClient object to access its operations. */ - private final ConnectorsClient connectors; - - /** - * Gets the ConnectorsClient object to access its operations. - * - * @return the ConnectorsClient object. - */ - public ConnectorsClient getConnectors() { - return this.connectors; - } - - /** The AlertsClient object to access its operations. */ - private final AlertsClient alerts; - /** - * Gets the AlertsClient object to access its operations. - * - * @return the AlertsClient object. + * The SecuritySolutionsReferenceDatasClient object to access its operations. */ - public AlertsClient getAlerts() { - return this.alerts; - } - - /** The SettingsClient object to access its operations. */ - private final SettingsClient settings; + private final SecuritySolutionsReferenceDatasClient securitySolutionsReferenceDatas; /** - * Gets the SettingsClient object to access its operations. - * - * @return the SettingsClient object. + * Gets the SecuritySolutionsReferenceDatasClient object to access its operations. + * + * @return the SecuritySolutionsReferenceDatasClient object. */ - public SettingsClient getSettings() { - return this.settings; + public SecuritySolutionsReferenceDatasClient getSecuritySolutionsReferenceDatas() { + return this.securitySolutionsReferenceDatas; } - /** The IngestionSettingsClient object to access its operations. */ - private final IngestionSettingsClient ingestionSettings; - /** - * Gets the IngestionSettingsClient object to access its operations. - * - * @return the IngestionSettingsClient object. + * The ServerVulnerabilityAssessmentsClient object to access its operations. */ - public IngestionSettingsClient getIngestionSettings() { - return this.ingestionSettings; - } - - /** The SoftwareInventoriesClient object to access its operations. */ - private final SoftwareInventoriesClient softwareInventories; + private final ServerVulnerabilityAssessmentsClient serverVulnerabilityAssessments; /** - * Gets the SoftwareInventoriesClient object to access its operations. - * - * @return the SoftwareInventoriesClient object. + * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. + * + * @return the ServerVulnerabilityAssessmentsClient object. */ - public SoftwareInventoriesClient getSoftwareInventories() { - return this.softwareInventories; + public ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments() { + return this.serverVulnerabilityAssessments; } - /** The GovernanceRulesClient object to access its operations. */ - private final GovernanceRulesClient governanceRules; - /** - * Gets the GovernanceRulesClient object to access its operations. - * - * @return the GovernanceRulesClient object. + * The TopologiesClient object to access its operations. */ - public GovernanceRulesClient getGovernanceRules() { - return this.governanceRules; - } - - /** The GovernanceAssignmentsClient object to access its operations. */ - private final GovernanceAssignmentsClient governanceAssignments; + private final TopologiesClient topologies; /** - * Gets the GovernanceAssignmentsClient object to access its operations. - * - * @return the GovernanceAssignmentsClient object. + * Gets the TopologiesClient object to access its operations. + * + * @return the TopologiesClient object. */ - public GovernanceAssignmentsClient getGovernanceAssignments() { - return this.governanceAssignments; + public TopologiesClient getTopologies() { + return this.topologies; } - /** The ApplicationsClient object to access its operations. */ - private final ApplicationsClient applications; - /** - * Gets the ApplicationsClient object to access its operations. - * - * @return the ApplicationsClient object. + * The AssessmentsMetadatasClient object to access its operations. */ - public ApplicationsClient getApplications() { - return this.applications; - } - - /** The ApplicationOperationsClient object to access its operations. */ - private final ApplicationOperationsClient applicationOperations; + private final AssessmentsMetadatasClient assessmentsMetadatas; /** - * Gets the ApplicationOperationsClient object to access its operations. - * - * @return the ApplicationOperationsClient object. + * Gets the AssessmentsMetadatasClient object to access its operations. + * + * @return the AssessmentsMetadatasClient object. */ - public ApplicationOperationsClient getApplicationOperations() { - return this.applicationOperations; + public AssessmentsMetadatasClient getAssessmentsMetadatas() { + return this.assessmentsMetadatas; } - /** The SecurityConnectorApplicationsClient object to access its operations. */ - private final SecurityConnectorApplicationsClient securityConnectorApplications; - /** - * Gets the SecurityConnectorApplicationsClient object to access its operations. - * - * @return the SecurityConnectorApplicationsClient object. + * The AssessmentsClient object to access its operations. */ - public SecurityConnectorApplicationsClient getSecurityConnectorApplications() { - return this.securityConnectorApplications; - } - - /** The SecurityConnectorApplicationOperationsClient object to access its operations. */ - private final SecurityConnectorApplicationOperationsClient securityConnectorApplicationOperations; + private final AssessmentsClient assessments; /** - * Gets the SecurityConnectorApplicationOperationsClient object to access its operations. - * - * @return the SecurityConnectorApplicationOperationsClient object. + * Gets the AssessmentsClient object to access its operations. + * + * @return the AssessmentsClient object. */ - public SecurityConnectorApplicationOperationsClient getSecurityConnectorApplicationOperations() { - return this.securityConnectorApplicationOperations; + public AssessmentsClient getAssessments() { + return this.assessments; } - /** The ApiCollectionsClient object to access its operations. */ - private final ApiCollectionsClient apiCollections; - /** - * Gets the ApiCollectionsClient object to access its operations. - * - * @return the ApiCollectionsClient object. + * The AlertsClient object to access its operations. */ - public ApiCollectionsClient getApiCollections() { - return this.apiCollections; - } - - /** The ApiCollectionOnboardingsClient object to access its operations. */ - private final ApiCollectionOnboardingsClient apiCollectionOnboardings; + private final AlertsClient alerts; /** - * Gets the ApiCollectionOnboardingsClient object to access its operations. - * - * @return the ApiCollectionOnboardingsClient object. + * Gets the AlertsClient object to access its operations. + * + * @return the AlertsClient object. */ - public ApiCollectionOnboardingsClient getApiCollectionOnboardings() { - return this.apiCollectionOnboardings; + public AlertsClient getAlerts() { + return this.alerts; } - /** The ApiCollectionOffboardingsClient object to access its operations. */ - private final ApiCollectionOffboardingsClient apiCollectionOffboardings; - /** - * Gets the ApiCollectionOffboardingsClient object to access its operations. - * - * @return the ApiCollectionOffboardingsClient object. + * The SettingsClient object to access its operations. */ - public ApiCollectionOffboardingsClient getApiCollectionOffboardings() { - return this.apiCollectionOffboardings; - } - - /** The HealthReportsClient object to access its operations. */ - private final HealthReportsClient healthReports; + private final SettingsClient settings; /** - * Gets the HealthReportsClient object to access its operations. - * - * @return the HealthReportsClient object. + * Gets the SettingsClient object to access its operations. + * + * @return the SettingsClient object. */ - public HealthReportsClient getHealthReports() { - return this.healthReports; + public SettingsClient getSettings() { + return this.settings; } - /** The HealthReportOperationsClient object to access its operations. */ - private final HealthReportOperationsClient healthReportOperations; - /** - * Gets the HealthReportOperationsClient object to access its operations. - * - * @return the HealthReportOperationsClient object. + * The ServerVulnerabilityAssessmentsSettingsClient object to access its operations. */ - public HealthReportOperationsClient getHealthReportOperations() { - return this.healthReportOperations; - } - - /** The SqlVulnerabilityAssessmentScansClient object to access its operations. */ - private final SqlVulnerabilityAssessmentScansClient sqlVulnerabilityAssessmentScans; + private final ServerVulnerabilityAssessmentsSettingsClient serverVulnerabilityAssessmentsSettings; /** - * Gets the SqlVulnerabilityAssessmentScansClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentScansClient object. + * Gets the ServerVulnerabilityAssessmentsSettingsClient object to access its operations. + * + * @return the ServerVulnerabilityAssessmentsSettingsClient object. */ - public SqlVulnerabilityAssessmentScansClient getSqlVulnerabilityAssessmentScans() { - return this.sqlVulnerabilityAssessmentScans; + public ServerVulnerabilityAssessmentsSettingsClient getServerVulnerabilityAssessmentsSettings() { + return this.serverVulnerabilityAssessmentsSettings; } - /** The SqlVulnerabilityAssessmentScanResultsClient object to access its operations. */ - private final SqlVulnerabilityAssessmentScanResultsClient sqlVulnerabilityAssessmentScanResults; - /** - * Gets the SqlVulnerabilityAssessmentScanResultsClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentScanResultsClient object. + * The ApiCollectionsClient object to access its operations. */ - public SqlVulnerabilityAssessmentScanResultsClient getSqlVulnerabilityAssessmentScanResults() { - return this.sqlVulnerabilityAssessmentScanResults; - } - - /** The SqlVulnerabilityAssessmentBaselineRulesClient object to access its operations. */ - private final SqlVulnerabilityAssessmentBaselineRulesClient sqlVulnerabilityAssessmentBaselineRules; + private final ApiCollectionsClient apiCollections; /** - * Gets the SqlVulnerabilityAssessmentBaselineRulesClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentBaselineRulesClient object. + * Gets the ApiCollectionsClient object to access its operations. + * + * @return the ApiCollectionsClient object. */ - public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessmentBaselineRules() { - return this.sqlVulnerabilityAssessmentBaselineRules; + public ApiCollectionsClient getApiCollections() { + return this.apiCollections; } - /** The SecurityConnectorsClient object to access its operations. */ - private final SecurityConnectorsClient securityConnectors; - /** - * Gets the SecurityConnectorsClient object to access its operations. - * - * @return the SecurityConnectorsClient object. + * The PricingsClient object to access its operations. */ - public SecurityConnectorsClient getSecurityConnectors() { - return this.securityConnectors; - } - - /** The SecurityOperatorsClient object to access its operations. */ - private final SecurityOperatorsClient securityOperators; + private final PricingsClient pricings; /** - * Gets the SecurityOperatorsClient object to access its operations. - * - * @return the SecurityOperatorsClient object. + * Gets the PricingsClient object to access its operations. + * + * @return the PricingsClient object. */ - public SecurityOperatorsClient getSecurityOperators() { - return this.securityOperators; + public PricingsClient getPricings() { + return this.pricings; } /** * Initializes an instance of SecurityCenter client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -898,86 +1182,91 @@ public SecurityOperatorsClient getSecurityOperators() { * @param subscriptionId Azure subscription ID. * @param endpoint server parameter. */ - SecurityCenterImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + SecurityCenterImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.mdeOnboardings = new MdeOnboardingsClientImpl(this); - this.customAssessmentAutomations = new CustomAssessmentAutomationsClientImpl(this); - this.customEntityStoreAssignments = new CustomEntityStoreAssignmentsClientImpl(this); - this.complianceResults = new ComplianceResultsClientImpl(this); - this.pricings = new PricingsClientImpl(this); - this.advancedThreatProtections = new AdvancedThreatProtectionsClientImpl(this); - this.deviceSecurityGroups = new DeviceSecurityGroupsClientImpl(this); - this.iotSecuritySolutions = new IotSecuritySolutionsClientImpl(this); - this.iotSecuritySolutionAnalytics = new IotSecuritySolutionAnalyticsClientImpl(this); - this.iotSecuritySolutionsAnalyticsAggregatedAlerts = - new IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl(this); - this.iotSecuritySolutionsAnalyticsRecommendations = - new IotSecuritySolutionsAnalyticsRecommendationsClientImpl(this); this.locations = new LocationsClientImpl(this); this.operations = new OperationsClientImpl(this); this.tasks = new TasksClientImpl(this); this.autoProvisioningSettings = new AutoProvisioningSettingsClientImpl(this); this.compliances = new CompliancesClientImpl(this); this.informationProtectionPolicies = new InformationProtectionPoliciesClientImpl(this); - this.securityContacts = new SecurityContactsClientImpl(this); this.workspaceSettings = new WorkspaceSettingsClientImpl(this); + this.alertsSuppressionRules = new AlertsSuppressionRulesClientImpl(this); + this.automations = new AutomationsClientImpl(this); this.regulatoryComplianceStandards = new RegulatoryComplianceStandardsClientImpl(this); this.regulatoryComplianceControls = new RegulatoryComplianceControlsClientImpl(this); this.regulatoryComplianceAssessments = new RegulatoryComplianceAssessmentsClientImpl(this); this.subAssessments = new SubAssessmentsClientImpl(this); - this.automations = new AutomationsClientImpl(this); - this.alertsSuppressionRules = new AlertsSuppressionRulesClientImpl(this); - this.serverVulnerabilityAssessments = new ServerVulnerabilityAssessmentsClientImpl(this); - this.assessmentsMetadatas = new AssessmentsMetadatasClientImpl(this); - this.assessments = new AssessmentsClientImpl(this); - this.adaptiveApplicationControls = new AdaptiveApplicationControlsClientImpl(this); + this.connectors = new ConnectorsClientImpl(this); + this.securityContacts = new SecurityContactsClientImpl(this); + this.softwareInventories = new SoftwareInventoriesClientImpl(this); + this.customAssessmentAutomations = new CustomAssessmentAutomationsClientImpl(this); + this.customEntityStoreAssignments = new CustomEntityStoreAssignmentsClientImpl(this); + this.mdeOnboardings = new MdeOnboardingsClientImpl(this); + this.governanceAssignments = new GovernanceAssignmentsClientImpl(this); + this.governanceRules = new GovernanceRulesClientImpl(this); + this.applications = new ApplicationsClientImpl(this); + this.applicationOperations = new ApplicationOperationsClientImpl(this); + this.securityConnectorApplications = new SecurityConnectorApplicationsClientImpl(this); + this.securityConnectorApplicationOperations = new SecurityConnectorApplicationOperationsClientImpl(this); + this.defenderForStorages = new DefenderForStoragesClientImpl(this); + this.securityOperators = new SecurityOperatorsClientImpl(this); + this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesClientImpl(this); + this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansClientImpl(this); + this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsClientImpl(this); + this.resourceProviders = new ResourceProvidersClientImpl(this); + this.sensitivitySettings = new SensitivitySettingsClientImpl(this); + this.healthReports = new HealthReportsClientImpl(this); + this.azureDevOpsOrgs = new AzureDevOpsOrgsClientImpl(this); + this.azureDevOpsProjects = new AzureDevOpsProjectsClientImpl(this); + this.azureDevOpsRepos = new AzureDevOpsReposClientImpl(this); + this.devOpsConfigurations = new DevOpsConfigurationsClientImpl(this); + this.gitHubOwners = new GitHubOwnersClientImpl(this); + this.gitHubRepos = new GitHubReposClientImpl(this); + this.gitLabGroups = new GitLabGroupsClientImpl(this); + this.gitLabSubgroups = new GitLabSubgroupsClientImpl(this); + this.gitLabProjects = new GitLabProjectsClientImpl(this); + this.devOpsOperationResults = new DevOpsOperationResultsClientImpl(this); + this.securityConnectors = new SecurityConnectorsClientImpl(this); + this.complianceResults = new ComplianceResultsClientImpl(this); + this.advancedThreatProtections = new AdvancedThreatProtectionsClientImpl(this); + this.deviceSecurityGroups = new DeviceSecurityGroupsClientImpl(this); + this.iotSecuritySolutionAnalytics = new IotSecuritySolutionAnalyticsClientImpl(this); + this.iotSecuritySolutionsAnalyticsAggregatedAlerts + = new IotSecuritySolutionsAnalyticsAggregatedAlertsClientImpl(this); + this.iotSecuritySolutionsAnalyticsRecommendations + = new IotSecuritySolutionsAnalyticsRecommendationsClientImpl(this); + this.iotSecuritySolutions = new IotSecuritySolutionsClientImpl(this); this.adaptiveNetworkHardenings = new AdaptiveNetworkHardeningsClientImpl(this); this.allowedConnections = new AllowedConnectionsClientImpl(this); - this.topologies = new TopologiesClientImpl(this); - this.jitNetworkAccessPolicies = new JitNetworkAccessPoliciesClientImpl(this); + this.adaptiveApplicationControls = new AdaptiveApplicationControlsClientImpl(this); this.discoveredSecuritySolutions = new DiscoveredSecuritySolutionsClientImpl(this); - this.securitySolutionsReferenceDatas = new SecuritySolutionsReferenceDatasClientImpl(this); this.externalSecuritySolutions = new ExternalSecuritySolutionsClientImpl(this); + this.jitNetworkAccessPolicies = new JitNetworkAccessPoliciesClientImpl(this); this.secureScores = new SecureScoresClientImpl(this); this.secureScoreControls = new SecureScoreControlsClientImpl(this); this.secureScoreControlDefinitions = new SecureScoreControlDefinitionsClientImpl(this); this.securitySolutions = new SecuritySolutionsClientImpl(this); - this.connectors = new ConnectorsClientImpl(this); + this.securitySolutionsReferenceDatas = new SecuritySolutionsReferenceDatasClientImpl(this); + this.serverVulnerabilityAssessments = new ServerVulnerabilityAssessmentsClientImpl(this); + this.topologies = new TopologiesClientImpl(this); + this.assessmentsMetadatas = new AssessmentsMetadatasClientImpl(this); + this.assessments = new AssessmentsClientImpl(this); this.alerts = new AlertsClientImpl(this); this.settings = new SettingsClientImpl(this); - this.ingestionSettings = new IngestionSettingsClientImpl(this); - this.softwareInventories = new SoftwareInventoriesClientImpl(this); - this.governanceRules = new GovernanceRulesClientImpl(this); - this.governanceAssignments = new GovernanceAssignmentsClientImpl(this); - this.applications = new ApplicationsClientImpl(this); - this.applicationOperations = new ApplicationOperationsClientImpl(this); - this.securityConnectorApplications = new SecurityConnectorApplicationsClientImpl(this); - this.securityConnectorApplicationOperations = new SecurityConnectorApplicationOperationsClientImpl(this); + this.serverVulnerabilityAssessmentsSettings = new ServerVulnerabilityAssessmentsSettingsClientImpl(this); this.apiCollections = new ApiCollectionsClientImpl(this); - this.apiCollectionOnboardings = new ApiCollectionOnboardingsClientImpl(this); - this.apiCollectionOffboardings = new ApiCollectionOffboardingsClientImpl(this); - this.healthReports = new HealthReportsClientImpl(this); - this.healthReportOperations = new HealthReportOperationsClientImpl(this); - this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansClientImpl(this); - this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsClientImpl(this); - this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesClientImpl(this); - this.securityConnectors = new SecurityConnectorsClientImpl(this); - this.securityOperators = new SecurityOperatorsClientImpl(this); + this.pricings = new PricingsClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -986,7 +1275,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -996,7 +1285,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -1006,26 +1295,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -1038,19 +1316,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsClientImpl.java index 8cf5297de074..1cb19d039513 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsClientImpl.java @@ -34,24 +34,24 @@ */ public final class SecurityConnectorApplicationOperationsClientImpl implements SecurityConnectorApplicationOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecurityConnectorApplicationOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecurityConnectorApplicationOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecurityConnectorApplicationOperationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - SecurityConnectorApplicationOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(SecurityConnectorApplicationOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -62,79 +62,62 @@ public final class SecurityConnectorApplicationOperationsClientImpl @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecuri") public interface SecurityConnectorApplicationOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("securityConnectorName") String securityConnectorName, - @PathParam("applicationId") String applicationId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("applicationId") String applicationId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("securityConnectorName") String securityConnectorName, @PathParam("applicationId") String applicationId, - @BodyParam("application/json") ApplicationInner application, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInner application, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}") - @ExpectedResponses({200, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("securityConnectorName") String securityConnectorName, - @PathParam("applicationId") String applicationId, - Context context); + @PathParam("applicationId") String applicationId, Context context); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific application for the requested scope by applicationId along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String securityConnectorName, String applicationId) { + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String applicationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -150,26 +133,16 @@ private Mono> getWithResponseAsync( final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - applicationId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, applicationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. @@ -177,22 +150,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific application for the requested scope by applicationId along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String securityConnectorName, String applicationId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String securityConnectorName, String applicationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -208,23 +177,15 @@ private Mono> getWithResponseAsync( final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - applicationId, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, applicationId, accept, context); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -233,17 +194,17 @@ private Mono> getWithResponseAsync( * @return a specific application for the requested scope by applicationId on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String securityConnectorName, String applicationId) { + private Mono getAsync(String resourceGroupName, String securityConnectorName, + String applicationId) { return getWithResponseAsync(resourceGroupName, securityConnectorName, applicationId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. @@ -253,16 +214,16 @@ private Mono getAsync( * @return a specific application for the requested scope by applicationId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String securityConnectorName, String applicationId, Context context) { + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, Context context) { return getWithResponseAsync(resourceGroupName, securityConnectorName, applicationId, context).block(); } /** * Get a specific application for the requested scope by applicationId. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,32 +238,28 @@ public ApplicationInner get(String resourceGroupName, String securityConnectorNa /** * Creates or update a security Application on the given security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security Application over a given scope along with {@link Response} on successful completion of {@link - * Mono}. + * @return security Application over a given scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String securityConnectorName, String applicationId, ApplicationInner application) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String applicationId, ApplicationInner application) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -323,27 +280,17 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - applicationId, - application, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, applicationId, application, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or update a security Application on the given security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. @@ -351,27 +298,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security Application over a given scope along with {@link Response} on successful completion of {@link - * Mono}. + * @return security Application over a given scope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String securityConnectorName, - String applicationId, - ApplicationInner application, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, String applicationId, ApplicationInner application, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -392,24 +331,15 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - applicationId, - application, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, applicationId, application, accept, context); } /** * Creates or update a security Application on the given security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. @@ -419,17 +349,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return security Application over a given scope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String securityConnectorName, String applicationId, ApplicationInner application) { + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + String applicationId, ApplicationInner application) { return createOrUpdateWithResponseAsync(resourceGroupName, securityConnectorName, applicationId, application) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or update a security Application on the given security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. @@ -440,22 +370,17 @@ private Mono createOrUpdateAsync( * @return security Application over a given scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String securityConnectorName, - String applicationId, - ApplicationInner application, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, securityConnectorName, applicationId, application, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, ApplicationInner application, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, securityConnectorName, applicationId, application, + context).block(); } /** * Creates or update a security Application on the given security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param application Application over a subscription scope. @@ -465,18 +390,17 @@ public Response createOrUpdateWithResponse( * @return security Application over a given scope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner createOrUpdate( - String resourceGroupName, String securityConnectorName, String applicationId, ApplicationInner application) { - return createOrUpdateWithResponse( - resourceGroupName, securityConnectorName, applicationId, application, Context.NONE) - .getValue(); + public ApplicationInner createOrUpdate(String resourceGroupName, String securityConnectorName, String applicationId, + ApplicationInner application) { + return createOrUpdateWithResponse(resourceGroupName, securityConnectorName, applicationId, application, + Context.NONE).getValue(); } /** * Delete an Application over a given scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -485,19 +409,15 @@ public ApplicationInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String securityConnectorName, String applicationId) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String securityConnectorName, + String applicationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -512,25 +432,16 @@ private Mono> deleteWithResponseAsync( } final String apiVersion = "2022-07-01-preview"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - applicationId, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, applicationId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete an Application over a given scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. @@ -540,19 +451,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String securityConnectorName, String applicationId, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String securityConnectorName, + String applicationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -567,22 +474,15 @@ private Mono> deleteWithResponseAsync( } final String apiVersion = "2022-07-01-preview"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - applicationId, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, applicationId, context); } /** * Delete an Application over a given scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -598,9 +498,9 @@ private Mono deleteAsync(String resourceGroupName, String securityConnecto /** * Delete an Application over a given scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. @@ -610,16 +510,16 @@ private Mono deleteAsync(String resourceGroupName, String securityConnecto * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String securityConnectorName, String applicationId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, Context context) { return deleteWithResponseAsync(resourceGroupName, securityConnectorName, applicationId, context).block(); } /** * Delete an Application over a given scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsImpl.java index 006bf422b7c2..b5d8a48cbf41 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationOperationsImpl.java @@ -20,22 +20,18 @@ public final class SecurityConnectorApplicationOperationsImpl implements Securit private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecurityConnectorApplicationOperationsImpl( - SecurityConnectorApplicationOperationsClient innerClient, + public SecurityConnectorApplicationOperationsImpl(SecurityConnectorApplicationOperationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String securityConnectorName, String applicationId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, securityConnectorName, applicationId, context); + public Response getWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, securityConnectorName, applicationId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationImpl(inner.getValue(), this.manager())); } else { return null; @@ -51,32 +47,22 @@ public Application get(String resourceGroupName, String securityConnectorName, S } } - public Response createOrUpdateWithResponse( - String resourceGroupName, - String securityConnectorName, - String applicationId, - ApplicationInner application, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, securityConnectorName, applicationId, application, context); + public Response createOrUpdateWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, ApplicationInner application, Context context) { + Response inner = this.serviceClient().createOrUpdateWithResponse(resourceGroupName, + securityConnectorName, applicationId, application, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationImpl(inner.getValue(), this.manager())); } else { return null; } } - public Application createOrUpdate( - String resourceGroupName, String securityConnectorName, String applicationId, ApplicationInner application) { - ApplicationInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, securityConnectorName, applicationId, application); + public Application createOrUpdate(String resourceGroupName, String securityConnectorName, String applicationId, + ApplicationInner application) { + ApplicationInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, securityConnectorName, applicationId, application); if (inner != null) { return new ApplicationImpl(inner, this.manager()); } else { @@ -84,11 +70,10 @@ public Application createOrUpdate( } } - public Response deleteWithResponse( - String resourceGroupName, String securityConnectorName, String applicationId, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, securityConnectorName, applicationId, context); + public Response deleteWithResponse(String resourceGroupName, String securityConnectorName, + String applicationId, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, securityConnectorName, applicationId, + context); } public void delete(String resourceGroupName, String securityConnectorName, String applicationId) { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsClientImpl.java index 40cd382330cd..80b9367cdcec 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsClientImpl.java @@ -30,26 +30,28 @@ import com.azure.resourcemanager.security.models.ApplicationsList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecurityConnectorApplicationsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityConnectorApplicationsClient. + */ public final class SecurityConnectorApplicationsClientImpl implements SecurityConnectorApplicationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecurityConnectorApplicationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecurityConnectorApplicationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecurityConnectorApplicationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - SecurityConnectorApplicationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(SecurityConnectorApplicationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,57 +62,46 @@ public final class SecurityConnectorApplicationsClientImpl implements SecurityCo @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecuri") public interface SecurityConnectorApplicationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("securityConnectorName") String securityConnectorName, - @HeaderParam("Accept") String accept, + @PathParam("securityConnectorName") String securityConnectorName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a security connector level scope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of all relevant applications over a security connector level scope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String securityConnectorName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -123,56 +114,36 @@ private Mono> listSinglePageAsync( final String apiVersion = "2022-07-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a security connector level scope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list of all relevant applications over a security connector level scope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String securityConnectorName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String securityConnectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -186,76 +157,61 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a security connector level scope as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String securityConnectorName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, securityConnectorName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a security connector level scope as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String securityConnectorName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, securityConnectorName, context), + private PagedFlux listAsync(String resourceGroupName, String securityConnectorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, securityConnectorName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a security connector level scope as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String securityConnectorName) { @@ -264,33 +220,34 @@ public PagedIterable list(String resourceGroupName, String sec /** * Get a list of all relevant applications over a security connector level scope. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all relevant applications over a security connector level scope as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String securityConnectorName, Context context) { + public PagedIterable list(String resourceGroupName, String securityConnectorName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, securityConnectorName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a security applications list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a security applications list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -298,37 +255,28 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return page of a security applications list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return page of a security applications list along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -336,23 +284,13 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsImpl.java index d8ac67980999..655888a76d63 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorApplicationsImpl.java @@ -19,8 +19,7 @@ public final class SecurityConnectorApplicationsImpl implements SecurityConnecto private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecurityConnectorApplicationsImpl( - SecurityConnectorApplicationsClient innerClient, + public SecurityConnectorApplicationsImpl(SecurityConnectorApplicationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,13 +27,13 @@ public SecurityConnectorApplicationsImpl( public PagedIterable list(String resourceGroupName, String securityConnectorName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, securityConnectorName); - return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String securityConnectorName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, securityConnectorName, context); - return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, securityConnectorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } private SecurityConnectorApplicationsClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorImpl.java index 6eaee85d9cac..78c6586d2743 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorImpl.java @@ -107,22 +107,16 @@ public SecurityConnectorImpl withExistingResourceGroup(String resourceGroupName) } public SecurityConnector create() { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityConnectors() - .createOrUpdateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityConnectors() + .createOrUpdateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), Context.NONE) + .getValue(); return this; } public SecurityConnector create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityConnectors() - .createOrUpdateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityConnectors() + .createOrUpdateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), context) + .getValue(); return this; } @@ -137,50 +131,34 @@ public SecurityConnectorImpl update() { } public SecurityConnector apply() { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityConnectors() - .updateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityConnectors() + .updateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), Context.NONE).getValue(); return this; } public SecurityConnector apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityConnectors() - .updateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityConnectors() + .updateWithResponse(resourceGroupName, securityConnectorName, this.innerModel(), context).getValue(); return this; } - SecurityConnectorImpl( - SecurityConnectorInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecurityConnectorImpl(SecurityConnectorInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.securityConnectorName = Utils.getValueFromIdByName(innerObject.id(), "securityConnectors"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.securityConnectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "securityConnectors"); } public SecurityConnector refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityConnectors() - .getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityConnectors() + .getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, Context.NONE).getValue(); return this; } public SecurityConnector refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityConnectors() - .getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityConnectors() + .getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java index 2092e42d6eb4..14e5f5477b9b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java @@ -34,22 +34,28 @@ import com.azure.resourcemanager.security.models.SecurityConnectorsList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecurityConnectorsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityConnectorsClient. + */ public final class SecurityConnectorsClientImpl implements SecurityConnectorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecurityConnectorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecurityConnectorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecurityConnectorsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SecurityConnectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(SecurityConnectorsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,196 +66,143 @@ public final class SecurityConnectorsClientImpl implements SecurityConnectorsCli @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecuri") public interface SecurityConnectorsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityConnectors") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("securityConnectorName") String securityConnectorName, - @HeaderParam("Accept") String accept, + @PathParam("securityConnectorName") String securityConnectorName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("securityConnectorName") String securityConnectorName, @BodyParam("application/json") SecurityConnectorInner securityConnector, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("securityConnectorName") String securityConnectorName, @BodyParam("application/json") SecurityConnectorInner securityConnector, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("securityConnectorName") String securityConnectorName, - @HeaderParam("Accept") String accept, + @PathParam("securityConnectorName") String securityConnectorName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security connectors response as paginated response with {@link PagedFlux}. @@ -262,7 +215,7 @@ private PagedFlux listAsync() { /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -271,14 +224,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security connectors response as paginated response with {@link PagedIterable}. @@ -291,7 +244,7 @@ public PagedIterable list() { /** * Lists all the security connectors in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -306,118 +259,83 @@ public PagedIterable list(Context context) { /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -425,17 +343,16 @@ private Mono> listByResourceGroupSinglePag */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -444,17 +361,16 @@ private PagedFlux listByResourceGroupAsync(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -468,9 +384,9 @@ public PagedIterable listByResourceGroup(String resource /** * Lists all the security connectors in the specified resource group. Use the 'nextLink' property in the response to * get the next page of security connectors for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -484,9 +400,9 @@ public PagedIterable listByResourceGroup(String resource /** * Retrieves details of a specific security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -494,19 +410,15 @@ public PagedIterable listByResourceGroup(String resource * @return the security connector resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String securityConnectorName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String securityConnectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -516,28 +428,19 @@ private Mono> getByResourceGroupWithResponseAsy return Mono .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Retrieves details of a specific security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,19 +449,15 @@ private Mono> getByResourceGroupWithResponseAsy * @return the security connector resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String securityConnectorName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String securityConnectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -568,25 +467,18 @@ private Mono> getByResourceGroupWithResponseAsy return Mono .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, accept, context); } /** * Retrieves details of a specific security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -594,17 +486,17 @@ private Mono> getByResourceGroupWithResponseAsy * @return the security connector resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String securityConnectorName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String securityConnectorName) { return getByResourceGroupWithResponseAsync(resourceGroupName, securityConnectorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Retrieves details of a specific security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -613,16 +505,16 @@ private Mono getByResourceGroupAsync( * @return the security connector resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String securityConnectorName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, securityConnectorName, context).block(); } /** * Retrieves details of a specific security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -637,9 +529,9 @@ public SecurityConnectorInner getByResourceGroup(String resourceGroupName, Strin /** * Creates or updates a security connector. If a security connector is already created and a subsequent request is * issued for the same security connector id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -648,19 +540,15 @@ public SecurityConnectorInner getByResourceGroup(String resourceGroupName, Strin * @return the security connector resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, SecurityConnectorInner securityConnector) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -676,30 +564,21 @@ private Mono> createOrUpdateWithResponseAsync( } else { securityConnector.validate(); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - securityConnector, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, securityConnector, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a security connector. If a security connector is already created and a subsequent request is * issued for the same security connector id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @param context The context to associate with this operation. @@ -709,22 +588,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return the security connector resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String securityConnectorName, - SecurityConnectorInner securityConnector, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String securityConnectorName, SecurityConnectorInner securityConnector, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -740,27 +612,19 @@ private Mono> createOrUpdateWithResponseAsync( } else { securityConnector.validate(); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - securityConnector, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, securityConnector, accept, context); } /** * Creates or updates a security connector. If a security connector is already created and a subsequent request is * issued for the same security connector id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -769,8 +633,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return the security connector resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector) { + private Mono createOrUpdateAsync(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector) { return createOrUpdateWithResponseAsync(resourceGroupName, securityConnectorName, securityConnector) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -778,9 +642,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a security connector. If a security connector is already created and a subsequent request is * issued for the same security connector id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @param context The context to associate with this operation. @@ -790,11 +654,8 @@ private Mono createOrUpdateAsync( * @return the security connector resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String securityConnectorName, - SecurityConnectorInner securityConnector, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String securityConnectorName, SecurityConnectorInner securityConnector, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, securityConnectorName, securityConnector, context) .block(); } @@ -802,9 +663,9 @@ public Response createOrUpdateWithResponse( /** * Creates or updates a security connector. If a security connector is already created and a subsequent request is * issued for the same security connector id, then it will be updated. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -813,17 +674,17 @@ public Response createOrUpdateWithResponse( * @return the security connector resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityConnectorInner createOrUpdate( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector) { + public SecurityConnectorInner createOrUpdate(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector) { return createOrUpdateWithResponse(resourceGroupName, securityConnectorName, securityConnector, Context.NONE) .getValue(); } /** * Updates a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -832,19 +693,15 @@ public SecurityConnectorInner createOrUpdate( * @return the security connector resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, SecurityConnectorInner securityConnector) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -860,29 +717,20 @@ private Mono> updateWithResponseAsync( } else { securityConnector.validate(); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - securityConnector, - accept, - context)) + context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, securityConnectorName, securityConnector, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @param context The context to associate with this operation. @@ -892,22 +740,15 @@ private Mono> updateWithResponseAsync( * @return the security connector resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String securityConnectorName, - SecurityConnectorInner securityConnector, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String securityConnectorName, SecurityConnectorInner securityConnector, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -923,26 +764,18 @@ private Mono> updateWithResponseAsync( } else { securityConnector.validate(); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - securityConnector, - accept, - context); + return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, securityConnector, accept, context); } /** * Updates a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -951,17 +784,17 @@ private Mono> updateWithResponseAsync( * @return the security connector resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector) { + private Mono updateAsync(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector) { return updateWithResponseAsync(resourceGroupName, securityConnectorName, securityConnector) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @param context The context to associate with this operation. @@ -971,19 +804,16 @@ private Mono updateAsync( * @return the security connector resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String securityConnectorName, - SecurityConnectorInner securityConnector, - Context context) { + public Response updateWithResponse(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector, Context context) { return updateWithResponseAsync(resourceGroupName, securityConnectorName, securityConnector, context).block(); } /** * Updates a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param securityConnector The security connector resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -992,16 +822,16 @@ public Response updateWithResponse( * @return the security connector resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityConnectorInner update( - String resourceGroupName, String securityConnectorName, SecurityConnectorInner securityConnector) { + public SecurityConnectorInner update(String resourceGroupName, String securityConnectorName, + SecurityConnectorInner securityConnector) { return updateWithResponse(resourceGroupName, securityConnectorName, securityConnector, Context.NONE).getValue(); } /** * Deletes a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1011,16 +841,12 @@ public SecurityConnectorInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String securityConnectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1030,28 +856,19 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, securityConnectorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1060,19 +877,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String securityConnectorName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String securityConnectorName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1082,25 +895,18 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null.")); } - final String apiVersion = "2023-03-01-preview"; + final String apiVersion = "2023-10-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - securityConnectorName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, + securityConnectorName, accept, context); } /** * Deletes a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1114,9 +920,9 @@ private Mono deleteAsync(String resourceGroupName, String securityConnecto /** * Deletes a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1131,9 +937,9 @@ public Response deleteWithResponse(String resourceGroupName, String securi /** * Deletes a security connector. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param securityConnectorName The security connector name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1146,14 +952,15 @@ public void delete(String resourceGroupName, String securityConnectorName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1161,37 +968,28 @@ private Mono> listNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1199,36 +997,27 @@ private Mono> listNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1236,63 +1025,45 @@ private Mono> listByResourceGroupNextSingl return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security connectors response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security connectors response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsImpl.java index 7ca42cfa356d..f2939bcf75f2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsImpl.java @@ -21,42 +21,39 @@ public final class SecurityConnectorsImpl implements SecurityConnectors { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecurityConnectorsImpl( - SecurityConnectorsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SecurityConnectorsImpl(SecurityConnectorsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityConnectorImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String securityConnectorName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String securityConnectorName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityConnectorImpl(inner.getValue(), this.manager())); } else { return null; @@ -64,8 +61,8 @@ public Response getByResourceGroupWithResponse( } public SecurityConnector getByResourceGroup(String resourceGroupName, String securityConnectorName) { - SecurityConnectorInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, securityConnectorName); + SecurityConnectorInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, securityConnectorName); if (inner != null) { return new SecurityConnectorImpl(inner, this.manager()); } else { @@ -73,8 +70,8 @@ public SecurityConnector getByResourceGroup(String resourceGroupName, String sec } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String securityConnectorName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String securityConnectorName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, securityConnectorName, context); } @@ -83,85 +80,57 @@ public void deleteByResourceGroup(String resourceGroupName, String securityConne } public SecurityConnector getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String securityConnectorName = Utils.getValueFromIdByName(id, "securityConnectors"); + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); if (securityConnectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String securityConnectorName = Utils.getValueFromIdByName(id, "securityConnectors"); + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); if (securityConnectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, securityConnectorName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String securityConnectorName = Utils.getValueFromIdByName(id, "securityConnectors"); + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); if (securityConnectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, securityConnectorName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String securityConnectorName = Utils.getValueFromIdByName(id, "securityConnectors"); + String securityConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "securityConnectors"); if (securityConnectorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityConnectors'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, securityConnectorName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactImpl.java index b2543af8c36e..2e389dbfbe73 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactImpl.java @@ -6,17 +6,20 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.SecurityContactInner; +import com.azure.resourcemanager.security.models.NotificationsSource; import com.azure.resourcemanager.security.models.SecurityContact; -import com.azure.resourcemanager.security.models.SecurityContactPropertiesAlertNotifications; +import com.azure.resourcemanager.security.models.SecurityContactName; import com.azure.resourcemanager.security.models.SecurityContactPropertiesNotificationsByRole; +import java.util.Collections; +import java.util.List; public final class SecurityContactImpl implements SecurityContact, SecurityContact.Definition { private SecurityContactInner innerObject; private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecurityContactImpl( - SecurityContactInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecurityContactImpl(SecurityContactInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -41,8 +44,17 @@ public String phone() { return this.innerModel().phone(); } - public SecurityContactPropertiesAlertNotifications alertNotifications() { - return this.innerModel().alertNotifications(); + public Boolean isEnabled() { + return this.innerModel().isEnabled(); + } + + public List notificationsSources() { + List inner = this.innerModel().notificationsSources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public SecurityContactPropertiesNotificationsByRole notificationsByRole() { @@ -57,51 +69,35 @@ private com.azure.resourcemanager.security.SecurityManager manager() { return this.serviceManager; } - private String securityContactName; + private SecurityContactName securityContactName; public SecurityContact create() { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityContacts() - .createWithResponse(securityContactName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityContacts() + .createWithResponse(securityContactName, this.innerModel(), Context.NONE).getValue(); return this; } public SecurityContact create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityContacts() - .createWithResponse(securityContactName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityContacts() + .createWithResponse(securityContactName, this.innerModel(), context).getValue(); return this; } - SecurityContactImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecurityContactImpl(SecurityContactName name, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = new SecurityContactInner(); this.serviceManager = serviceManager; this.securityContactName = name; } public SecurityContact refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityContacts() - .getWithResponse(securityContactName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityContacts() + .getWithResponse(securityContactName, Context.NONE).getValue(); return this; } public SecurityContact refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSecurityContacts() - .getWithResponse(securityContactName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSecurityContacts() + .getWithResponse(securityContactName, context).getValue(); return this; } @@ -115,13 +111,18 @@ public SecurityContactImpl withPhone(String phone) { return this; } - public SecurityContactImpl withAlertNotifications(SecurityContactPropertiesAlertNotifications alertNotifications) { - this.innerModel().withAlertNotifications(alertNotifications); + public SecurityContactImpl withIsEnabled(Boolean isEnabled) { + this.innerModel().withIsEnabled(isEnabled); + return this; + } + + public SecurityContactImpl withNotificationsSources(List notificationsSources) { + this.innerModel().withNotificationsSources(notificationsSources); return this; } - public SecurityContactImpl withNotificationsByRole( - SecurityContactPropertiesNotificationsByRole notificationsByRole) { + public SecurityContactImpl + withNotificationsByRole(SecurityContactPropertiesNotificationsByRole notificationsByRole) { this.innerModel().withNotificationsByRole(notificationsByRole); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsClientImpl.java index 0e358f62e47a..ac7a1e1c0e3d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsClientImpl.java @@ -31,24 +31,31 @@ import com.azure.resourcemanager.security.fluent.SecurityContactsClient; import com.azure.resourcemanager.security.fluent.models.SecurityContactInner; import com.azure.resourcemanager.security.models.SecurityContactList; +import com.azure.resourcemanager.security.models.SecurityContactName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecurityContactsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityContactsClient. + */ public final class SecurityContactsClientImpl implements SecurityContactsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecurityContactsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecurityContactsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecurityContactsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SecurityContactsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SecurityContactsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,149 +66,109 @@ public final class SecurityContactsClientImpl implements SecurityContactsClient @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecuri") public interface SecurityContactsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("securityContactName") String securityContactName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("securityContactName") SecurityContactName securityContactName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("securityContactName") String securityContactName, - @BodyParam("application/json") SecurityContactInner securityContact, - @HeaderParam("Accept") String accept, + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("securityContactName") SecurityContactName securityContactName, + @BodyParam("application/json") SecurityContactInner securityContact, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}") - @ExpectedResponses({200, 204}) + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("securityContactName") String securityContactName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("securityContactName") SecurityContactName securityContactName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List all security contact configurations for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security contacts response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security contacts response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all security contact configurations for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security contacts response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security contacts response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all security contact configurations for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security contacts response as paginated response with {@link PagedFlux}. @@ -213,7 +180,7 @@ private PagedFlux listAsync() { /** * List all security contact configurations for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -222,13 +189,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List all security contact configurations for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security contacts response as paginated response with {@link PagedIterable}. @@ -240,7 +207,7 @@ public PagedIterable list() { /** * List all security contact configurations for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,93 +221,72 @@ public PagedIterable list(Context context) { /** * Get Default Security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return default Security contact configurations for the subscription along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String securityContactName) { + private Mono> getWithResponseAsync(SecurityContactName securityContactName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (securityContactName == null) { return Mono .error(new IllegalArgumentException("Parameter securityContactName is required and cannot be null.")); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - securityContactName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + securityContactName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get Default Security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return default Security contact configurations for the subscription along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String securityContactName, Context context) { + private Mono> getWithResponseAsync(SecurityContactName securityContactName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (securityContactName == null) { return Mono .error(new IllegalArgumentException("Parameter securityContactName is required and cannot be null.")); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - securityContactName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), securityContactName, + accept, context); } /** * Get Default Security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -348,13 +294,13 @@ private Mono> getWithResponseAsync(String securit * @return default Security contact configurations for the subscription on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String securityContactName) { + private Mono getAsync(SecurityContactName securityContactName) { return getWithResponseAsync(securityContactName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get Default Security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -363,13 +309,13 @@ private Mono getAsync(String securityContactName) { * @return default Security contact configurations for the subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String securityContactName, Context context) { + public Response getWithResponse(SecurityContactName securityContactName, Context context) { return getWithResponseAsync(securityContactName, context).block(); } /** * Get Default Security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -377,35 +323,31 @@ public Response getWithResponse(String securityContactName * @return default Security contact configurations for the subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityContactInner get(String securityContactName) { + public SecurityContactInner get(SecurityContactName securityContactName) { return getWithResponse(securityContactName, Context.NONE).getValue(); } /** * Create security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param securityContact Security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return contact details and configurations for notifications coming from Microsoft Defender for Cloud along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String securityContactName, SecurityContactInner securityContact) { + private Mono> createWithResponseAsync(SecurityContactName securityContactName, + SecurityContactInner securityContact) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (securityContactName == null) { return Mono @@ -417,26 +359,17 @@ private Mono> createWithResponseAsync( } else { securityContact.validate(); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - securityContactName, - securityContact, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), securityContactName, securityContact, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param securityContact Security contact object. * @param context The context to associate with this operation. @@ -444,22 +377,18 @@ private Mono> createWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return contact details and configurations for notifications coming from Microsoft Defender for Cloud along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String securityContactName, SecurityContactInner securityContact, Context context) { + private Mono> createWithResponseAsync(SecurityContactName securityContactName, + SecurityContactInner securityContact, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (securityContactName == null) { return Mono @@ -471,40 +400,34 @@ private Mono> createWithResponseAsync( } else { securityContact.validate(); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - securityContactName, - securityContact, - accept, - context); + return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + securityContactName, securityContact, accept, context); } /** * Create security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param securityContact Security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return contact details and configurations for notifications coming from Microsoft Defender for Cloud on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String securityContactName, SecurityContactInner securityContact) { + private Mono createAsync(SecurityContactName securityContactName, + SecurityContactInner securityContact) { return createWithResponseAsync(securityContactName, securityContact) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param securityContact Security contact object. * @param context The context to associate with this operation. @@ -512,17 +435,17 @@ private Mono createAsync(String securityContactName, Secur * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return contact details and configurations for notifications coming from Microsoft Defender for Cloud along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String securityContactName, SecurityContactInner securityContact, Context context) { + public Response createWithResponse(SecurityContactName securityContactName, + SecurityContactInner securityContact, Context context) { return createWithResponseAsync(securityContactName, securityContact, context).block(); } /** * Create security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param securityContact Security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -531,13 +454,13 @@ public Response createWithResponse( * @return contact details and configurations for notifications coming from Microsoft Defender for Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityContactInner create(String securityContactName, SecurityContactInner securityContact) { + public SecurityContactInner create(SecurityContactName securityContactName, SecurityContactInner securityContact) { return createWithResponse(securityContactName, securityContact, Context.NONE).getValue(); } /** * Delete security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -545,42 +468,30 @@ public SecurityContactInner create(String securityContactName, SecurityContactIn * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String securityContactName) { + private Mono> deleteWithResponseAsync(SecurityContactName securityContactName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (securityContactName == null) { return Mono .error(new IllegalArgumentException("Parameter securityContactName is required and cannot be null.")); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - securityContactName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), securityContactName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -589,39 +500,29 @@ private Mono> deleteWithResponseAsync(String securityContactName) * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String securityContactName, Context context) { + private Mono> deleteWithResponseAsync(SecurityContactName securityContactName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (securityContactName == null) { return Mono .error(new IllegalArgumentException("Parameter securityContactName is required and cannot be null.")); } - final String apiVersion = "2020-01-01-preview"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - securityContactName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + securityContactName, accept, context); } /** * Delete security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -629,13 +530,13 @@ private Mono> deleteWithResponseAsync(String securityContactName, * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String securityContactName) { + private Mono deleteAsync(SecurityContactName securityContactName) { return deleteWithResponseAsync(securityContactName).flatMap(ignored -> Mono.empty()); } /** * Delete security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -644,33 +545,34 @@ private Mono deleteAsync(String securityContactName) { * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String securityContactName, Context context) { + public Response deleteWithResponse(SecurityContactName securityContactName, Context context) { return deleteWithResponseAsync(securityContactName, context).block(); } /** * Delete security contact configurations for the subscription. - * + * * @param securityContactName Name of the security contact object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String securityContactName) { + public void delete(SecurityContactName securityContactName) { deleteWithResponse(securityContactName, Context.NONE); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security contacts response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security contacts response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -678,37 +580,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security contacts response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security contacts response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -716,23 +609,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsImpl.java index 913f99337779..c0f936d77aad 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityContactsImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.security.fluent.SecurityContactsClient; import com.azure.resourcemanager.security.fluent.models.SecurityContactInner; import com.azure.resourcemanager.security.models.SecurityContact; +import com.azure.resourcemanager.security.models.SecurityContactName; import com.azure.resourcemanager.security.models.SecurityContacts; public final class SecurityContactsImpl implements SecurityContacts { @@ -21,36 +22,33 @@ public final class SecurityContactsImpl implements SecurityContacts { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecurityContactsImpl( - SecurityContactsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SecurityContactsImpl(SecurityContactsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecurityContactImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityContactImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SecurityContactImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityContactImpl(inner1, this.manager())); } - public Response getWithResponse(String securityContactName, Context context) { + public Response getWithResponse(SecurityContactName securityContactName, Context context) { Response inner = this.serviceClient().getWithResponse(securityContactName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityContactImpl(inner.getValue(), this.manager())); } else { return null; } } - public SecurityContact get(String securityContactName) { + public SecurityContact get(SecurityContactName securityContactName) { SecurityContactInner inner = this.serviceClient().get(securityContactName); if (inner != null) { return new SecurityContactImpl(inner, this.manager()); @@ -59,63 +57,51 @@ public SecurityContact get(String securityContactName) { } } - public Response deleteWithResponse(String securityContactName, Context context) { + public Response deleteWithResponse(SecurityContactName securityContactName, Context context) { return this.serviceClient().deleteWithResponse(securityContactName, context); } - public void delete(String securityContactName) { + public void delete(SecurityContactName securityContactName) { this.serviceClient().delete(securityContactName); } public SecurityContact getById(String id) { - String securityContactName = Utils.getValueFromIdByName(id, "securityContacts"); - if (securityContactName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); + String securityContactNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "securityContacts"); + if (securityContactNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); } + SecurityContactName securityContactName = SecurityContactName.fromString(securityContactNameLocal); return this.getWithResponse(securityContactName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String securityContactName = Utils.getValueFromIdByName(id, "securityContacts"); - if (securityContactName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); + String securityContactNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "securityContacts"); + if (securityContactNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); } + SecurityContactName securityContactName = SecurityContactName.fromString(securityContactNameLocal); return this.getWithResponse(securityContactName, context); } public void deleteById(String id) { - String securityContactName = Utils.getValueFromIdByName(id, "securityContacts"); - if (securityContactName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); + String securityContactNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "securityContacts"); + if (securityContactNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); } + SecurityContactName securityContactName = SecurityContactName.fromString(securityContactNameLocal); this.deleteWithResponse(securityContactName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String securityContactName = Utils.getValueFromIdByName(id, "securityContacts"); - if (securityContactName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); + String securityContactNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "securityContacts"); + if (securityContactNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securityContacts'.", id))); } + SecurityContactName securityContactName = SecurityContactName.fromString(securityContactNameLocal); return this.deleteWithResponse(securityContactName, context); } @@ -127,7 +113,7 @@ private com.azure.resourcemanager.security.SecurityManager manager() { return this.serviceManager; } - public SecurityContactImpl define(String name) { + public SecurityContactImpl define(SecurityContactName name) { return new SecurityContactImpl(name, this.manager()); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorImpl.java index 3564896ce8d3..8b47bb003823 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorImpl.java @@ -13,8 +13,8 @@ public final class SecurityOperatorImpl implements SecurityOperator { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecurityOperatorImpl( - SecurityOperatorInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecurityOperatorImpl(SecurityOperatorInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorListImpl.java index 7298243843b0..9d6080621094 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorListImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorListImpl.java @@ -17,8 +17,8 @@ public final class SecurityOperatorListImpl implements SecurityOperatorList { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecurityOperatorListImpl( - SecurityOperatorListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecurityOperatorListImpl(SecurityOperatorListInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -26,12 +26,8 @@ public final class SecurityOperatorListImpl implements SecurityOperatorList { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new SecurityOperatorImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new SecurityOperatorImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsClientImpl.java index cf7c403898ff..a21e42d06572 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsClientImpl.java @@ -28,22 +28,28 @@ import com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecurityOperatorsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecurityOperatorsClient. + */ public final class SecurityOperatorsClientImpl implements SecurityOperatorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecurityOperatorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecurityOperatorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecurityOperatorsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SecurityOperatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SecurityOperatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -54,64 +60,47 @@ public final class SecurityOperatorsClientImpl implements SecurityOperatorsClien @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecuri") public interface SecurityOperatorsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("pricingName") String pricingName, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("pricingName") String pricingName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("pricingName") String pricingName, - @PathParam("securityOperatorName") String securityOperatorName, - @HeaderParam("Accept") String accept, + @PathParam("securityOperatorName") String securityOperatorName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("pricingName") String pricingName, - @PathParam("securityOperatorName") String securityOperatorName, - @HeaderParam("Accept") String accept, + @PathParam("securityOperatorName") String securityOperatorName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("pricingName") String pricingName, - @PathParam("securityOperatorName") String securityOperatorName, - @HeaderParam("Accept") String accept, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("pricingName") String pricingName, + @PathParam("securityOperatorName") String securityOperatorName, @HeaderParam("Accept") String accept, Context context); } /** * Lists Microsoft Defender for Cloud securityOperators in the subscription. - * + * * @param pricingName name of the pricing configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -121,16 +110,12 @@ Mono> delete( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String pricingName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -138,22 +123,14 @@ private Mono> listWithResponseAsync(String p final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + pricingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists Microsoft Defender for Cloud securityOperators in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,16 +141,12 @@ private Mono> listWithResponseAsync(String p @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String pricingName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -181,13 +154,13 @@ private Mono> listWithResponseAsync(String p final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), pricingName, accept, context); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), pricingName, accept, + context); } /** * Lists Microsoft Defender for Cloud securityOperators in the subscription. - * + * * @param pricingName name of the pricing configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -201,7 +174,7 @@ private Mono listAsync(String pricingName) { /** * Lists Microsoft Defender for Cloud securityOperators in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -216,7 +189,7 @@ public Response listWithResponse(String pricingName, /** * Lists Microsoft Defender for Cloud securityOperators in the subscription. - * + * * @param pricingName name of the pricing configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -230,29 +203,25 @@ public SecurityOperatorListInner list(String pricingName) { /** * Get a specific security operator for the requested scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific security operator for the requested scope along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String pricingName, String securityOperatorName) { + private Mono> getWithResponseAsync(String pricingName, + String securityOperatorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -264,23 +233,14 @@ private Mono> getWithResponseAsync( final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - securityOperatorName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + pricingName, securityOperatorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a specific security operator for the requested scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -288,22 +248,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific security operator for the requested scope along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String pricingName, String securityOperatorName, Context context) { + private Mono> getWithResponseAsync(String pricingName, String securityOperatorName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -315,20 +271,13 @@ private Mono> getWithResponseAsync( final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - securityOperatorName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), pricingName, + securityOperatorName, accept, context); } /** * Get a specific security operator for the requested scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -343,7 +292,7 @@ private Mono getAsync(String pricingName, String security /** * Get a specific security operator for the requested scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -353,14 +302,14 @@ private Mono getAsync(String pricingName, String security * @return a specific security operator for the requested scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String pricingName, String securityOperatorName, Context context) { + public Response getWithResponse(String pricingName, String securityOperatorName, + Context context) { return getWithResponseAsync(pricingName, securityOperatorName, context).block(); } /** * Get a specific security operator for the requested scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -375,29 +324,25 @@ public SecurityOperatorInner get(String pricingName, String securityOperatorName /** * Creates Microsoft Defender for Cloud security operator on the given scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security operator under a given subscription and pricing along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String pricingName, String securityOperatorName) { + private Mono> createOrUpdateWithResponseAsync(String pricingName, + String securityOperatorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -409,23 +354,14 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - securityOperatorName, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), pricingName, securityOperatorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates Microsoft Defender for Cloud security operator on the given scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -433,22 +369,18 @@ private Mono> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security operator under a given subscription and pricing along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String pricingName, String securityOperatorName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String pricingName, + String securityOperatorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -460,20 +392,13 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - securityOperatorName, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + pricingName, securityOperatorName, accept, context); } /** * Creates Microsoft Defender for Cloud security operator on the given scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -489,7 +414,7 @@ private Mono createOrUpdateAsync(String pricingName, Stri /** * Creates Microsoft Defender for Cloud security operator on the given scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -499,14 +424,14 @@ private Mono createOrUpdateAsync(String pricingName, Stri * @return security operator under a given subscription and pricing along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String pricingName, String securityOperatorName, Context context) { + public Response createOrUpdateWithResponse(String pricingName, String securityOperatorName, + Context context) { return createOrUpdateWithResponseAsync(pricingName, securityOperatorName, context).block(); } /** * Creates Microsoft Defender for Cloud security operator on the given scope. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -521,7 +446,7 @@ public SecurityOperatorInner createOrUpdate(String pricingName, String securityO /** * Delete Microsoft Defender for Cloud securityOperator in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -532,16 +457,12 @@ public SecurityOperatorInner createOrUpdate(String pricingName, String securityO @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String pricingName, String securityOperatorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -553,23 +474,14 @@ private Mono> deleteWithResponseAsync(String pricingName, String final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - securityOperatorName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), pricingName, securityOperatorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete Microsoft Defender for Cloud securityOperator in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -579,19 +491,15 @@ private Mono> deleteWithResponseAsync(String pricingName, String * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String pricingName, String securityOperatorName, Context context) { + private Mono> deleteWithResponseAsync(String pricingName, String securityOperatorName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (pricingName == null) { return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null.")); @@ -603,20 +511,13 @@ private Mono> deleteWithResponseAsync( final String apiVersion = "2023-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - pricingName, - securityOperatorName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), pricingName, + securityOperatorName, accept, context); } /** * Delete Microsoft Defender for Cloud securityOperator in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -631,7 +532,7 @@ private Mono deleteAsync(String pricingName, String securityOperatorName) /** * Delete Microsoft Defender for Cloud securityOperator in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @param context The context to associate with this operation. @@ -647,7 +548,7 @@ public Response deleteWithResponse(String pricingName, String securityOper /** * Delete Microsoft Defender for Cloud securityOperator in the subscription. - * + * * @param pricingName name of the pricing configuration. * @param securityOperatorName name of the securityOperator. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsImpl.java index 57bc55c28211..e5d70025bc58 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsImpl.java @@ -22,8 +22,8 @@ public final class SecurityOperatorsImpl implements SecurityOperators { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecurityOperatorsImpl( - SecurityOperatorsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SecurityOperatorsImpl(SecurityOperatorsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -31,10 +31,7 @@ public SecurityOperatorsImpl( public Response listWithResponse(String pricingName, Context context) { Response inner = this.serviceClient().listWithResponse(pricingName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityOperatorListImpl(inner.getValue(), this.manager())); } else { return null; @@ -50,15 +47,12 @@ public SecurityOperatorList list(String pricingName) { } } - public Response getWithResponse( - String pricingName, String securityOperatorName, Context context) { - Response inner = - this.serviceClient().getWithResponse(pricingName, securityOperatorName, context); + public Response getWithResponse(String pricingName, String securityOperatorName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(pricingName, securityOperatorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityOperatorImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,15 +68,12 @@ public SecurityOperator get(String pricingName, String securityOperatorName) { } } - public Response createOrUpdateWithResponse( - String pricingName, String securityOperatorName, Context context) { - Response inner = - this.serviceClient().createOrUpdateWithResponse(pricingName, securityOperatorName, context); + public Response createOrUpdateWithResponse(String pricingName, String securityOperatorName, + Context context) { + Response inner + = this.serviceClient().createOrUpdateWithResponse(pricingName, securityOperatorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityOperatorImpl(inner.getValue(), this.manager())); } else { return null; @@ -98,8 +89,8 @@ public SecurityOperator createOrUpdate(String pricingName, String securityOperat } } - public Response deleteByResourceGroupWithResponse( - String pricingName, String securityOperatorName, Context context) { + public Response deleteByResourceGroupWithResponse(String pricingName, String securityOperatorName, + Context context) { return this.serviceClient().deleteWithResponse(pricingName, securityOperatorName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionImpl.java index daa171b42ba6..a62297af1298 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionImpl.java @@ -14,8 +14,8 @@ public final class SecuritySolutionImpl implements SecuritySolution { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecuritySolutionImpl( - SecuritySolutionInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecuritySolutionImpl(SecuritySolutionInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsClientImpl.java index 844b5caf9c4c..5f6beef104c4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.SecuritySolutionList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecuritySolutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in SecuritySolutionsClient. + */ public final class SecuritySolutionsClientImpl implements SecuritySolutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecuritySolutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecuritySolutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecuritySolutionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SecuritySolutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SecuritySolutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,127 +62,91 @@ public final class SecuritySolutionsClientImpl implements SecuritySolutionsClien @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecuri") public interface SecuritySolutionsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/securitySolutions") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/securitySolutions/{securitySolutionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/securitySolutions/{securitySolutionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("securitySolutionName") String securitySolutionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Security Solutions for the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Security Solutions for the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Security Solutions for the subscription as paginated response with {@link PagedFlux}. @@ -188,7 +158,7 @@ private PagedFlux listAsync() { /** * Gets a list of Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -197,13 +167,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Security Solutions for the subscription as paginated response with {@link PagedIterable}. @@ -215,7 +185,7 @@ public PagedIterable list() { /** * Gets a list of Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -229,11 +199,11 @@ public PagedIterable list(Context context) { /** * Gets a specific Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param securitySolutionName Name of security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -241,19 +211,15 @@ public PagedIterable list(Context context) { * @return a specific Security Solution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String securitySolutionName) { + private Mono> getWithResponseAsync(String resourceGroupName, String ascLocation, + String securitySolutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -269,28 +235,18 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - securitySolutionName, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, securitySolutionName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param securitySolutionName Name of security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -299,19 +255,15 @@ private Mono> getWithResponseAsync( * @return a specific Security Solution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String securitySolutionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String ascLocation, + String securitySolutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -327,25 +279,17 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - securitySolutionName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, ascLocation, + securitySolutionName, apiVersion, accept, context); } /** * Gets a specific Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param securitySolutionName Name of security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -353,19 +297,19 @@ private Mono> getWithResponseAsync( * @return a specific Security Solution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String ascLocation, String securitySolutionName) { + private Mono getAsync(String resourceGroupName, String ascLocation, + String securitySolutionName) { return getWithResponseAsync(resourceGroupName, ascLocation, securitySolutionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a specific Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param securitySolutionName Name of security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,18 +318,18 @@ private Mono getAsync( * @return a specific Security Solution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ascLocation, String securitySolutionName, Context context) { + public Response getWithResponse(String resourceGroupName, String ascLocation, + String securitySolutionName, Context context) { return getWithResponseAsync(resourceGroupName, ascLocation, securitySolutionName, context).block(); } /** * Gets a specific Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param securitySolutionName Name of security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -399,9 +343,10 @@ public SecuritySolutionInner get(String resourceGroupName, String ascLocation, S /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -413,31 +358,22 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -450,23 +386,13 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsImpl.java index de0c90a619d3..d62f6a016422 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsImpl.java @@ -21,31 +21,28 @@ public final class SecuritySolutionsImpl implements SecuritySolutions { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecuritySolutionsImpl( - SecuritySolutionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SecuritySolutionsImpl(SecuritySolutionsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySolutionImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SecuritySolutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySolutionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String ascLocation, String securitySolutionName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, ascLocation, securitySolutionName, context); + public Response getWithResponse(String resourceGroupName, String ascLocation, + String securitySolutionName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, ascLocation, securitySolutionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecuritySolutionImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDataListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDataListImpl.java index 0e961ffe1342..ba50dde128ad 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDataListImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDataListImpl.java @@ -15,8 +15,7 @@ public final class SecuritySolutionsReferenceDataListImpl implements SecuritySol private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecuritySolutionsReferenceDataListImpl( - SecuritySolutionsReferenceDataListInner innerObject, + SecuritySolutionsReferenceDataListImpl(SecuritySolutionsReferenceDataListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasClientImpl.java index 55a07eae1bac..ac2034e999fa 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasClientImpl.java @@ -25,116 +25,100 @@ import com.azure.resourcemanager.security.fluent.models.SecuritySolutionsReferenceDataListInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SecuritySolutionsReferenceDatasClient. */ +/** + * An instance of this class provides access to all the operations defined in SecuritySolutionsReferenceDatasClient. + */ public final class SecuritySolutionsReferenceDatasClientImpl implements SecuritySolutionsReferenceDatasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SecuritySolutionsReferenceDatasService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SecuritySolutionsReferenceDatasClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SecuritySolutionsReferenceDatasClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - SecuritySolutionsReferenceDatasService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(SecuritySolutionsReferenceDatasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterSecuritySolutionsReferenceDatas to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for SecurityCenterSecuritySolutionsReferenceDatas to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterSecuri") public interface SecuritySolutionsReferenceDatasService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/securitySolutionsReferenceData") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/securitySolutionsReferenceData") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/securitySolutionsReferenceData") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHomeRegion( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHomeRegion(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of all supported Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all supported Security Solutions for the subscription along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of all supported Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all supported Security Solutions for the subscription along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; @@ -144,7 +128,7 @@ private Mono> listWithResponse /** * Gets a list of all supported Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all supported Security Solutions for the subscription on successful completion of {@link Mono}. @@ -156,7 +140,7 @@ private Mono listAsync() { /** * Gets a list of all supported Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -170,7 +154,7 @@ public Response listWithResponse(Contex /** * Gets a list of all supported Security Solutions for the subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all supported Security Solutions for the subscription. @@ -182,29 +166,25 @@ public SecuritySolutionsReferenceDataListInner list() { /** * Gets list of all supported Security Solutions for subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all supported Security Solutions for subscription and location along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionWithResponseAsync( - String ascLocation) { + private Mono> + listByHomeRegionWithResponseAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -212,45 +192,33 @@ private Mono> listByHomeRegion final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHomeRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - apiVersion, - accept, - context)) + .withContext(context -> service.listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), + ascLocation, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets list of all supported Security Solutions for subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all supported Security Solutions for subscription and location along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionWithResponseAsync( - String ascLocation, Context context) { + private Mono> + listByHomeRegionWithResponseAsync(String ascLocation, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -258,21 +226,20 @@ private Mono> listByHomeRegion final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHomeRegion( - this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, accept, context); + return service.listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, + apiVersion, accept, context); } /** * Gets list of all supported Security Solutions for subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all supported Security Solutions for subscription and location on successful completion of {@link - * Mono}. + * @return list of all supported Security Solutions for subscription and location on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listByHomeRegionAsync(String ascLocation) { @@ -281,9 +248,9 @@ private Mono listByHomeRegionAsync(Stri /** * Gets list of all supported Security Solutions for subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -291,16 +258,16 @@ private Mono listByHomeRegionAsync(Stri * @return list of all supported Security Solutions for subscription and location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listByHomeRegionWithResponse( - String ascLocation, Context context) { + public Response listByHomeRegionWithResponse(String ascLocation, + Context context) { return listByHomeRegionWithResponseAsync(ascLocation, context).block(); } /** * Gets list of all supported Security Solutions for subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasImpl.java index f3c696de64ae..34d947eb2a2d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySolutionsReferenceDatasImpl.java @@ -20,8 +20,7 @@ public final class SecuritySolutionsReferenceDatasImpl implements SecuritySoluti private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SecuritySolutionsReferenceDatasImpl( - SecuritySolutionsReferenceDatasClient innerClient, + public SecuritySolutionsReferenceDatasImpl(SecuritySolutionsReferenceDatasClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,10 +29,7 @@ public SecuritySolutionsReferenceDatasImpl( public Response listWithResponse(Context context) { Response inner = this.serviceClient().listWithResponse(context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecuritySolutionsReferenceDataListImpl(inner.getValue(), this.manager())); } else { return null; @@ -49,15 +45,12 @@ public SecuritySolutionsReferenceDataList list() { } } - public Response listByHomeRegionWithResponse( - String ascLocation, Context context) { - Response inner = - this.serviceClient().listByHomeRegionWithResponse(ascLocation, context); + public Response listByHomeRegionWithResponse(String ascLocation, + Context context) { + Response inner + = this.serviceClient().listByHomeRegionWithResponse(ascLocation, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecuritySolutionsReferenceDataListImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySubAssessmentImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySubAssessmentImpl.java index 3fb497b072b7..b3497d8c02b1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySubAssessmentImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecuritySubAssessmentImpl.java @@ -16,8 +16,8 @@ public final class SecuritySubAssessmentImpl implements SecuritySubAssessment { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - SecuritySubAssessmentImpl( - SecuritySubAssessmentInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + SecuritySubAssessmentImpl(SecuritySubAssessmentInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsClientImpl.java new file mode 100644 index 000000000000..0a8579a56621 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsClientImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.SensitivitySettingsClient; +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SensitivitySettingsClient. + */ +public final class SensitivitySettingsClientImpl implements SensitivitySettingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SensitivitySettingsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of SensitivitySettingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SensitivitySettingsClientImpl(SecurityCenterImpl client) { + this.service = RestProxy.create(SensitivitySettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterSensitivitySettings to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterSensit") + public interface SensitivitySettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Security/sensitivitySettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list with a single sensitivity settings resource. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list with a single sensitivity settings resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2023-02-15-preview"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list with a single sensitivity settings resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list with a single sensitivity settings resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2023-02-15-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), apiVersion, accept, context); + } + + /** + * Gets a list with a single sensitivity settings resource. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list with a single sensitivity settings resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync() { + return listWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list with a single sensitivity settings resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list with a single sensitivity settings resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(Context context) { + return listWithResponseAsync(context).block(); + } + + /** + * Gets a list with a single sensitivity settings resource. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list with a single sensitivity settings resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GetSensitivitySettingsListResponseInner list() { + return listWithResponse(Context.NONE).getValue(); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsImpl.java new file mode 100644 index 000000000000..385d882247ae --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SensitivitySettingsImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.SensitivitySettingsClient; +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner; +import com.azure.resourcemanager.security.models.GetSensitivitySettingsListResponse; +import com.azure.resourcemanager.security.models.SensitivitySettings; + +public final class SensitivitySettingsImpl implements SensitivitySettings { + private static final ClientLogger LOGGER = new ClientLogger(SensitivitySettingsImpl.class); + + private final SensitivitySettingsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public SensitivitySettingsImpl(SensitivitySettingsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse(Context context) { + Response inner = this.serviceClient().listWithResponse(context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GetSensitivitySettingsListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GetSensitivitySettingsListResponse list() { + GetSensitivitySettingsListResponseInner inner = this.serviceClient().list(); + if (inner != null) { + return new GetSensitivitySettingsListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private SensitivitySettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentImpl.java index f12420391d62..f3a42ff3a40a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentImpl.java @@ -13,8 +13,7 @@ public final class ServerVulnerabilityAssessmentImpl implements ServerVulnerabil private final com.azure.resourcemanager.security.SecurityManager serviceManager; - ServerVulnerabilityAssessmentImpl( - ServerVulnerabilityAssessmentInner innerObject, + ServerVulnerabilityAssessmentImpl(ServerVulnerabilityAssessmentInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsClientImpl.java index b84a55fa6e48..e27cdff5f0ec 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsClientImpl.java @@ -33,26 +33,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. + */ public final class ServerVulnerabilityAssessmentsClientImpl implements ServerVulnerabilityAssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerVulnerabilityAssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of ServerVulnerabilityAssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerVulnerabilityAssessmentsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - ServerVulnerabilityAssessmentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ServerVulnerabilityAssessmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,102 +65,78 @@ public final class ServerVulnerabilityAssessmentsClientImpl implements ServerVul @Host("{$host}") @ServiceInterface(name = "SecurityCenterServer") public interface ServerVulnerabilityAssessmentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByExtendedResource( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}") - @ExpectedResponses({200}) + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, + @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, @PathParam("resourceName") String resourceName, @PathParam("serverVulnerabilityAssessment") String serverVulnerabilityAssessment, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}") - @ExpectedResponses({202}) + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, @PathParam("resourceName") String resourceName, @PathParam("serverVulnerabilityAssessment") String serverVulnerabilityAssessment, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}") - @ExpectedResponses({200, 202, 204}) + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, @PathParam("resourceName") String resourceName, @PathParam("serverVulnerabilityAssessment") String serverVulnerabilityAssessment, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server vulnerability assessment onboarding statuses on a given resource along with {@link - * Response} on successful completion of {@link Mono}. + * @return a list of server vulnerability assessment onboarding statuses on a given resource along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByExtendedResourceWithResponseAsync( String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -178,26 +156,16 @@ private Mono> listByExtendedRe final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByExtendedResource( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - apiVersion, - accept, - context)) + context -> service.listByExtendedResource(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -205,23 +173,19 @@ private Mono> listByExtendedRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server vulnerability assessment onboarding statuses on a given resource along with {@link - * Response} on successful completion of {@link Mono}. + * @return a list of server vulnerability assessment onboarding statuses on a given resource along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByExtendedResourceWithResponseAsync( String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -240,24 +204,15 @@ private Mono> listByExtendedRe final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByExtendedResource( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - apiVersion, - accept, - context); + return service.listByExtendedResource(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, apiVersion, accept, context); } /** * Gets a list of server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -265,20 +220,20 @@ private Mono> listByExtendedRe * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server vulnerability assessment onboarding statuses on a given resource on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listByExtendedResourceAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + private Mono listByExtendedResourceAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { return listByExtendedResourceWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a list of server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -286,22 +241,21 @@ private Mono listByExtendedResourceAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server vulnerability assessment onboarding statuses on a given resource along with {@link - * Response}. + * @return a list of server vulnerability assessment onboarding statuses on a given resource along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listByExtendedResourceWithResponse( String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - return listByExtendedResourceWithResponseAsync( - resourceGroupName, resourceNamespace, resourceType, resourceName, context) - .block(); + return listByExtendedResourceWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + context).block(); } /** * Gets a list of server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -311,18 +265,17 @@ public Response listByExtendedResourceW * @return a list of server vulnerability assessment onboarding statuses on a given resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerVulnerabilityAssessmentsListInner listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - return listByExtendedResourceWithResponse( - resourceGroupName, resourceNamespace, resourceType, resourceName, Context.NONE) - .getValue(); + public ServerVulnerabilityAssessmentsListInner listByExtendedResource(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { + return listByExtendedResourceWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, + Context.NONE).getValue(); } /** * Gets a server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -330,22 +283,18 @@ public ServerVulnerabilityAssessmentsListInner listByExtendedResource( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server vulnerability assessment onboarding statuses on a given resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -365,28 +314,17 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - serverVulnerabilityAssessment, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, serverVulnerabilityAssessment, + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -395,22 +333,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server vulnerability assessment onboarding statuses on a given resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -430,25 +364,15 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - serverVulnerabilityAssessment, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, serverVulnerabilityAssessment, apiVersion, accept, context); } /** * Gets a server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -456,20 +380,20 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server vulnerability assessment onboarding statuses on a given resource on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + private Mono getAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { return getWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -480,16 +404,16 @@ private Mono getAsync( * @return a server vulnerability assessment onboarding statuses on a given resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + public Response getWithResponse(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { return getWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context).block(); } /** * Gets a server vulnerability assessment onboarding statuses on a given resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -499,8 +423,8 @@ public Response getWithResponse( * @return a server vulnerability assessment onboarding statuses on a given resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerVulnerabilityAssessmentInner get( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + public ServerVulnerabilityAssessmentInner get(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { return getWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, Context.NONE) .getValue(); } @@ -508,9 +432,9 @@ public ServerVulnerabilityAssessmentInner get( /** * Creating a server vulnerability assessment on a resource, which will onboard a resource for having a * vulnerability assessment on it. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -518,22 +442,18 @@ public ServerVulnerabilityAssessmentInner get( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the server vulnerability assessment details on a resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -553,29 +473,18 @@ private Mono> createOrUpdateWithRes final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - serverVulnerabilityAssessment, - apiVersion, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, serverVulnerabilityAssessment, + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creating a server vulnerability assessment on a resource, which will onboard a resource for having a * vulnerability assessment on it. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -584,22 +493,18 @@ private Mono> createOrUpdateWithRes * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the server vulnerability assessment details on a resource along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -619,38 +524,28 @@ private Mono> createOrUpdateWithRes final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - serverVulnerabilityAssessment, - apiVersion, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, serverVulnerabilityAssessment, apiVersion, accept, context); } /** * Creating a server vulnerability assessment on a resource, which will onboard a resource for having a * vulnerability assessment on it. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the server vulnerability assessment details on a resource on successful completion of {@link - * Mono}. + * @return describes the server vulnerability assessment details on a resource on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + private Mono createOrUpdateAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { return createOrUpdateWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -658,9 +553,9 @@ private Mono createOrUpdateAsync( /** * Creating a server vulnerability assessment on a resource, which will onboard a resource for having a * vulnerability assessment on it. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -671,19 +566,18 @@ private Mono createOrUpdateAsync( * @return describes the server vulnerability assessment details on a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, resourceNamespace, resourceType, resourceName, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, + context).block(); } /** * Creating a server vulnerability assessment on a resource, which will onboard a resource for having a * vulnerability assessment on it. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -693,18 +587,17 @@ public Response createOrUpdateWithResponse( * @return describes the server vulnerability assessment details on a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - return createOrUpdateWithResponse( - resourceGroupName, resourceNamespace, resourceType, resourceName, Context.NONE) - .getValue(); + public ServerVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { + return createOrUpdateWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, + Context.NONE).getValue(); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -714,19 +607,15 @@ public ServerVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -746,28 +635,17 @@ private Mono>> deleteWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - serverVulnerabilityAssessment, - apiVersion, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, serverVulnerabilityAssessment, + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -778,19 +656,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -810,25 +684,15 @@ private Mono>> deleteWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - serverVulnerabilityAssessment, - apiVersion, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, serverVulnerabilityAssessment, apiVersion, accept, context); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -838,21 +702,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -863,21 +725,20 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -887,16 +748,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { return this.beginDeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName).getSyncPoller(); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -907,18 +768,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context) .getSyncPoller(); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -928,18 +788,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - return beginDeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName) - .last() + private Mono deleteAsync(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName) { + return beginDeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -950,18 +809,17 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, Context context) { + return beginDeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -976,9 +834,9 @@ public void delete(String resourceGroupName, String resourceNamespace, String re /** * Removing server vulnerability assessment from a resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -988,8 +846,8 @@ public void delete(String resourceGroupName, String resourceNamespace, String re * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + public void delete(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + Context context) { deleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context).block(); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsImpl.java index 2538bf7d5ba3..b2ef7622b94e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsImpl.java @@ -22,37 +22,29 @@ public final class ServerVulnerabilityAssessmentsImpl implements ServerVulnerabi private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public ServerVulnerabilityAssessmentsImpl( - ServerVulnerabilityAssessmentsClient innerClient, + public ServerVulnerabilityAssessmentsImpl(ServerVulnerabilityAssessmentsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response listByExtendedResourceWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - Response inner = - this - .serviceClient() - .listByExtendedResourceWithResponse( - resourceGroupName, resourceNamespace, resourceType, resourceName, context); + public Response listByExtendedResourceWithResponse(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { + Response inner + = this.serviceClient().listByExtendedResourceWithResponse(resourceGroupName, resourceNamespace, + resourceType, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ServerVulnerabilityAssessmentsListImpl(inner.getValue(), this.manager())); } else { return null; } } - public ServerVulnerabilityAssessmentsList listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - ServerVulnerabilityAssessmentsListInner inner = - this - .serviceClient() - .listByExtendedResource(resourceGroupName, resourceNamespace, resourceType, resourceName); + public ServerVulnerabilityAssessmentsList listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { + ServerVulnerabilityAssessmentsListInner inner = this.serviceClient().listByExtendedResource(resourceGroupName, + resourceNamespace, resourceType, resourceName); if (inner != null) { return new ServerVulnerabilityAssessmentsListImpl(inner, this.manager()); } else { @@ -60,27 +52,22 @@ public ServerVulnerabilityAssessmentsList listByExtendedResource( } } - public Response getWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, context); + public Response getWithResponse(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + resourceNamespace, resourceType, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ServerVulnerabilityAssessmentImpl(inner.getValue(), this.manager())); } else { return null; } } - public ServerVulnerabilityAssessment get( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - ServerVulnerabilityAssessmentInner inner = - this.serviceClient().get(resourceGroupName, resourceNamespace, resourceType, resourceName); + public ServerVulnerabilityAssessment get(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName) { + ServerVulnerabilityAssessmentInner inner + = this.serviceClient().get(resourceGroupName, resourceNamespace, resourceType, resourceName); if (inner != null) { return new ServerVulnerabilityAssessmentImpl(inner, this.manager()); } else { @@ -88,27 +75,22 @@ public ServerVulnerabilityAssessment get( } } - public Response createOrUpdateWithResponse( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, context); + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { + Response inner = this.serviceClient() + .createOrUpdateWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ServerVulnerabilityAssessmentImpl(inner.getValue(), this.manager())); } else { return null; } } - public ServerVulnerabilityAssessment createOrUpdate( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - ServerVulnerabilityAssessmentInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, resourceNamespace, resourceType, resourceName); + public ServerVulnerabilityAssessment createOrUpdate(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { + ServerVulnerabilityAssessmentInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, resourceNamespace, resourceType, resourceName); if (inner != null) { return new ServerVulnerabilityAssessmentImpl(inner, this.manager()); } else { @@ -120,8 +102,8 @@ public void delete(String resourceGroupName, String resourceNamespace, String re this.serviceClient().delete(resourceGroupName, resourceNamespace, resourceType, resourceName); } - public void delete( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + public void delete(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + Context context) { this.serviceClient().delete(resourceGroupName, resourceNamespace, resourceType, resourceName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsListImpl.java index cc84ed836c77..df3243ae4035 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsListImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsListImpl.java @@ -17,8 +17,7 @@ public final class ServerVulnerabilityAssessmentsListImpl implements ServerVulne private final com.azure.resourcemanager.security.SecurityManager serviceManager; - ServerVulnerabilityAssessmentsListImpl( - ServerVulnerabilityAssessmentsListInner innerObject, + ServerVulnerabilityAssessmentsListImpl(ServerVulnerabilityAssessmentsListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,12 +26,9 @@ public final class ServerVulnerabilityAssessmentsListImpl implements ServerVulne public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ServerVulnerabilityAssessmentImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new ServerVulnerabilityAssessmentImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingImpl.java new file mode 100644 index 000000000000..9d1a9e1f831e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentsSettingInner; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSetting; + +public final class ServerVulnerabilityAssessmentsSettingImpl implements ServerVulnerabilityAssessmentsSetting { + private ServerVulnerabilityAssessmentsSettingInner innerObject; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + ServerVulnerabilityAssessmentsSettingImpl(ServerVulnerabilityAssessmentsSettingInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ServerVulnerabilityAssessmentsSettingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsClientImpl.java new file mode 100644 index 000000000000..d8fa6ee01d08 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsClientImpl.java @@ -0,0 +1,641 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.security.fluent.ServerVulnerabilityAssessmentsSettingsClient; +import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentsSettingInner; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettingKindName; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettingsList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * ServerVulnerabilityAssessmentsSettingsClient. + */ +public final class ServerVulnerabilityAssessmentsSettingsClientImpl + implements ServerVulnerabilityAssessmentsSettingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ServerVulnerabilityAssessmentsSettingsService service; + + /** + * The service client containing this operation class. + */ + private final SecurityCenterImpl client; + + /** + * Initializes an instance of ServerVulnerabilityAssessmentsSettingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServerVulnerabilityAssessmentsSettingsClientImpl(SecurityCenterImpl client) { + this.service = RestProxy.create(ServerVulnerabilityAssessmentsSettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityCenterServerVulnerabilityAssessmentsSettings to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityCenterServer") + public interface ServerVulnerabilityAssessmentsSettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/{settingKind}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("settingKind") ServerVulnerabilityAssessmentsSettingKindName settingKind, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/{settingKind}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("settingKind") ServerVulnerabilityAssessmentsSettingKindName settingKind, + @BodyParam("application/json") ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/{settingKind}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("settingKind") ServerVulnerabilityAssessmentsSettingKindName settingKind, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Get a list of all the server vulnerability assessments settings over a subscription level scope. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all the server vulnerability assessments settings over a subscription level scope as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a server vulnerability assessments setting of the requested kind, that is set on the subscription along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getWithResponseAsync(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (settingKind == null) { + return Mono.error(new IllegalArgumentException("Parameter settingKind is required and cannot be null.")); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + settingKind, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a server vulnerability assessments setting of the requested kind, that is set on the subscription along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getWithResponseAsync(ServerVulnerabilityAssessmentsSettingKindName settingKind, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (settingKind == null) { + return Mono.error(new IllegalArgumentException("Parameter settingKind is required and cannot be null.")); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingKind, accept, + context); + } + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a server vulnerability assessments setting of the requested kind, that is set on the subscription on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + getAsync(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + return getWithResponseAsync(settingKind).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a server vulnerability assessments setting of the requested kind, that is set on the subscription along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getWithResponse(ServerVulnerabilityAssessmentsSettingKindName settingKind, Context context) { + return getWithResponseAsync(settingKind, context).block(); + } + + /** + * Get a server vulnerability assessments setting of the requested kind, that is set on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a server vulnerability assessments setting of the requested kind, that is set on the subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerVulnerabilityAssessmentsSettingInner get(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + return getWithResponse(settingKind, Context.NONE).getValue(); + } + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a predefined scope. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a base vulnerability assessments setting on servers in the defined scope along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (settingKind == null) { + return Mono.error(new IllegalArgumentException("Parameter settingKind is required and cannot be null.")); + } + if (serverVulnerabilityAssessmentsSetting == null) { + return Mono.error(new IllegalArgumentException( + "Parameter serverVulnerabilityAssessmentsSetting is required and cannot be null.")); + } else { + serverVulnerabilityAssessmentsSetting.validate(); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), settingKind, serverVulnerabilityAssessmentsSetting, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a predefined scope. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a base vulnerability assessments setting on servers in the defined scope along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (settingKind == null) { + return Mono.error(new IllegalArgumentException("Parameter settingKind is required and cannot be null.")); + } + if (serverVulnerabilityAssessmentsSetting == null) { + return Mono.error(new IllegalArgumentException( + "Parameter serverVulnerabilityAssessmentsSetting is required and cannot be null.")); + } else { + serverVulnerabilityAssessmentsSetting.validate(); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + settingKind, serverVulnerabilityAssessmentsSetting, accept, context); + } + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a predefined scope. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a base vulnerability assessments setting on servers in the defined scope on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting) { + return createOrUpdateWithResponseAsync(settingKind, serverVulnerabilityAssessmentsSetting) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a predefined scope. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a base vulnerability assessments setting on servers in the defined scope along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting, Context context) { + return createOrUpdateWithResponseAsync(settingKind, serverVulnerabilityAssessmentsSetting, context).block(); + } + + /** + * Create or update a server vulnerability assessments setting of the requested kind on the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param serverVulnerabilityAssessmentsSetting A server vulnerability assessments setting over a predefined scope. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a base vulnerability assessments setting on servers in the defined scope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerVulnerabilityAssessmentsSettingInner createOrUpdate( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting) { + return createOrUpdateWithResponse(settingKind, serverVulnerabilityAssessmentsSetting, Context.NONE).getValue(); + } + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (settingKind == null) { + return Mono.error(new IllegalArgumentException("Parameter settingKind is required and cannot be null.")); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), settingKind, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(ServerVulnerabilityAssessmentsSettingKindName settingKind, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (settingKind == null) { + return Mono.error(new IllegalArgumentException("Parameter settingKind is required and cannot be null.")); + } + final String apiVersion = "2023-05-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingKind, + accept, context); + } + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + return deleteWithResponseAsync(settingKind).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(ServerVulnerabilityAssessmentsSettingKindName settingKind, + Context context) { + return deleteWithResponseAsync(settingKind, context).block(); + } + + /** + * Delete the server vulnerability assessments setting of the requested kind from the subscription. + * + * @param settingKind The kind of the server vulnerability assessments setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + deleteWithResponse(settingKind, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a page of a server vulnerability assessments settings list along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a page of a server vulnerability assessments settings list along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsImpl.java new file mode 100644 index 000000000000..674bdfe3be35 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/ServerVulnerabilityAssessmentsSettingsImpl.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.security.fluent.ServerVulnerabilityAssessmentsSettingsClient; +import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentsSettingInner; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSetting; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettingKindName; +import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessmentsSettings; + +public final class ServerVulnerabilityAssessmentsSettingsImpl implements ServerVulnerabilityAssessmentsSettings { + private static final ClientLogger LOGGER = new ClientLogger(ServerVulnerabilityAssessmentsSettingsImpl.class); + + private final ServerVulnerabilityAssessmentsSettingsClient innerClient; + + private final com.azure.resourcemanager.security.SecurityManager serviceManager; + + public ServerVulnerabilityAssessmentsSettingsImpl(ServerVulnerabilityAssessmentsSettingsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ServerVulnerabilityAssessmentsSettingImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ServerVulnerabilityAssessmentsSettingImpl(inner1, this.manager())); + } + + public Response + getWithResponse(ServerVulnerabilityAssessmentsSettingKindName settingKind, Context context) { + Response inner + = this.serviceClient().getWithResponse(settingKind, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ServerVulnerabilityAssessmentsSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ServerVulnerabilityAssessmentsSetting get(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + ServerVulnerabilityAssessmentsSettingInner inner = this.serviceClient().get(settingKind); + if (inner != null) { + return new ServerVulnerabilityAssessmentsSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting, Context context) { + Response inner = this.serviceClient() + .createOrUpdateWithResponse(settingKind, serverVulnerabilityAssessmentsSetting, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ServerVulnerabilityAssessmentsSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ServerVulnerabilityAssessmentsSetting createOrUpdate( + ServerVulnerabilityAssessmentsSettingKindName settingKind, + ServerVulnerabilityAssessmentsSettingInner serverVulnerabilityAssessmentsSetting) { + ServerVulnerabilityAssessmentsSettingInner inner + = this.serviceClient().createOrUpdate(settingKind, serverVulnerabilityAssessmentsSetting); + if (inner != null) { + return new ServerVulnerabilityAssessmentsSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(ServerVulnerabilityAssessmentsSettingKindName settingKind, + Context context) { + return this.serviceClient().deleteWithResponse(settingKind, context); + } + + public void delete(ServerVulnerabilityAssessmentsSettingKindName settingKind) { + this.serviceClient().delete(settingKind); + } + + private ServerVulnerabilityAssessmentsSettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.security.SecurityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java index 80ec076b1e33..30ffbfa19d58 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java @@ -29,21 +29,27 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.security.fluent.SettingsClient; import com.azure.resourcemanager.security.fluent.models.SettingInner; -import com.azure.resourcemanager.security.models.SettingName; +import com.azure.resourcemanager.security.models.SettingNameAutoGenerated; import com.azure.resourcemanager.security.models.SettingsList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in SettingsClient. + */ public final class SettingsClientImpl implements SettingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SettingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SettingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SettingsClientImpl(SecurityCenterImpl client) { @@ -58,56 +64,43 @@ public final class SettingsClientImpl implements SettingsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterSettin") public interface SettingsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("settingName") SettingName settingName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("settingName") SettingNameAutoGenerated settingName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("settingName") SettingName settingName, - @BodyParam("application/json") SettingInner setting, - @HeaderParam("Accept") String accept, - Context context); + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("settingName") SettingNameAutoGenerated settingName, + @BodyParam("application/json") SettingInner setting, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription settings list along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -115,39 +108,26 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2022-05-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -157,36 +137,24 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2022-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription settings list as paginated response with {@link PagedFlux}. @@ -198,7 +166,7 @@ private PagedFlux listAsync() { /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -207,13 +175,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return subscription settings list as paginated response with {@link PagedIterable}. @@ -225,7 +193,7 @@ public PagedIterable list() { /** * Settings about different configurations in Microsoft Defender for Cloud. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -239,7 +207,7 @@ public PagedIterable list(Context context) { /** * Settings of different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -247,18 +215,14 @@ public PagedIterable list(Context context) { * @return the kind of the security setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(SettingName settingName) { + private Mono> getWithResponseAsync(SettingNameAutoGenerated settingName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -266,22 +230,14 @@ private Mono> getWithResponseAsync(SettingName settingNam final String apiVersion = "2022-05-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - settingName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + settingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Settings of different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -290,18 +246,14 @@ private Mono> getWithResponseAsync(SettingName settingNam * @return the kind of the security setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(SettingName settingName, Context context) { + private Mono> getWithResponseAsync(SettingNameAutoGenerated settingName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -309,13 +261,13 @@ private Mono> getWithResponseAsync(SettingName settingNam final String apiVersion = "2022-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingName, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingName, accept, + context); } /** * Settings of different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -323,13 +275,13 @@ private Mono> getWithResponseAsync(SettingName settingNam * @return the kind of the security setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(SettingName settingName) { + private Mono getAsync(SettingNameAutoGenerated settingName) { return getWithResponseAsync(settingName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Settings of different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,13 +290,13 @@ private Mono getAsync(SettingName settingName) { * @return the kind of the security setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(SettingName settingName, Context context) { + public Response getWithResponse(SettingNameAutoGenerated settingName, Context context) { return getWithResponseAsync(settingName, context).block(); } /** * Settings of different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -352,13 +304,13 @@ public Response getWithResponse(SettingName settingName, Context c * @return the kind of the security setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingInner get(SettingName settingName) { + public SettingInner get(SettingNameAutoGenerated settingName) { return getWithResponse(settingName, Context.NONE).getValue(); } /** * updating settings about different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param setting Setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -367,18 +319,15 @@ public SettingInner get(SettingName settingName) { * @return the kind of the security setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(SettingName settingName, SettingInner setting) { + private Mono> updateWithResponseAsync(SettingNameAutoGenerated settingName, + SettingInner setting) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -391,23 +340,14 @@ private Mono> updateWithResponseAsync(SettingName setting final String apiVersion = "2022-05-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - settingName, - setting, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), settingName, setting, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * updating settings about different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param setting Setting object. * @param context The context to associate with this operation. @@ -417,19 +357,15 @@ private Mono> updateWithResponseAsync(SettingName setting * @return the kind of the security setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - SettingName settingName, SettingInner setting, Context context) { + private Mono> updateWithResponseAsync(SettingNameAutoGenerated settingName, + SettingInner setting, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); @@ -442,20 +378,13 @@ private Mono> updateWithResponseAsync( final String apiVersion = "2022-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - settingName, - setting, - accept, - context); + return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), settingName, + setting, accept, context); } /** * updating settings about different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param setting Setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,13 +393,13 @@ private Mono> updateWithResponseAsync( * @return the kind of the security setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(SettingName settingName, SettingInner setting) { + private Mono updateAsync(SettingNameAutoGenerated settingName, SettingInner setting) { return updateWithResponseAsync(settingName, setting).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * updating settings about different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param setting Setting object. * @param context The context to associate with this operation. @@ -480,13 +409,14 @@ private Mono updateAsync(SettingName settingName, SettingInner set * @return the kind of the security setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(SettingName settingName, SettingInner setting, Context context) { + public Response updateWithResponse(SettingNameAutoGenerated settingName, SettingInner setting, + Context context) { return updateWithResponseAsync(settingName, setting, context).block(); } /** * updating settings about different configurations in Microsoft Defender for Cloud. - * + * * @param settingName The name of the setting. * @param setting Setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -495,15 +425,16 @@ public Response updateWithResponse(SettingName settingName, Settin * @return the kind of the security setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingInner update(SettingName settingName, SettingInner setting) { + public SettingInner update(SettingNameAutoGenerated settingName, SettingInner setting) { return updateWithResponse(settingName, setting, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -515,31 +446,22 @@ private Mono> listNextSinglePageAsync(String nextLin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -552,23 +474,13 @@ private Mono> listNextSinglePageAsync(String nextLin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsImpl.java index 4c370425ade5..41288aa70b22 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsImpl.java @@ -12,7 +12,7 @@ import com.azure.resourcemanager.security.fluent.SettingsClient; import com.azure.resourcemanager.security.fluent.models.SettingInner; import com.azure.resourcemanager.security.models.Setting; -import com.azure.resourcemanager.security.models.SettingName; +import com.azure.resourcemanager.security.models.SettingNameAutoGenerated; import com.azure.resourcemanager.security.models.Settings; public final class SettingsImpl implements Settings { @@ -29,28 +29,25 @@ public SettingsImpl(SettingsClient innerClient, com.azure.resourcemanager.securi public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SettingImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SettingImpl(inner1, this.manager())); } - public Response getWithResponse(SettingName settingName, Context context) { + public Response getWithResponse(SettingNameAutoGenerated settingName, Context context) { Response inner = this.serviceClient().getWithResponse(settingName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SettingImpl(inner.getValue(), this.manager())); } else { return null; } } - public Setting get(SettingName settingName) { + public Setting get(SettingNameAutoGenerated settingName) { SettingInner inner = this.serviceClient().get(settingName); if (inner != null) { return new SettingImpl(inner, this.manager()); @@ -59,20 +56,18 @@ public Setting get(SettingName settingName) { } } - public Response updateWithResponse(SettingName settingName, SettingInner setting, Context context) { + public Response updateWithResponse(SettingNameAutoGenerated settingName, SettingInner setting, + Context context) { Response inner = this.serviceClient().updateWithResponse(settingName, setting, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SettingImpl(inner.getValue(), this.manager())); } else { return null; } } - public Setting update(SettingName settingName, SettingInner setting) { + public Setting update(SettingNameAutoGenerated settingName, SettingInner setting) { SettingInner inner = this.serviceClient().update(settingName, setting); if (inner != null) { return new SettingImpl(inner, this.manager()); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesClientImpl.java index 9136222bcbf7..562260a45615 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.SoftwaresList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SoftwareInventoriesClient. */ +/** + * An instance of this class provides access to all the operations defined in SoftwareInventoriesClient. + */ public final class SoftwareInventoriesClientImpl implements SoftwareInventoriesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SoftwareInventoriesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SoftwareInventoriesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SoftwareInventoriesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SoftwareInventoriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(SoftwareInventoriesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -56,76 +62,58 @@ public final class SoftwareInventoriesClientImpl implements SoftwareInventoriesC @Host("{$host}") @ServiceInterface(name = "SecurityCenterSoftwa") public interface SoftwareInventoriesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByExtendedResource( - @HostParam("$host") String endpoint, + Mono> listByExtendedResource(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, + @PathParam("resourceName") String resourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/softwareInventories") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories/{softwareName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories/{softwareName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceNamespace") String resourceNamespace, - @PathParam("resourceType") String resourceType, - @PathParam("resourceName") String resourceName, - @PathParam("softwareName") String softwareName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceNamespace") String resourceNamespace, @PathParam("resourceType") String resourceType, + @PathParam("resourceName") String resourceName, @PathParam("softwareName") String softwareName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByExtendedResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -133,22 +121,18 @@ Mono> listBySubscriptionNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the software inventory of the virtual machine along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExtendedResourceSinglePageAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + private Mono> listByExtendedResourceSinglePageAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -168,35 +152,18 @@ private Mono> listByExtendedResourceSinglePageAsync final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByExtendedResource( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByExtendedResource(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceNamespace, resourceType, resourceName, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -205,22 +172,18 @@ private Mono> listByExtendedResourceSinglePageAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the software inventory of the virtual machine along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExtendedResourceSinglePageAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + private Mono> listByExtendedResourceSinglePageAsync(String resourceGroupName, + String resourceNamespace, String resourceType, String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -240,32 +203,17 @@ private Mono> listByExtendedResourceSinglePageAsync final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByExtendedResource( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByExtendedResource(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -275,19 +223,17 @@ private Mono> listByExtendedResourceSinglePageAsync * @return the software inventory of the virtual machine as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByExtendedResourceAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - return new PagedFlux<>( - () -> - listByExtendedResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName), - nextLink -> listByExtendedResourceNextSinglePageAsync(nextLink)); + private PagedFlux listByExtendedResourceAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { + return new PagedFlux<>(() -> listByExtendedResourceSinglePageAsync(resourceGroupName, resourceNamespace, + resourceType, resourceName), nextLink -> listByExtendedResourceNextSinglePageAsync(nextLink)); } /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -298,20 +244,18 @@ private PagedFlux listByExtendedResourceAsync( * @return the software inventory of the virtual machine as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByExtendedResourceAsync( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - return new PagedFlux<>( - () -> - listByExtendedResourceSinglePageAsync( - resourceGroupName, resourceNamespace, resourceType, resourceName, context), + private PagedFlux listByExtendedResourceAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context) { + return new PagedFlux<>(() -> listByExtendedResourceSinglePageAsync(resourceGroupName, resourceNamespace, + resourceType, resourceName, context), nextLink -> listByExtendedResourceNextSinglePageAsync(nextLink, context)); } /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -321,17 +265,17 @@ private PagedFlux listByExtendedResourceAsync( * @return the software inventory of the virtual machine as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { + public PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { return new PagedIterable<>( listByExtendedResourceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName)); } /** * Gets the software inventory of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -342,130 +286,105 @@ public PagedIterable listByExtendedResource( * @return the software inventory of the virtual machine as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { + public PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context) { return new PagedIterable<>( listByExtendedResourceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, context)); } /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the software inventory of all virtual machines in the subscriptions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the software inventory of all virtual machines in the subscriptions along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the software inventory of all virtual machines in the subscriptions as paginated response with {@link - * PagedFlux}. + * @return the software inventory of all virtual machines in the subscriptions as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the software inventory of all virtual machines in the subscriptions as paginated response with {@link - * PagedFlux}. + * @return the software inventory of all virtual machines in the subscriptions as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the software inventory of all virtual machines in the subscriptions as paginated response with {@link - * PagedIterable}. + * @return the software inventory of all virtual machines in the subscriptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -474,13 +393,13 @@ public PagedIterable list() { /** * Gets the software inventory of all virtual machines in the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the software inventory of all virtual machines in the subscriptions as paginated response with {@link - * PagedIterable}. + * @return the software inventory of all virtual machines in the subscriptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -489,9 +408,9 @@ public PagedIterable list(Context context) { /** * Gets a single software data of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -500,26 +419,18 @@ public PagedIterable list(Context context) { * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single software data of the virtual machine along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String softwareName) { + private Mono> getWithResponseAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String softwareName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -542,27 +453,16 @@ private Mono> getWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - softwareName, - apiVersion, - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, softwareName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a single software data of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -572,27 +472,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single software data of the virtual machine along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String softwareName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String softwareName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -614,25 +505,15 @@ private Mono> getWithResponseAsync( final String apiVersion = "2021-05-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceNamespace, - resourceType, - resourceName, - softwareName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceNamespace, resourceType, resourceName, softwareName, apiVersion, accept, context); } /** * Gets a single software data of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -643,21 +524,17 @@ private Mono> getWithResponseAsync( * @return a single software data of the virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String softwareName) { + private Mono getAsync(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String softwareName) { return getWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a single software data of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -669,23 +546,17 @@ private Mono getAsync( * @return a single software data of the virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String softwareName, - Context context) { - return getWithResponseAsync( - resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String softwareName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName, + context).block(); } /** * Gets a single software data of the virtual machine. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -696,27 +567,23 @@ public Response getWithResponse( * @return a single software data of the virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SoftwareInner get( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String softwareName) { - return getWithResponse( - resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName, Context.NONE) - .getValue(); + public SoftwareInner get(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String softwareName) { + return getWithResponse(resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName, + Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents the software inventory of the virtual machine along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByExtendedResourceNextSinglePageAsync(String nextLink) { @@ -724,76 +591,59 @@ private Mono> listByExtendedResourceNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByExtendedResourceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents the software inventory of the virtual machine along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExtendedResourceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByExtendedResourceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByExtendedResourceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByExtendedResourceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents the software inventory of the virtual machine along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -801,38 +651,30 @@ private Mono> listBySubscriptionNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents the software inventory of the virtual machine along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -840,23 +682,13 @@ private Mono> listBySubscriptionNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesImpl.java index fdbee743a320..5f249c5c1ed0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SoftwareInventoriesImpl.java @@ -21,71 +21,52 @@ public final class SoftwareInventoriesImpl implements SoftwareInventories { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SoftwareInventoriesImpl( - SoftwareInventoriesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SoftwareInventoriesImpl(SoftwareInventoriesClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName) { - PagedIterable inner = - this - .serviceClient() - .listByExtendedResource(resourceGroupName, resourceNamespace, resourceType, resourceName); - return Utils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); + public PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName) { + PagedIterable inner = this.serviceClient().listByExtendedResource(resourceGroupName, + resourceNamespace, resourceType, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); } - public PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context) { - PagedIterable inner = - this - .serviceClient() - .listByExtendedResource(resourceGroupName, resourceNamespace, resourceType, resourceName, context); - return Utils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); + public PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context) { + PagedIterable inner = this.serviceClient().listByExtendedResource(resourceGroupName, + resourceNamespace, resourceType, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SoftwareImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String softwareName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse( - resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName, context); + public Response getWithResponse(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String softwareName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, resourceNamespace, + resourceType, resourceName, softwareName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SoftwareImpl(inner.getValue(), this.manager())); } else { return null; } } - public Software get( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, + public Software get(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, String softwareName) { - SoftwareInner inner = - this.serviceClient().get(resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName); + SoftwareInner inner + = this.serviceClient().get(resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName); if (inner != null) { return new SoftwareImpl(inner, this.manager()); } else { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesClientImpl.java index 434e0aa1a792..e6758e2a8451 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesClientImpl.java @@ -38,24 +38,24 @@ */ public final class SqlVulnerabilityAssessmentBaselineRulesClientImpl implements SqlVulnerabilityAssessmentBaselineRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SqlVulnerabilityAssessmentBaselineRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SqlVulnerabilityAssessmentBaselineRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SqlVulnerabilityAssessmentBaselineRulesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - SqlVulnerabilityAssessmentBaselineRulesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(SqlVulnerabilityAssessmentBaselineRulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,75 +66,58 @@ public final class SqlVulnerabilityAssessmentBaselineRulesClientImpl @Host("{$host}") @ServiceInterface(name = "SecurityCenterSqlVul") public interface SqlVulnerabilityAssessmentBaselineRulesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("ruleId") String ruleId, - @QueryParam("workspaceId") String workspaceId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("ruleId") String ruleId, @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @BodyParam("application/json") RuleResultsInput body, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") RuleResultsInput body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("ruleId") String ruleId, - @QueryParam("workspaceId") String workspaceId, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, @PathParam("ruleId") String ruleId, + @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}") - @ExpectedResponses({200, 204}) + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("ruleId") String ruleId, - @QueryParam("workspaceId") String workspaceId, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("ruleId") String ruleId, + @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("workspaceId") String workspaceId, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> add( - @HostParam("$host") String endpoint, - @QueryParam("workspaceId") String workspaceId, - @QueryParam("api-version") String apiVersion, + Mono> add(@HostParam("$host") String endpoint, + @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceId", encoded = true) String resourceId, - @BodyParam("application/json") RulesResultsInput body, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") RulesResultsInput body, @HeaderParam("Accept") String accept, Context context); } /** * Creates a Baseline for a rule in a database. Will overwrite any previously existing results. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -145,13 +128,11 @@ Mono> add( * @return rule results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String ruleId, String workspaceId, String resourceId, RuleResultsInput body) { + private Mono> createOrUpdateWithResponseAsync(String ruleId, String workspaceId, + String resourceId, RuleResultsInput body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -168,24 +149,14 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - ruleId, - workspaceId, - apiVersion, - resourceId, - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), ruleId, workspaceId, apiVersion, + resourceId, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a Baseline for a rule in a database. Will overwrite any previously existing results. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -197,13 +168,11 @@ private Mono> createOrUpdateWithResponseAsync( * @return rule results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String ruleId, String workspaceId, String resourceId, RuleResultsInput body, Context context) { + private Mono> createOrUpdateWithResponseAsync(String ruleId, String workspaceId, + String resourceId, RuleResultsInput body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -220,14 +189,13 @@ private Mono> createOrUpdateWithResponseAsync( final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), ruleId, workspaceId, apiVersion, resourceId, body, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), ruleId, workspaceId, apiVersion, resourceId, body, + accept, context); } /** * Creates a Baseline for a rule in a database. Will overwrite any previously existing results. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -245,7 +213,7 @@ private Mono createOrUpdateAsync(String ruleId, String workspa /** * Creates a Baseline for a rule in a database. Will overwrite any previously existing results. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -257,14 +225,14 @@ private Mono createOrUpdateAsync(String ruleId, String workspa * @return rule results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String ruleId, String workspaceId, String resourceId, RuleResultsInput body, Context context) { + public Response createOrUpdateWithResponse(String ruleId, String workspaceId, String resourceId, + RuleResultsInput body, Context context) { return createOrUpdateWithResponseAsync(ruleId, workspaceId, resourceId, body, context).block(); } /** * Creates a Baseline for a rule in a database. Will overwrite any previously existing results. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -281,7 +249,7 @@ public RuleResultsInner createOrUpdate(String ruleId, String workspaceId, String /** * Gets the results for a given rule in the Baseline. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -289,16 +257,14 @@ public RuleResultsInner createOrUpdate(String ruleId, String workspaceId, String * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the results for a given rule in the Baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String ruleId, String workspaceId, String resourceId) { + private Mono> getWithResponseAsync(String ruleId, String workspaceId, + String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -312,16 +278,14 @@ private Mono> getWithResponseAsync( final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get(this.client.getEndpoint(), ruleId, workspaceId, apiVersion, resourceId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), ruleId, workspaceId, apiVersion, resourceId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the results for a given rule in the Baseline. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -330,16 +294,14 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the results for a given rule in the Baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String ruleId, String workspaceId, String resourceId, Context context) { + private Mono> getWithResponseAsync(String ruleId, String workspaceId, String resourceId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -358,7 +320,7 @@ private Mono> getWithResponseAsync( /** * Gets the results for a given rule in the Baseline. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -374,7 +336,7 @@ private Mono getAsync(String ruleId, String workspaceId, Strin /** * Gets the results for a given rule in the Baseline. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -385,14 +347,14 @@ private Mono getAsync(String ruleId, String workspaceId, Strin * @return the results for a given rule in the Baseline along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String ruleId, String workspaceId, String resourceId, Context context) { + public Response getWithResponse(String ruleId, String workspaceId, String resourceId, + Context context) { return getWithResponseAsync(ruleId, workspaceId, resourceId, context).block(); } /** * Gets the results for a given rule in the Baseline. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -408,7 +370,7 @@ public RuleResultsInner get(String ruleId, String workspaceId, String resourceId /** * Deletes a rule from the Baseline of a given database. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -420,10 +382,8 @@ public RuleResultsInner get(String ruleId, String workspaceId, String resourceId @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String ruleId, String workspaceId, String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -437,17 +397,14 @@ private Mono> deleteWithResponseAsync(String ruleId, String works final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), ruleId, workspaceId, apiVersion, resourceId, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), ruleId, workspaceId, apiVersion, + resourceId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a rule from the Baseline of a given database. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -458,13 +415,11 @@ private Mono> deleteWithResponseAsync(String ruleId, String works * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String ruleId, String workspaceId, String resourceId, Context context) { + private Mono> deleteWithResponseAsync(String ruleId, String workspaceId, String resourceId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -483,7 +438,7 @@ private Mono> deleteWithResponseAsync( /** * Deletes a rule from the Baseline of a given database. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -499,7 +454,7 @@ private Mono deleteAsync(String ruleId, String workspaceId, String resourc /** * Deletes a rule from the Baseline of a given database. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -516,7 +471,7 @@ public Response deleteWithResponse(String ruleId, String workspaceId, Stri /** * Deletes a rule from the Baseline of a given database. - * + * * @param ruleId The rule Id. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -531,22 +486,20 @@ public void delete(String ruleId, String workspaceId, String resourceId) { /** * Gets the results for all rules in the Baseline. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the results for all rules in the Baseline along with {@link Response} on successful completion of {@link - * Mono}. + * @return the results for all rules in the Baseline along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String workspaceId, String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (workspaceId == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceId is required and cannot be null.")); @@ -556,33 +509,29 @@ private Mono> listWithResponseAsync(String workspace } final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.list(this.client.getEndpoint(), workspaceId, apiVersion, resourceId, accept, context)) + return FluxUtil.withContext( + context -> service.list(this.client.getEndpoint(), workspaceId, apiVersion, resourceId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the results for all rules in the Baseline. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the results for all rules in the Baseline along with {@link Response} on successful completion of {@link - * Mono}. + * @return the results for all rules in the Baseline along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String workspaceId, String resourceId, Context context) { + private Mono> listWithResponseAsync(String workspaceId, String resourceId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (workspaceId == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceId is required and cannot be null.")); @@ -598,7 +547,7 @@ private Mono> listWithResponseAsync( /** * Gets the results for all rules in the Baseline. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -613,7 +562,7 @@ private Mono listAsync(String workspaceId, String resourceId) /** * Gets the results for all rules in the Baseline. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. @@ -629,7 +578,7 @@ public Response listWithResponse(String workspaceId, String r /** * Gets the results for all rules in the Baseline. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -644,7 +593,7 @@ public RulesResultsInner list(String workspaceId, String resourceId) { /** * Add a list of baseline rules. Will overwrite any previously existing results (for all rules). - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param body The baseline rules. @@ -654,13 +603,11 @@ public RulesResultsInner list(String workspaceId, String resourceId) { * @return a list of rules results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> addWithResponseAsync( - String workspaceId, String resourceId, RulesResultsInput body) { + private Mono> addWithResponseAsync(String workspaceId, String resourceId, + RulesResultsInput body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (workspaceId == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceId is required and cannot be null.")); @@ -674,15 +621,14 @@ private Mono> addWithResponseAsync( final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.add(this.client.getEndpoint(), workspaceId, apiVersion, resourceId, body, accept, context)) + .withContext(context -> service.add(this.client.getEndpoint(), workspaceId, apiVersion, resourceId, body, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Add a list of baseline rules. Will overwrite any previously existing results (for all rules). - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param body The baseline rules. @@ -693,13 +639,11 @@ private Mono> addWithResponseAsync( * @return a list of rules results along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> addWithResponseAsync( - String workspaceId, String resourceId, RulesResultsInput body, Context context) { + private Mono> addWithResponseAsync(String workspaceId, String resourceId, + RulesResultsInput body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (workspaceId == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceId is required and cannot be null.")); @@ -718,7 +662,7 @@ private Mono> addWithResponseAsync( /** * Add a list of baseline rules. Will overwrite any previously existing results (for all rules). - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -734,7 +678,7 @@ private Mono addAsync(String workspaceId, String resourceId) /** * Add a list of baseline rules. Will overwrite any previously existing results (for all rules). - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param body The baseline rules. @@ -745,14 +689,14 @@ private Mono addAsync(String workspaceId, String resourceId) * @return a list of rules results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addWithResponse( - String workspaceId, String resourceId, RulesResultsInput body, Context context) { + public Response addWithResponse(String workspaceId, String resourceId, RulesResultsInput body, + Context context) { return addWithResponseAsync(workspaceId, resourceId, body, context).block(); } /** * Add a list of baseline rules. Will overwrite any previously existing results (for all rules). - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesImpl.java index 2f3bbda29751..350e1af599c1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesImpl.java @@ -23,22 +23,18 @@ public final class SqlVulnerabilityAssessmentBaselineRulesImpl implements SqlVul private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SqlVulnerabilityAssessmentBaselineRulesImpl( - SqlVulnerabilityAssessmentBaselineRulesClient innerClient, + public SqlVulnerabilityAssessmentBaselineRulesImpl(SqlVulnerabilityAssessmentBaselineRulesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String ruleId, String workspaceId, String resourceId, Context context) { - Response inner = - this.serviceClient().getWithResponse(ruleId, workspaceId, resourceId, context); + public Response getWithResponse(String ruleId, String workspaceId, String resourceId, + Context context) { + Response inner + = this.serviceClient().getWithResponse(ruleId, workspaceId, resourceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RuleResultsImpl(inner.getValue(), this.manager())); } else { return null; @@ -65,10 +61,7 @@ public void delete(String ruleId, String workspaceId, String resourceId) { public Response listWithResponse(String workspaceId, String resourceId, Context context) { Response inner = this.serviceClient().listWithResponse(workspaceId, resourceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RulesResultsImpl(inner.getValue(), this.manager())); } else { return null; @@ -84,15 +77,12 @@ public RulesResults list(String workspaceId, String resourceId) { } } - public Response addWithResponse( - String workspaceId, String resourceId, RulesResultsInput body, Context context) { - Response inner = - this.serviceClient().addWithResponse(workspaceId, resourceId, body, context); + public Response addWithResponse(String workspaceId, String resourceId, RulesResultsInput body, + Context context) { + Response inner + = this.serviceClient().addWithResponse(workspaceId, resourceId, body, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RulesResultsImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsClientImpl.java index ba2ec1708d83..a6fdac184b14 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsClientImpl.java @@ -32,67 +32,57 @@ */ public final class SqlVulnerabilityAssessmentScanResultsClientImpl implements SqlVulnerabilityAssessmentScanResultsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SqlVulnerabilityAssessmentScanResultsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SqlVulnerabilityAssessmentScanResultsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SqlVulnerabilityAssessmentScanResultsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - SqlVulnerabilityAssessmentScanResultsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(SqlVulnerabilityAssessmentScanResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterSqlVulnerabilityAssessmentScanResults to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for SecurityCenterSqlVulnerabilityAssessmentScanResults to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterSqlVul") public interface SqlVulnerabilityAssessmentScanResultsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults/{scanResultId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults/{scanResultId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("scanId") String scanId, - @PathParam("scanResultId") String scanResultId, - @QueryParam("workspaceId") String workspaceId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("scanId") String scanId, + @PathParam("scanResultId") String scanResultId, @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("scanId") String scanId, - @QueryParam("workspaceId") String workspaceId, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + Mono> list(@HostParam("$host") String endpoint, @PathParam("scanId") String scanId, + @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); } /** * Gets the scan results of a single rule in a scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param scanResultId The rule Id of the results. * @param workspaceId The workspace Id. @@ -101,16 +91,14 @@ Mono> list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the scan results of a single rule in a scan record along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scanId, String scanResultId, String workspaceId, String resourceId) { + private Mono> getWithResponseAsync(String scanId, String scanResultId, String workspaceId, + String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); @@ -127,24 +115,14 @@ private Mono> getWithResponseAsync( final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - scanId, - scanResultId, - workspaceId, - apiVersion, - resourceId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), scanId, scanResultId, workspaceId, + apiVersion, resourceId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the scan results of a single rule in a scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param scanResultId The rule Id of the results. * @param workspaceId The workspace Id. @@ -154,16 +132,14 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the scan results of a single rule in a scan record along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scanId, String scanResultId, String workspaceId, String resourceId, Context context) { + private Mono> getWithResponseAsync(String scanId, String scanResultId, String workspaceId, + String resourceId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); @@ -180,13 +156,13 @@ private Mono> getWithResponseAsync( final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), scanId, scanResultId, workspaceId, apiVersion, resourceId, accept, context); + return service.get(this.client.getEndpoint(), scanId, scanResultId, workspaceId, apiVersion, resourceId, accept, + context); } /** * Gets the scan results of a single rule in a scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param scanResultId The rule Id of the results. * @param workspaceId The workspace Id. @@ -204,7 +180,7 @@ private Mono getAsync(String scanId, String scanResultId, Strin /** * Gets the scan results of a single rule in a scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param scanResultId The rule Id of the results. * @param workspaceId The workspace Id. @@ -216,14 +192,14 @@ private Mono getAsync(String scanId, String scanResultId, Strin * @return the scan results of a single rule in a scan record along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String scanId, String scanResultId, String workspaceId, String resourceId, Context context) { + public Response getWithResponse(String scanId, String scanResultId, String workspaceId, + String resourceId, Context context) { return getWithResponseAsync(scanId, scanResultId, workspaceId, resourceId, context).block(); } /** * Gets the scan results of a single rule in a scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param scanResultId The rule Id of the results. * @param workspaceId The workspace Id. @@ -240,7 +216,7 @@ public ScanResultInner get(String scanId, String scanResultId, String workspaceI /** * Gets a list of scan results for a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -248,16 +224,14 @@ public ScanResultInner get(String scanId, String scanResultId, String workspaceI * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of scan results for a single scan record along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String scanId, String workspaceId, String resourceId) { + private Mono> listWithResponseAsync(String scanId, String workspaceId, + String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); @@ -271,16 +245,14 @@ private Mono> listWithResponseAsync( final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), scanId, workspaceId, apiVersion, resourceId, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), scanId, workspaceId, apiVersion, resourceId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of scan results for a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -289,16 +261,14 @@ private Mono> listWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of scan results for a single scan record along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String scanId, String workspaceId, String resourceId, Context context) { + private Mono> listWithResponseAsync(String scanId, String workspaceId, String resourceId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); @@ -317,7 +287,7 @@ private Mono> listWithResponseAsync( /** * Gets a list of scan results for a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -333,7 +303,7 @@ private Mono listAsync(String scanId, String workspaceId, Stri /** * Gets a list of scan results for a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -344,14 +314,14 @@ private Mono listAsync(String scanId, String workspaceId, Stri * @return a list of scan results for a single scan record along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String scanId, String workspaceId, String resourceId, Context context) { + public Response listWithResponse(String scanId, String workspaceId, String resourceId, + Context context) { return listWithResponseAsync(scanId, workspaceId, resourceId, context).block(); } /** * Gets a list of scan results for a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsImpl.java index ede3a2500e80..ac44a1c6049b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScanResultsImpl.java @@ -22,22 +22,18 @@ public final class SqlVulnerabilityAssessmentScanResultsImpl implements SqlVulne private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SqlVulnerabilityAssessmentScanResultsImpl( - SqlVulnerabilityAssessmentScanResultsClient innerClient, + public SqlVulnerabilityAssessmentScanResultsImpl(SqlVulnerabilityAssessmentScanResultsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String scanId, String scanResultId, String workspaceId, String resourceId, Context context) { - Response inner = - this.serviceClient().getWithResponse(scanId, scanResultId, workspaceId, resourceId, context); + public Response getWithResponse(String scanId, String scanResultId, String workspaceId, + String resourceId, Context context) { + Response inner + = this.serviceClient().getWithResponse(scanId, scanResultId, workspaceId, resourceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScanResultImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,15 +49,12 @@ public ScanResult get(String scanId, String scanResultId, String workspaceId, St } } - public Response listWithResponse( - String scanId, String workspaceId, String resourceId, Context context) { - Response inner = - this.serviceClient().listWithResponse(scanId, workspaceId, resourceId, context); + public Response listWithResponse(String scanId, String workspaceId, String resourceId, + Context context) { + Response inner + = this.serviceClient().listWithResponse(scanId, workspaceId, resourceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScanResultsImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansClientImpl.java index 3a315100d9df..3bd2eb0709aa 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansClientImpl.java @@ -26,81 +26,74 @@ import com.azure.resourcemanager.security.fluent.models.ScansInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentScansClient. */ +/** + * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentScansClient. + */ public final class SqlVulnerabilityAssessmentScansClientImpl implements SqlVulnerabilityAssessmentScansClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SqlVulnerabilityAssessmentScansService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SqlVulnerabilityAssessmentScansClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SqlVulnerabilityAssessmentScansClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create( - SqlVulnerabilityAssessmentScansService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(SqlVulnerabilityAssessmentScansService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for SecurityCenterSqlVulnerabilityAssessmentScans to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for SecurityCenterSqlVulnerabilityAssessmentScans to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "SecurityCenterSqlVul") public interface SqlVulnerabilityAssessmentScansService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("scanId") String scanId, - @QueryParam("workspaceId") String workspaceId, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, @PathParam("scanId") String scanId, + @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("workspaceId") String workspaceId, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @HeaderParam("Accept") String accept, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("workspaceId") String workspaceId, @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept, Context context); } /** * Gets the scan details of a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the scan details of a single scan record along with {@link Response} on successful completion of {@link - * Mono}. + * @return the scan details of a single scan record along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String scanId, String workspaceId, String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); @@ -114,16 +107,14 @@ private Mono> getWithResponseAsync(String scanId, String wor final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get(this.client.getEndpoint(), scanId, workspaceId, apiVersion, resourceId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), scanId, workspaceId, apiVersion, resourceId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the scan details of a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -131,17 +122,15 @@ private Mono> getWithResponseAsync(String scanId, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the scan details of a single scan record along with {@link Response} on successful completion of {@link - * Mono}. + * @return the scan details of a single scan record along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scanId, String workspaceId, String resourceId, Context context) { + private Mono> getWithResponseAsync(String scanId, String workspaceId, String resourceId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); @@ -160,7 +149,7 @@ private Mono> getWithResponseAsync( /** * Gets the scan details of a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -176,7 +165,7 @@ private Mono getAsync(String scanId, String workspaceId, String resou /** * Gets the scan details of a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -193,7 +182,7 @@ public Response getWithResponse(String scanId, String workspaceId, St /** * Gets the scan details of a single scan record. - * + * * @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan. * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. @@ -209,7 +198,7 @@ public ScanInner get(String scanId, String workspaceId, String resourceId) { /** * Gets a list of scan records. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,10 +209,8 @@ public ScanInner get(String scanId, String workspaceId, String resourceId) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String workspaceId, String resourceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (workspaceId == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceId is required and cannot be null.")); @@ -233,16 +220,14 @@ private Mono> listWithResponseAsync(String workspaceId, Str } final String apiVersion = "2023-02-01-preview"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.list(this.client.getEndpoint(), workspaceId, apiVersion, resourceId, accept, context)) + return FluxUtil.withContext( + context -> service.list(this.client.getEndpoint(), workspaceId, apiVersion, resourceId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of scan records. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. @@ -254,10 +239,8 @@ private Mono> listWithResponseAsync(String workspaceId, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String workspaceId, String resourceId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (workspaceId == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceId is required and cannot be null.")); @@ -273,7 +256,7 @@ private Mono> listWithResponseAsync(String workspaceId, Str /** * Gets a list of scan records. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,7 +271,7 @@ private Mono listAsync(String workspaceId, String resourceId) { /** * Gets a list of scan records. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. @@ -304,7 +287,7 @@ public Response listWithResponse(String workspaceId, String resource /** * Gets a list of scan records. - * + * * @param workspaceId The workspace Id. * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansImpl.java index 8f16764d6269..a5c3bb15481a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentScansImpl.java @@ -22,8 +22,7 @@ public final class SqlVulnerabilityAssessmentScansImpl implements SqlVulnerabili private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SqlVulnerabilityAssessmentScansImpl( - SqlVulnerabilityAssessmentScansClient innerClient, + public SqlVulnerabilityAssessmentScansImpl(SqlVulnerabilityAssessmentScansClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -32,10 +31,7 @@ public SqlVulnerabilityAssessmentScansImpl( public Response getWithResponse(String scanId, String workspaceId, String resourceId, Context context) { Response inner = this.serviceClient().getWithResponse(scanId, workspaceId, resourceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScanImpl(inner.getValue(), this.manager())); } else { return null; @@ -54,10 +50,7 @@ public Scan get(String scanId, String workspaceId, String resourceId) { public Response listWithResponse(String workspaceId, String resourceId, Context context) { Response inner = this.serviceClient().listWithResponse(workspaceId, resourceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScansImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsClientImpl.java index a93f80e557e9..bac88385900c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.SecuritySubAssessmentList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SubAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in SubAssessmentsClient. + */ public final class SubAssessmentsClientImpl implements SubAssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SubAssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of SubAssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SubAssessmentsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(SubAssessmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SubAssessmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,81 +62,65 @@ public final class SubAssessmentsClientImpl implements SubAssessmentsClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterSubAss") public interface SubAssessmentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/subAssessments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAll( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); + Mono> listAll(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/subAssessments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("assessmentName") String assessmentName, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, + @PathParam("assessmentName") String assessmentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/subAssessments/{subAssessmentName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope, @PathParam("assessmentName") String assessmentName, - @PathParam("subAssessmentName") String subAssessmentName, - @HeaderParam("Accept") String accept, + @PathParam("subAssessmentName") String subAssessmentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a subscription scope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return security sub-assessments on all your scanned resources inside a subscription scope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllSinglePageAsync(String scope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -139,37 +129,28 @@ private Mono> listAllSinglePageAsync(S final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAll(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a subscription scope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return security sub-assessments on all your scanned resources inside a subscription scope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllSinglePageAsync(String scope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -177,29 +158,21 @@ private Mono> listAllSinglePageAsync(S final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAll(this.client.getEndpoint(), apiVersion, scope, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAll(this.client.getEndpoint(), apiVersion, scope, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a subscription scope as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAllAsync(String scope) { @@ -208,32 +181,32 @@ private PagedFlux listAllAsync(String scope) { /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a subscription scope as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAllAsync(String scope, Context context) { - return new PagedFlux<>( - () -> listAllSinglePageAsync(scope, context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listAllSinglePageAsync(scope, context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a subscription scope as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listAll(String scope) { @@ -242,15 +215,15 @@ public PagedIterable listAll(String scope) { /** * Get security sub-assessments on all your scanned resources inside a subscription scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a subscription scope as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listAll(String scope, Context context) { @@ -259,23 +232,21 @@ public PagedIterable listAll(String scope, Context c /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String scope, String assessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -288,39 +259,30 @@ private Mono> listSinglePageAsync(Stri return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), apiVersion, scope, assessmentName, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security sub-assessments on all your scanned resources inside a scope along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String scope, String assessmentName, Context context) { + private Mono> listSinglePageAsync(String scope, String assessmentName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -331,68 +293,59 @@ private Mono> listSinglePageAsync( final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, scope, assessmentName, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, scope, assessmentName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedFlux}. + * @return security sub-assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, String assessmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, assessmentName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(scope, assessmentName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedFlux}. + * @return security sub-assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String scope, String assessmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, assessmentName, context), + return new PagedFlux<>(() -> listSinglePageAsync(scope, assessmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security sub-assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope, String assessmentName) { @@ -401,16 +354,16 @@ public PagedIterable list(String scope, String asses /** * Get security sub-assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security sub-assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security sub-assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String scope, String assessmentName, Context context) { @@ -419,25 +372,23 @@ public PagedIterable list(String scope, String asses /** * Get a security sub-assessment on your scanned resource. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a security sub-assessment on your scanned resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, String assessmentName, String subAssessmentName) { + private Mono> getWithResponseAsync(String scope, String assessmentName, + String subAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -452,25 +403,16 @@ private Mono> getWithResponseAsync( final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - scope, - assessmentName, - subAssessmentName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, scope, assessmentName, + subAssessmentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a security sub-assessment on your scanned resource. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type. * @param context The context to associate with this operation. @@ -478,16 +420,14 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a security sub-assessment on your scanned resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, String assessmentName, String subAssessmentName, Context context) { + private Mono> getWithResponseAsync(String scope, String assessmentName, + String subAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (scope == null) { return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); @@ -502,15 +442,15 @@ private Mono> getWithResponseAsync( final String apiVersion = "2019-01-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), apiVersion, scope, assessmentName, subAssessmentName, accept, context); + return service.get(this.client.getEndpoint(), apiVersion, scope, assessmentName, subAssessmentName, accept, + context); } /** * Get a security sub-assessment on your scanned resource. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -526,9 +466,9 @@ private Mono getAsync(String scope, String assessmen /** * Get a security sub-assessment on your scanned resource. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type. * @param context The context to associate with this operation. @@ -538,16 +478,16 @@ private Mono getAsync(String scope, String assessmen * @return a security sub-assessment on your scanned resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String scope, String assessmentName, String subAssessmentName, Context context) { + public Response getWithResponse(String scope, String assessmentName, + String subAssessmentName, Context context) { return getWithResponseAsync(scope, assessmentName, subAssessmentName, context).block(); } /** * Get a security sub-assessment on your scanned resource. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param subAssessmentName The Sub-Assessment Key - Unique key for the sub-assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -562,14 +502,15 @@ public SecuritySubAssessmentInner get(String scope, String assessmentName, Strin /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAllNextSinglePageAsync(String nextLink) { @@ -577,75 +518,58 @@ private Mono> listAllNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listAllNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -653,37 +577,28 @@ private Mono> listNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security sub-assessments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -691,23 +606,13 @@ private Mono> listNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsImpl.java index ed66f565392b..65469f631ba7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SubAssessmentsImpl.java @@ -21,41 +21,38 @@ public final class SubAssessmentsImpl implements SubAssessments { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public SubAssessmentsImpl( - SubAssessmentsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public SubAssessmentsImpl(SubAssessmentsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listAll(String scope) { PagedIterable inner = this.serviceClient().listAll(scope); - return Utils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); } public PagedIterable listAll(String scope, Context context) { PagedIterable inner = this.serviceClient().listAll(scope, context); - return Utils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); } public PagedIterable list(String scope, String assessmentName) { PagedIterable inner = this.serviceClient().list(scope, assessmentName); - return Utils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); } public PagedIterable list(String scope, String assessmentName, Context context) { PagedIterable inner = this.serviceClient().list(scope, assessmentName, context); - return Utils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySubAssessmentImpl(inner1, this.manager())); } - public Response getWithResponse( - String scope, String assessmentName, String subAssessmentName, Context context) { - Response inner = - this.serviceClient().getWithResponse(scope, assessmentName, subAssessmentName, context); + public Response getWithResponse(String scope, String assessmentName, + String subAssessmentName, Context context) { + Response inner + = this.serviceClient().getWithResponse(scope, assessmentName, subAssessmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecuritySubAssessmentImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksClientImpl.java index 846466c0abe1..a019dcc886b4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksClientImpl.java @@ -32,17 +32,23 @@ import com.azure.resourcemanager.security.models.TaskUpdateActionType; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TasksClient. */ +/** + * An instance of this class provides access to all the operations defined in TasksClient. + */ public final class TasksClientImpl implements TasksClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TasksService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of TasksClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TasksClientImpl(SecurityCenterImpl client) { @@ -57,229 +63,158 @@ public final class TasksClientImpl implements TasksClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterTasks") public interface TasksService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHomeRegion( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHomeRegion(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getSubscriptionLevelTask( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("taskName") String taskName, - @HeaderParam("Accept") String accept, - Context context); + Mono> getSubscriptionLevelTask(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("taskName") String taskName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}") - @ExpectedResponses({204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateSubscriptionLevelTaskState( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @PathParam("taskName") String taskName, + Mono> updateSubscriptionLevelTaskState(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("ascLocation") String ascLocation, @PathParam("taskName") String taskName, @PathParam("taskUpdateActionType") TaskUpdateActionType taskUpdateActionType, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getResourceGroupLevelTask( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, - @PathParam("taskName") String taskName, - @HeaderParam("Accept") String accept, - Context context); + Mono> getResourceGroupLevelTask(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, + @PathParam("taskName") String taskName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}") - @ExpectedResponses({204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateResourceGroupLevelTaskState( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + Mono> updateResourceGroupLevelTaskState(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("taskName") String taskName, @PathParam("taskUpdateActionType") TaskUpdateActionType taskUpdateActionType, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHomeRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), filter, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -293,7 +228,7 @@ private PagedFlux listAsync(String filter) { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security task recommendations as paginated response with {@link PagedFlux}. @@ -306,7 +241,7 @@ private PagedFlux listAsync() { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -316,13 +251,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(filter, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security task recommendations as paginated response with {@link PagedIterable}. @@ -335,7 +270,7 @@ public PagedIterable list() { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -350,29 +285,25 @@ public PagedIterable list(String filter, Context context) { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHomeRegionSinglePageAsync(String ascLocation, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -380,56 +311,36 @@ private Mono> listByHomeRegionSinglePageAsync(S final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHomeRegion( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHomeRegion(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionSinglePageAsync( - String ascLocation, String filter, Context context) { + private Mono> listByHomeRegionSinglePageAsync(String ascLocation, String filter, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -438,30 +349,17 @@ private Mono> listByHomeRegionSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHomeRegion( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHomeRegion(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), ascLocation, + filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -470,16 +368,15 @@ private Mono> listByHomeRegionSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation, String filter) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation, filter), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation, filter), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -488,16 +385,15 @@ private PagedFlux listByHomeRegionAsync(String ascLocation, S @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation) { final String filter = null; - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation, filter), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation, filter), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -507,16 +403,15 @@ private PagedFlux listByHomeRegionAsync(String ascLocation) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation, String filter, Context context) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation, filter, context), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation, filter, context), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink, context)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -530,9 +425,9 @@ public PagedIterable listByHomeRegion(String ascLocation) { /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -547,30 +442,26 @@ public PagedIterable listByHomeRegion(String ascLocation, Str /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security task that we recommend to do in order to strengthen security along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSubscriptionLevelTaskWithResponseAsync( - String ascLocation, String taskName) { + private Mono> getSubscriptionLevelTaskWithResponseAsync(String ascLocation, + String taskName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -581,47 +472,34 @@ private Mono> getSubscriptionLevelTaskWithResponseAs final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getSubscriptionLevelTask( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - taskName, - accept, - context)) + .withContext(context -> service.getSubscriptionLevelTask(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, taskName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security task that we recommend to do in order to strengthen security along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSubscriptionLevelTaskWithResponseAsync( - String ascLocation, String taskName, Context context) { + private Mono> getSubscriptionLevelTaskWithResponseAsync(String ascLocation, + String taskName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -632,28 +510,21 @@ private Mono> getSubscriptionLevelTaskWithResponseAs final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getSubscriptionLevelTask( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - taskName, - accept, - context); + return service.getSubscriptionLevelTask(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + ascLocation, taskName, accept, context); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security task that we recommend to do in order to strengthen security on successful completion of {@link - * Mono}. + * @return security task that we recommend to do in order to strengthen security on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getSubscriptionLevelTaskAsync(String ascLocation, String taskName) { @@ -663,9 +534,9 @@ private Mono getSubscriptionLevelTaskAsync(String ascLocation /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -674,16 +545,16 @@ private Mono getSubscriptionLevelTaskAsync(String ascLocation * @return security task that we recommend to do in order to strengthen security along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSubscriptionLevelTaskWithResponse( - String ascLocation, String taskName, Context context) { + public Response getSubscriptionLevelTaskWithResponse(String ascLocation, String taskName, + Context context) { return getSubscriptionLevelTaskWithResponseAsync(ascLocation, taskName, context).block(); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -697,9 +568,9 @@ public SecurityTaskInner getSubscriptionLevelTask(String ascLocation, String tas /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -708,19 +579,15 @@ public SecurityTaskInner getSubscriptionLevelTask(String ascLocation, String tas * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelTaskStateWithResponseAsync( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { + private Mono> updateSubscriptionLevelTaskStateWithResponseAsync(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -735,26 +602,16 @@ private Mono> updateSubscriptionLevelTaskStateWithResponseAsync( final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateSubscriptionLevelTaskState( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - taskName, - taskUpdateActionType, - accept, - context)) + .withContext(context -> service.updateSubscriptionLevelTaskState(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, taskName, taskUpdateActionType, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @param context The context to associate with this operation. @@ -764,19 +621,15 @@ private Mono> updateSubscriptionLevelTaskStateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateSubscriptionLevelTaskStateWithResponseAsync( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType, Context context) { + private Mono> updateSubscriptionLevelTaskStateWithResponseAsync(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -791,23 +644,15 @@ private Mono> updateSubscriptionLevelTaskStateWithResponseAsync( final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateSubscriptionLevelTaskState( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - ascLocation, - taskName, - taskUpdateActionType, - accept, - context); + return service.updateSubscriptionLevelTaskState(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), ascLocation, taskName, taskUpdateActionType, accept, context); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -816,17 +661,17 @@ private Mono> updateSubscriptionLevelTaskStateWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateSubscriptionLevelTaskStateAsync( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { + private Mono updateSubscriptionLevelTaskStateAsync(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType) { return updateSubscriptionLevelTaskStateWithResponseAsync(ascLocation, taskName, taskUpdateActionType) .flatMap(ignored -> Mono.empty()); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @param context The context to associate with this operation. @@ -836,17 +681,17 @@ private Mono updateSubscriptionLevelTaskStateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateSubscriptionLevelTaskStateWithResponse( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType, Context context) { + public Response updateSubscriptionLevelTaskStateWithResponse(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType, Context context) { return updateSubscriptionLevelTaskStateWithResponseAsync(ascLocation, taskName, taskUpdateActionType, context) .block(); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -854,39 +699,35 @@ public Response updateSubscriptionLevelTaskStateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateSubscriptionLevelTaskState( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { + public void updateSubscriptionLevelTaskState(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType) { updateSubscriptionLevelTaskStateWithResponse(ascLocation, taskName, taskUpdateActionType, Context.NONE); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String ascLocation, String filter) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String ascLocation, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -898,59 +739,38 @@ private Mono> listByResourceGroupSinglePageAsyn final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String ascLocation, String filter, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String ascLocation, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -963,33 +783,19 @@ private Mono> listByResourceGroupSinglePageAsyn final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, ascLocation, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -997,20 +803,19 @@ private Mono> listByResourceGroupSinglePageAsyn * @return list of security task recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, String ascLocation, String filter) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, ascLocation, filter), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String ascLocation, + String filter) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, ascLocation, filter), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1019,18 +824,17 @@ private PagedFlux listByResourceGroupAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String ascLocation) { final String filter = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, ascLocation, filter), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, ascLocation, filter), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1039,8 +843,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @return list of security task recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, String ascLocation, String filter, Context context) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String ascLocation, + String filter, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, ascLocation, filter, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); @@ -1048,11 +852,11 @@ private PagedFlux listByResourceGroupAsync( /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1066,11 +870,11 @@ public PagedIterable listByResourceGroup(String resourceGroup /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param filter OData filter. Optional. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1079,39 +883,35 @@ public PagedIterable listByResourceGroup(String resourceGroup * @return list of security task recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, String ascLocation, String filter, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, String ascLocation, + String filter, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, ascLocation, filter, context)); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security task that we recommend to do in order to strengthen security along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourceGroupLevelTaskWithResponseAsync( - String resourceGroupName, String ascLocation, String taskName) { + private Mono> getResourceGroupLevelTaskWithResponseAsync(String resourceGroupName, + String ascLocation, String taskName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1126,50 +926,36 @@ private Mono> getResourceGroupLevelTaskWithResponseA final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getResourceGroupLevelTask( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - taskName, - accept, - context)) + .withContext(context -> service.getResourceGroupLevelTask(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, taskName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return security task that we recommend to do in order to strengthen security along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourceGroupLevelTaskWithResponseAsync( - String resourceGroupName, String ascLocation, String taskName, Context context) { + private Mono> getResourceGroupLevelTaskWithResponseAsync(String resourceGroupName, + String ascLocation, String taskName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1184,46 +970,38 @@ private Mono> getResourceGroupLevelTaskWithResponseA final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getResourceGroupLevelTask( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - taskName, - accept, - context); + return service.getResourceGroupLevelTask(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, ascLocation, taskName, accept, context); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security task that we recommend to do in order to strengthen security on successful completion of {@link - * Mono}. + * @return security task that we recommend to do in order to strengthen security on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getResourceGroupLevelTaskAsync( - String resourceGroupName, String ascLocation, String taskName) { + private Mono getResourceGroupLevelTaskAsync(String resourceGroupName, String ascLocation, + String taskName) { return getResourceGroupLevelTaskWithResponseAsync(resourceGroupName, ascLocation, taskName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1232,18 +1010,18 @@ private Mono getResourceGroupLevelTaskAsync( * @return security task that we recommend to do in order to strengthen security along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getResourceGroupLevelTaskWithResponse( - String resourceGroupName, String ascLocation, String taskName, Context context) { + public Response getResourceGroupLevelTaskWithResponse(String resourceGroupName, + String ascLocation, String taskName, Context context) { return getResourceGroupLevelTaskWithResponseAsync(resourceGroupName, ascLocation, taskName, context).block(); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1257,11 +1035,11 @@ public SecurityTaskInner getResourceGroupLevelTask(String resourceGroupName, Str /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1270,19 +1048,15 @@ public SecurityTaskInner getResourceGroupLevelTask(String resourceGroupName, Str * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelTaskStateWithResponseAsync( - String resourceGroupName, String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { + private Mono> updateResourceGroupLevelTaskStateWithResponseAsync(String resourceGroupName, + String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1301,29 +1075,19 @@ private Mono> updateResourceGroupLevelTaskStateWithResponseAsync( final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateResourceGroupLevelTaskState( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - taskName, - taskUpdateActionType, - accept, - context)) + .withContext(context -> service.updateResourceGroupLevelTaskState(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, taskName, taskUpdateActionType, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @param context The context to associate with this operation. @@ -1333,23 +1097,15 @@ private Mono> updateResourceGroupLevelTaskStateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateResourceGroupLevelTaskStateWithResponseAsync( - String resourceGroupName, - String ascLocation, - String taskName, - TaskUpdateActionType taskUpdateActionType, - Context context) { + private Mono> updateResourceGroupLevelTaskStateWithResponseAsync(String resourceGroupName, + String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1368,26 +1124,18 @@ private Mono> updateResourceGroupLevelTaskStateWithResponseAsync( final String apiVersion = "2015-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateResourceGroupLevelTaskState( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - taskName, - taskUpdateActionType, - accept, - context); + return service.updateResourceGroupLevelTaskState(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, ascLocation, taskName, taskUpdateActionType, accept, + context); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1396,20 +1144,19 @@ private Mono> updateResourceGroupLevelTaskStateWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateResourceGroupLevelTaskStateAsync( - String resourceGroupName, String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { - return updateResourceGroupLevelTaskStateWithResponseAsync( - resourceGroupName, ascLocation, taskName, taskUpdateActionType) - .flatMap(ignored -> Mono.empty()); + private Mono updateResourceGroupLevelTaskStateAsync(String resourceGroupName, String ascLocation, + String taskName, TaskUpdateActionType taskUpdateActionType) { + return updateResourceGroupLevelTaskStateWithResponseAsync(resourceGroupName, ascLocation, taskName, + taskUpdateActionType).flatMap(ignored -> Mono.empty()); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @param context The context to associate with this operation. @@ -1419,24 +1166,19 @@ private Mono updateResourceGroupLevelTaskStateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateResourceGroupLevelTaskStateWithResponse( - String resourceGroupName, - String ascLocation, - String taskName, - TaskUpdateActionType taskUpdateActionType, - Context context) { - return updateResourceGroupLevelTaskStateWithResponseAsync( - resourceGroupName, ascLocation, taskName, taskUpdateActionType, context) - .block(); + public Response updateResourceGroupLevelTaskStateWithResponse(String resourceGroupName, String ascLocation, + String taskName, TaskUpdateActionType taskUpdateActionType, Context context) { + return updateResourceGroupLevelTaskStateWithResponseAsync(resourceGroupName, ascLocation, taskName, + taskUpdateActionType, context).block(); } /** * Recommended tasks that will help improve the security of the subscription proactively. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param taskName Name of the task object, will be a GUID. * @param taskUpdateActionType Type of the action to do on the task. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1444,22 +1186,23 @@ public Response updateResourceGroupLevelTaskStateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateResourceGroupLevelTaskState( - String resourceGroupName, String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { - updateResourceGroupLevelTaskStateWithResponse( - resourceGroupName, ascLocation, taskName, taskUpdateActionType, Context.NONE); + public void updateResourceGroupLevelTaskState(String resourceGroupName, String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType) { + updateResourceGroupLevelTaskStateWithResponse(resourceGroupName, ascLocation, taskName, taskUpdateActionType, + Context.NONE); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1467,37 +1210,28 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1505,36 +1239,27 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHomeRegionNextSinglePageAsync(String nextLink) { @@ -1542,75 +1267,58 @@ private Mono> listByHomeRegionNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByHomeRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1618,63 +1326,45 @@ private Mono> listByResourceGroupNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of security task recommendations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of security task recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksImpl.java index ec884a63c55c..7def20fbf2b0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TasksImpl.java @@ -29,33 +29,30 @@ public TasksImpl(TasksClient innerClient, com.azure.resourcemanager.security.Sec public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); } public PagedIterable list(String filter, Context context) { PagedIterable inner = this.serviceClient().list(filter, context); - return Utils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation) { PagedIterable inner = this.serviceClient().listByHomeRegion(ascLocation); - return Utils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation, String filter, Context context) { PagedIterable inner = this.serviceClient().listByHomeRegion(ascLocation, filter, context); - return Utils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); } - public Response getSubscriptionLevelTaskWithResponse( - String ascLocation, String taskName, Context context) { - Response inner = - this.serviceClient().getSubscriptionLevelTaskWithResponse(ascLocation, taskName, context); + public Response getSubscriptionLevelTaskWithResponse(String ascLocation, String taskName, + Context context) { + Response inner + = this.serviceClient().getSubscriptionLevelTaskWithResponse(ascLocation, taskName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityTaskImpl(inner.getValue(), this.manager())); } else { return null; @@ -71,42 +68,36 @@ public SecurityTask getSubscriptionLevelTask(String ascLocation, String taskName } } - public Response updateSubscriptionLevelTaskStateWithResponse( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType, Context context) { - return this - .serviceClient() - .updateSubscriptionLevelTaskStateWithResponse(ascLocation, taskName, taskUpdateActionType, context); + public Response updateSubscriptionLevelTaskStateWithResponse(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType, Context context) { + return this.serviceClient().updateSubscriptionLevelTaskStateWithResponse(ascLocation, taskName, + taskUpdateActionType, context); } - public void updateSubscriptionLevelTaskState( - String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { + public void updateSubscriptionLevelTaskState(String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType) { this.serviceClient().updateSubscriptionLevelTaskState(ascLocation, taskName, taskUpdateActionType); } public PagedIterable listByResourceGroup(String resourceGroupName, String ascLocation) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, ascLocation); - return Utils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, ascLocation); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup( - String resourceGroupName, String ascLocation, String filter, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, ascLocation, filter, context); - return Utils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName, String ascLocation, String filter, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, ascLocation, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecurityTaskImpl(inner1, this.manager())); } - public Response getResourceGroupLevelTaskWithResponse( - String resourceGroupName, String ascLocation, String taskName, Context context) { - Response inner = - this - .serviceClient() - .getResourceGroupLevelTaskWithResponse(resourceGroupName, ascLocation, taskName, context); + public Response getResourceGroupLevelTaskWithResponse(String resourceGroupName, String ascLocation, + String taskName, Context context) { + Response inner = this.serviceClient() + .getResourceGroupLevelTaskWithResponse(resourceGroupName, ascLocation, taskName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecurityTaskImpl(inner.getValue(), this.manager())); } else { return null; @@ -114,8 +105,8 @@ public Response getResourceGroupLevelTaskWithResponse( } public SecurityTask getResourceGroupLevelTask(String resourceGroupName, String ascLocation, String taskName) { - SecurityTaskInner inner = - this.serviceClient().getResourceGroupLevelTask(resourceGroupName, ascLocation, taskName); + SecurityTaskInner inner + = this.serviceClient().getResourceGroupLevelTask(resourceGroupName, ascLocation, taskName); if (inner != null) { return new SecurityTaskImpl(inner, this.manager()); } else { @@ -123,23 +114,16 @@ public SecurityTask getResourceGroupLevelTask(String resourceGroupName, String a } } - public Response updateResourceGroupLevelTaskStateWithResponse( - String resourceGroupName, - String ascLocation, - String taskName, - TaskUpdateActionType taskUpdateActionType, - Context context) { - return this - .serviceClient() - .updateResourceGroupLevelTaskStateWithResponse( - resourceGroupName, ascLocation, taskName, taskUpdateActionType, context); + public Response updateResourceGroupLevelTaskStateWithResponse(String resourceGroupName, String ascLocation, + String taskName, TaskUpdateActionType taskUpdateActionType, Context context) { + return this.serviceClient().updateResourceGroupLevelTaskStateWithResponse(resourceGroupName, ascLocation, + taskName, taskUpdateActionType, context); } - public void updateResourceGroupLevelTaskState( - String resourceGroupName, String ascLocation, String taskName, TaskUpdateActionType taskUpdateActionType) { - this - .serviceClient() - .updateResourceGroupLevelTaskState(resourceGroupName, ascLocation, taskName, taskUpdateActionType); + public void updateResourceGroupLevelTaskState(String resourceGroupName, String ascLocation, String taskName, + TaskUpdateActionType taskUpdateActionType) { + this.serviceClient().updateResourceGroupLevelTaskState(resourceGroupName, ascLocation, taskName, + taskUpdateActionType); } private TasksClient serviceClient() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesClientImpl.java index 28a78eafba17..25fc53278196 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.security.models.TopologyList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TopologiesClient. */ +/** + * An instance of this class provides access to all the operations defined in TopologiesClient. + */ public final class TopologiesClientImpl implements TopologiesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TopologiesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of TopologiesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TopologiesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(TopologiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(TopologiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,153 +62,111 @@ public final class TopologiesClientImpl implements TopologiesClient { @Host("{$host}") @ServiceInterface(name = "SecurityCenterTopolo") public interface TopologiesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/topologies") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/topologies") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHomeRegion( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("ascLocation") String ascLocation, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHomeRegion(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("ascLocation") String ascLocation, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/topologies/{topologyResourceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/topologies/{topologyResourceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("ascLocation") String ascLocation, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ascLocation") String ascLocation, @PathParam("topologyResourceName") String topologyResourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHomeRegionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list that allows to build a topology view of a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list that allows to build a topology view of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list that allows to build a topology view of a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription as paginated response with {@link - * PagedFlux}. + * @return a list that allows to build a topology view of a subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -211,27 +175,27 @@ private PagedFlux listAsync() { /** * Gets a list that allows to build a topology view of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription as paginated response with {@link - * PagedFlux}. + * @return a list that allows to build a topology view of a subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list that allows to build a topology view of a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription as paginated response with {@link - * PagedIterable}. + * @return a list that allows to build a topology view of a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -240,13 +204,13 @@ public PagedIterable list() { /** * Gets a list that allows to build a topology view of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription as paginated response with {@link - * PagedIterable}. + * @return a list that allows to build a topology view of a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -255,28 +219,24 @@ public PagedIterable list(Context context) { /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription and location along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list that allows to build a topology view of a subscription and location along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHomeRegionSinglePageAsync(String ascLocation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -284,54 +244,35 @@ private Mono> listByHomeRegionSinglePageAsy final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHomeRegion( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - ascLocation, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), + ascLocation, apiVersion, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list that allows to build a topology view of a subscription and location along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a list that allows to build a topology view of a subscription and location along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionSinglePageAsync( - String ascLocation, Context context) { + private Mono> listByHomeRegionSinglePageAsync(String ascLocation, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (ascLocation == null) { return Mono.error(new IllegalArgumentException("Parameter ascLocation is required and cannot be null.")); @@ -340,66 +281,57 @@ private Mono> listByHomeRegionSinglePageAsy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHomeRegion( - this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHomeRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), ascLocation, apiVersion, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription and location as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink)); } /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription and location as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHomeRegionAsync(String ascLocation, Context context) { - return new PagedFlux<>( - () -> listByHomeRegionSinglePageAsync(ascLocation, context), + return new PagedFlux<>(() -> listByHomeRegionSinglePageAsync(ascLocation, context), nextLink -> listByHomeRegionNextSinglePageAsync(nextLink, context)); } /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation) { @@ -408,15 +340,15 @@ public PagedIterable listByHomeRegion(String ascLocation) /** * Gets a list that allows to build a topology view of a subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list that allows to build a topology view of a subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHomeRegion(String ascLocation, Context context) { @@ -425,11 +357,11 @@ public PagedIterable listByHomeRegion(String ascLocation, /** * Gets a specific topology component. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param topologyResourceName Name of a topology resources collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -437,19 +369,15 @@ public PagedIterable listByHomeRegion(String ascLocation, * @return a specific topology component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String topologyResourceName) { + private Mono> getWithResponseAsync(String resourceGroupName, String ascLocation, + String topologyResourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -465,28 +393,18 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - topologyResourceName, - apiVersion, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, ascLocation, topologyResourceName, apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific topology component. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param topologyResourceName Name of a topology resources collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -495,19 +413,15 @@ private Mono> getWithResponseAsync( * @return a specific topology component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ascLocation, String topologyResourceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String ascLocation, + String topologyResourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -523,25 +437,17 @@ private Mono> getWithResponseAsync( final String apiVersion = "2020-01-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - ascLocation, - topologyResourceName, - apiVersion, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, ascLocation, + topologyResourceName, apiVersion, accept, context); } /** * Gets a specific topology component. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param topologyResourceName Name of a topology resources collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -549,19 +455,19 @@ private Mono> getWithResponseAsync( * @return a specific topology component on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String ascLocation, String topologyResourceName) { + private Mono getAsync(String resourceGroupName, String ascLocation, + String topologyResourceName) { return getWithResponseAsync(resourceGroupName, ascLocation, topologyResourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a specific topology component. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param topologyResourceName Name of a topology resources collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -570,18 +476,18 @@ private Mono getAsync( * @return a specific topology component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ascLocation, String topologyResourceName, Context context) { + public Response getWithResponse(String resourceGroupName, String ascLocation, + String topologyResourceName, Context context) { return getWithResponseAsync(resourceGroupName, ascLocation, topologyResourceName, context).block(); } /** * Gets a specific topology component. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param topologyResourceName Name of a topology resources collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -595,9 +501,10 @@ public TopologyResourceInner get(String resourceGroupName, String ascLocation, S /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -609,31 +516,22 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -646,31 +544,22 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -682,31 +571,23 @@ private Mono> listByHomeRegionNextSinglePag return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -714,29 +595,19 @@ private Mono> listByHomeRegionNextSinglePag * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHomeRegionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByHomeRegionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHomeRegionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesImpl.java index 7aa969963df6..368bedb9ddc8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologiesImpl.java @@ -21,41 +21,38 @@ public final class TopologiesImpl implements Topologies { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public TopologiesImpl( - TopologiesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public TopologiesImpl(TopologiesClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation) { PagedIterable inner = this.serviceClient().listByHomeRegion(ascLocation); - return Utils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); } public PagedIterable listByHomeRegion(String ascLocation, Context context) { PagedIterable inner = this.serviceClient().listByHomeRegion(ascLocation, context); - return Utils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TopologyResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String ascLocation, String topologyResourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, ascLocation, topologyResourceName, context); + public Response getWithResponse(String resourceGroupName, String ascLocation, + String topologyResourceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, ascLocation, topologyResourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new TopologyResourceImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologyResourceImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologyResourceImpl.java index 9a4e23501480..33b2c36fb716 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologyResourceImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/TopologyResourceImpl.java @@ -16,8 +16,8 @@ public final class TopologyResourceImpl implements TopologyResource { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - TopologyResourceImpl( - TopologyResourceInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + TopologyResourceImpl(TopologyResourceInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingImpl.java index 2fdd469eb260..495178a9739b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingImpl.java @@ -45,22 +45,14 @@ private com.azure.resourcemanager.security.SecurityManager manager() { private String workspaceSettingName; public WorkspaceSetting create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceSettings() - .createWithResponse(workspaceSettingName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceSettings() + .createWithResponse(workspaceSettingName, this.innerModel(), Context.NONE).getValue(); return this; } public WorkspaceSetting create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceSettings() - .createWithResponse(workspaceSettingName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceSettings() + .createWithResponse(workspaceSettingName, this.innerModel(), context).getValue(); return this; } @@ -75,49 +67,33 @@ public WorkspaceSettingImpl update() { } public WorkspaceSetting apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceSettings() - .updateWithResponse(workspaceSettingName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceSettings() + .updateWithResponse(workspaceSettingName, this.innerModel(), Context.NONE).getValue(); return this; } public WorkspaceSetting apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceSettings() - .updateWithResponse(workspaceSettingName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceSettings() + .updateWithResponse(workspaceSettingName, this.innerModel(), context).getValue(); return this; } - WorkspaceSettingImpl( - WorkspaceSettingInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { + WorkspaceSettingImpl(WorkspaceSettingInner innerObject, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.workspaceSettingName = Utils.getValueFromIdByName(innerObject.id(), "workspaceSettings"); + this.workspaceSettingName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaceSettings"); } public WorkspaceSetting refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceSettings() - .getWithResponse(workspaceSettingName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceSettings() + .getWithResponse(workspaceSettingName, Context.NONE).getValue(); return this; } public WorkspaceSetting refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceSettings() - .getWithResponse(workspaceSettingName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceSettings() + .getWithResponse(workspaceSettingName, context).getValue(); return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsClientImpl.java index 7c0ea16bebac..0ca76484bc65 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsClientImpl.java @@ -34,22 +34,28 @@ import com.azure.resourcemanager.security.models.WorkspaceSettingList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkspaceSettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceSettingsClient. + */ public final class WorkspaceSettingsClientImpl implements WorkspaceSettingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspaceSettingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SecurityCenterImpl client; /** * Initializes an instance of WorkspaceSettingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkspaceSettingsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(WorkspaceSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WorkspaceSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -60,165 +66,122 @@ public final class WorkspaceSettingsClientImpl implements WorkspaceSettingsClien @Host("{$host}") @ServiceInterface(name = "SecurityCenterWorksp") public interface WorkspaceSettingsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("workspaceSettingName") String workspaceSettingName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("workspaceSettingName") String workspaceSettingName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("workspaceSettingName") String workspaceSettingName, - @BodyParam("application/json") WorkspaceSettingInner workspaceSetting, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceSettingInner workspaceSetting, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("workspaceSettingName") String workspaceSettingName, - @BodyParam("application/json") WorkspaceSettingInner workspaceSetting, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceSettingInner workspaceSetting, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}") - @ExpectedResponses({204}) + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("workspaceSettingName") String workspaceSettingName, - @HeaderParam("Accept") String accept, + @PathParam("workspaceSettingName") String workspaceSettingName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspace settings response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of workspace settings response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspace settings response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of workspace settings response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of workspace settings response as paginated response with {@link PagedFlux}. @@ -231,7 +194,7 @@ private PagedFlux listAsync() { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -240,14 +203,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of workspace settings response as paginated response with {@link PagedIterable}. @@ -260,7 +223,7 @@ public PagedIterable list() { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -275,27 +238,23 @@ public PagedIterable list(Context context) { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String workspaceSettingName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -304,44 +263,32 @@ private Mono> getWithResponseAsync(String worksp final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + workspaceSettingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param workspaceSettingName Name of the security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String workspaceSettingName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -350,26 +297,20 @@ private Mono> getWithResponseAsync(String worksp final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - accept, - context); + return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), workspaceSettingName, + accept, context); } /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String workspaceSettingName) { @@ -379,7 +320,7 @@ private Mono getAsync(String workspaceSettingName) { /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param workspaceSettingName Name of the security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -395,7 +336,7 @@ public Response getWithResponse(String workspaceSettingNa /** * Settings about where we should store your security data and logs. If the result is empty, it means that no * custom-workspace configuration was set. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -409,29 +350,25 @@ public WorkspaceSettingInner get(String workspaceSettingName) { /** * creating settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting) { + private Mono> createWithResponseAsync(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -446,23 +383,14 @@ private Mono> createWithResponseAsync( final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - workspaceSetting, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), workspaceSettingName, workspaceSetting, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * creating settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @param context The context to associate with this operation. @@ -470,22 +398,18 @@ private Mono> createWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting, Context context) { + private Mono> createWithResponseAsync(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -500,38 +424,31 @@ private Mono> createWithResponseAsync( final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - workspaceSetting, - accept, - context); + return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + workspaceSettingName, workspaceSetting, accept, context); } /** * creating settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting) { + private Mono createAsync(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting) { return createWithResponseAsync(workspaceSettingName, workspaceSetting) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * creating settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @param context The context to associate with this operation. @@ -541,14 +458,14 @@ private Mono createAsync( * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting, Context context) { + public Response createWithResponse(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting, Context context) { return createWithResponseAsync(workspaceSettingName, workspaceSetting, context).block(); } /** * creating settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -563,29 +480,25 @@ public WorkspaceSettingInner create(String workspaceSettingName, WorkspaceSettin /** * Settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting) { + private Mono> updateWithResponseAsync(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -600,23 +513,14 @@ private Mono> updateWithResponseAsync( final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - workspaceSetting, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), workspaceSettingName, workspaceSetting, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @param context The context to associate with this operation. @@ -624,22 +528,18 @@ private Mono> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting, Context context) { + private Mono> updateWithResponseAsync(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -654,38 +554,31 @@ private Mono> updateWithResponseAsync( final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - workspaceSetting, - accept, - context); + return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + workspaceSettingName, workspaceSetting, accept, context); } /** * Settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configures where to store the OMS agent data for workspaces under a scope on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting) { + private Mono updateAsync(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting) { return updateWithResponseAsync(workspaceSettingName, workspaceSetting) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @param context The context to associate with this operation. @@ -695,14 +588,14 @@ private Mono updateAsync( * @return configures where to store the OMS agent data for workspaces under a scope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String workspaceSettingName, WorkspaceSettingInner workspaceSetting, Context context) { + public Response updateWithResponse(String workspaceSettingName, + WorkspaceSettingInner workspaceSetting, Context context) { return updateWithResponseAsync(workspaceSettingName, workspaceSetting, context).block(); } /** * Settings about where we should store your security data and logs. - * + * * @param workspaceSettingName Name of the security setting. * @param workspaceSetting Security data setting object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -717,7 +610,7 @@ public WorkspaceSettingInner update(String workspaceSettingName, WorkspaceSettin /** * Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -727,16 +620,12 @@ public WorkspaceSettingInner update(String workspaceSettingName, WorkspaceSettin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String workspaceSettingName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -745,22 +634,14 @@ private Mono> deleteWithResponseAsync(String workspaceSettingName final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), workspaceSettingName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace. - * + * * @param workspaceSettingName Name of the security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -771,16 +652,12 @@ private Mono> deleteWithResponseAsync(String workspaceSettingName @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String workspaceSettingName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceSettingName == null) { return Mono @@ -789,19 +666,13 @@ private Mono> deleteWithResponseAsync(String workspaceSettingName final String apiVersion = "2017-08-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - workspaceSettingName, - accept, - context); + return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + workspaceSettingName, accept, context); } /** * Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -815,7 +686,7 @@ private Mono deleteAsync(String workspaceSettingName) { /** * Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace. - * + * * @param workspaceSettingName Name of the security setting. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -830,7 +701,7 @@ public Response deleteWithResponse(String workspaceSettingName, Context co /** * Deletes the custom workspace settings for this subscription. new VMs will report to the default workspace. - * + * * @param workspaceSettingName Name of the security setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -843,14 +714,15 @@ public void delete(String workspaceSettingName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspace settings response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of workspace settings response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -858,37 +730,28 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspace settings response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of workspace settings response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -896,23 +759,13 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsImpl.java index 5917842ee7d1..766cb1dcc73e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/WorkspaceSettingsImpl.java @@ -21,29 +21,26 @@ public final class WorkspaceSettingsImpl implements WorkspaceSettings { private final com.azure.resourcemanager.security.SecurityManager serviceManager; - public WorkspaceSettingsImpl( - WorkspaceSettingsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { + public WorkspaceSettingsImpl(WorkspaceSettingsClient innerClient, + com.azure.resourcemanager.security.SecurityManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WorkspaceSettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceSettingImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new WorkspaceSettingImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceSettingImpl(inner1, this.manager())); } public Response getWithResponse(String workspaceSettingName, Context context) { Response inner = this.serviceClient().getWithResponse(workspaceSettingName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkspaceSettingImpl(inner.getValue(), this.manager())); } else { return null; @@ -68,53 +65,37 @@ public void delete(String workspaceSettingName) { } public WorkspaceSetting getById(String id) { - String workspaceSettingName = Utils.getValueFromIdByName(id, "workspaceSettings"); + String workspaceSettingName = ResourceManagerUtils.getValueFromIdByName(id, "workspaceSettings"); if (workspaceSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); } return this.getWithResponse(workspaceSettingName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String workspaceSettingName = Utils.getValueFromIdByName(id, "workspaceSettings"); + String workspaceSettingName = ResourceManagerUtils.getValueFromIdByName(id, "workspaceSettings"); if (workspaceSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); } return this.getWithResponse(workspaceSettingName, context); } public void deleteById(String id) { - String workspaceSettingName = Utils.getValueFromIdByName(id, "workspaceSettings"); + String workspaceSettingName = ResourceManagerUtils.getValueFromIdByName(id, "workspaceSettings"); if (workspaceSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); } this.deleteWithResponse(workspaceSettingName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String workspaceSettingName = Utils.getValueFromIdByName(id, "workspaceSettings"); + String workspaceSettingName = ResourceManagerUtils.getValueFromIdByName(id, "workspaceSettings"); if (workspaceSettingName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaceSettings'.", id))); } return this.deleteWithResponse(workspaceSettingName, context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/package-info.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/package-info.java index 5a853f731e88..25e2d88d9864 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/package-info.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for SecurityCenter. API spec for Microsoft.Security (Azure Security Center) - * resource provider. + * Package containing the implementations for SecurityCenter. + * API spec for Microsoft.Security (Azure Security Center) resource provider. */ package com.azure.resourcemanager.security.implementation; diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityState.java index 72e27397e81a..692f9c353be2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityState.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The connectivity state of the external AAD solution. */ +/** + * The connectivity state of the external AAD solution. + */ public final class AadConnectivityState extends ExpandableStringEnum { - /** Static value Discovered for AadConnectivityState. */ + /** + * Static value Discovered for AadConnectivityState. + */ public static final AadConnectivityState DISCOVERED = fromString("Discovered"); - /** Static value NotLicensed for AadConnectivityState. */ + /** + * Static value NotLicensed for AadConnectivityState. + */ public static final AadConnectivityState NOT_LICENSED = fromString("NotLicensed"); - /** Static value Connected for AadConnectivityState. */ + /** + * Static value Connected for AadConnectivityState. + */ public static final AadConnectivityState CONNECTED = fromString("Connected"); /** * Creates a new instance of AadConnectivityState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public AadConnectivityState() { /** * Creates or finds a AadConnectivityState from its string representation. - * + * * @param name a name to look for. * @return the corresponding AadConnectivityState. */ @@ -41,7 +49,7 @@ public static AadConnectivityState fromString(String name) { /** * Gets known AadConnectivityState values. - * + * * @return known AadConnectivityState values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityStateAutoGenerated.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityStateAutoGenerated.java index 6cea9268f7e2..3793ecc192a6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityStateAutoGenerated.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadConnectivityStateAutoGenerated.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes an Azure resource with kind. */ +/** + * Describes an Azure resource with kind. + */ @Fluent public class AadConnectivityStateAutoGenerated { /* @@ -16,13 +18,15 @@ public class AadConnectivityStateAutoGenerated { @JsonProperty(value = "connectivityState") private AadConnectivityState connectivityState; - /** Creates an instance of AadConnectivityStateAutoGenerated class. */ + /** + * Creates an instance of AadConnectivityStateAutoGenerated class. + */ public AadConnectivityStateAutoGenerated() { } /** * Get the connectivityState property: The connectivity state of the external AAD solution. - * + * * @return the connectivityState value. */ public AadConnectivityState connectivityState() { @@ -31,7 +35,7 @@ public AadConnectivityState connectivityState() { /** * Set the connectivityState property: The connectivity state of the external AAD solution. - * + * * @param connectivityState the connectivityState value to set. * @return the AadConnectivityStateAutoGenerated object itself. */ @@ -42,7 +46,7 @@ public AadConnectivityStateAutoGenerated withConnectivityState(AadConnectivitySt /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadExternalSecuritySolution.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadExternalSecuritySolution.java index 400b5421f072..e681f7183631 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadExternalSecuritySolution.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadExternalSecuritySolution.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Represents an AAD identity protection solution which sends logs to an OMS workspace. */ +/** + * Represents an AAD identity protection solution which sends logs to an OMS workspace. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("AAD") @Fluent @@ -21,13 +23,15 @@ public final class AadExternalSecuritySolution extends ExternalSecuritySolutionI @JsonProperty(value = "properties") private AadSolutionProperties properties; - /** Creates an instance of AadExternalSecuritySolution class. */ + /** + * Creates an instance of AadExternalSecuritySolution class. + */ public AadExternalSecuritySolution() { } /** * Get the properties property: The external security solution properties for AAD solutions. - * + * * @return the properties value. */ public AadSolutionProperties properties() { @@ -36,7 +40,7 @@ public AadSolutionProperties properties() { /** * Set the properties property: The external security solution properties for AAD solutions. - * + * * @param properties the properties value to set. * @return the AadExternalSecuritySolution object itself. */ @@ -47,7 +51,7 @@ public AadExternalSecuritySolution withProperties(AadSolutionProperties properti /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadSolutionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadSolutionProperties.java index 66c9643e1e5e..19b2c7df3f4e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadSolutionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AadSolutionProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The external security solution properties for AAD solutions. */ +/** + * The external security solution properties for AAD solutions. + */ @Fluent public final class AadSolutionProperties extends ExternalSecuritySolutionProperties { /* @@ -16,13 +18,15 @@ public final class AadSolutionProperties extends ExternalSecuritySolutionPropert @JsonProperty(value = "connectivityState") private AadConnectivityState connectivityState; - /** Creates an instance of AadSolutionProperties class. */ + /** + * Creates an instance of AadSolutionProperties class. + */ public AadSolutionProperties() { } /** * Get the connectivityState property: The connectivity state of the external AAD solution. - * + * * @return the connectivityState value. */ public AadConnectivityState connectivityState() { @@ -31,7 +35,7 @@ public AadConnectivityState connectivityState() { /** * Set the connectivityState property: The connectivity state of the external AAD solution. - * + * * @param connectivityState the connectivityState value to set. * @return the AadSolutionProperties object itself. */ @@ -40,21 +44,27 @@ public AadSolutionProperties withConnectivityState(AadConnectivityState connecti return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AadSolutionProperties withDeviceVendor(String deviceVendor) { super.withDeviceVendor(deviceVendor); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AadSolutionProperties withDeviceType(String deviceType) { super.withDeviceType(deviceType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AadSolutionProperties withWorkspace(ConnectedWorkspace workspace) { super.withWorkspace(workspace); @@ -63,7 +73,7 @@ public AadSolutionProperties withWorkspace(ConnectedWorkspace workspace) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionType.java index 9f8d0c26c795..e10d2e3b7371 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of the action that will be triggered by the Automation. */ +/** + * The type of the action that will be triggered by the Automation. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value LogicApp for ActionType. */ + /** + * Static value LogicApp for ActionType. + */ public static final ActionType LOGIC_APP = fromString("LogicApp"); - /** Static value EventHub for ActionType. */ + /** + * Static value EventHub for ActionType. + */ public static final ActionType EVENT_HUB = fromString("EventHub"); - /** Static value Workspace for ActionType. */ + /** + * Static value Workspace for ActionType. + */ public static final ActionType WORKSPACE = fromString("Workspace"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -41,7 +49,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediation.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediation.java new file mode 100644 index 000000000000..38c754d0aa60 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediation.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration payload for PR Annotations. + */ +@Fluent +public final class ActionableRemediation { + /* + * ActionableRemediation Setting. + * None - the setting was never set. + * Enabled - ActionableRemediation is enabled. + * Disabled - ActionableRemediation is disabled. + */ + @JsonProperty(value = "state") + private ActionableRemediationState state; + + /* + * Gets or sets list of categories and severity levels. + */ + @JsonProperty(value = "categoryConfigurations") + private List categoryConfigurations; + + /* + * Repository branch configuration for PR Annotations. + */ + @JsonProperty(value = "branchConfiguration") + private TargetBranchConfiguration branchConfiguration; + + /* + * Update Settings. + * + * Enabled - Resource should inherit configurations from parent. + * Disabled - Resource should not inherit configurations from parent. + */ + @JsonProperty(value = "inheritFromParentState") + private InheritFromParentState inheritFromParentState; + + /** + * Creates an instance of ActionableRemediation class. + */ + public ActionableRemediation() { + } + + /** + * Get the state property: ActionableRemediation Setting. + * None - the setting was never set. + * Enabled - ActionableRemediation is enabled. + * Disabled - ActionableRemediation is disabled. + * + * @return the state value. + */ + public ActionableRemediationState state() { + return this.state; + } + + /** + * Set the state property: ActionableRemediation Setting. + * None - the setting was never set. + * Enabled - ActionableRemediation is enabled. + * Disabled - ActionableRemediation is disabled. + * + * @param state the state value to set. + * @return the ActionableRemediation object itself. + */ + public ActionableRemediation withState(ActionableRemediationState state) { + this.state = state; + return this; + } + + /** + * Get the categoryConfigurations property: Gets or sets list of categories and severity levels. + * + * @return the categoryConfigurations value. + */ + public List categoryConfigurations() { + return this.categoryConfigurations; + } + + /** + * Set the categoryConfigurations property: Gets or sets list of categories and severity levels. + * + * @param categoryConfigurations the categoryConfigurations value to set. + * @return the ActionableRemediation object itself. + */ + public ActionableRemediation withCategoryConfigurations(List categoryConfigurations) { + this.categoryConfigurations = categoryConfigurations; + return this; + } + + /** + * Get the branchConfiguration property: Repository branch configuration for PR Annotations. + * + * @return the branchConfiguration value. + */ + public TargetBranchConfiguration branchConfiguration() { + return this.branchConfiguration; + } + + /** + * Set the branchConfiguration property: Repository branch configuration for PR Annotations. + * + * @param branchConfiguration the branchConfiguration value to set. + * @return the ActionableRemediation object itself. + */ + public ActionableRemediation withBranchConfiguration(TargetBranchConfiguration branchConfiguration) { + this.branchConfiguration = branchConfiguration; + return this; + } + + /** + * Get the inheritFromParentState property: Update Settings. + * + * Enabled - Resource should inherit configurations from parent. + * Disabled - Resource should not inherit configurations from parent. + * + * @return the inheritFromParentState value. + */ + public InheritFromParentState inheritFromParentState() { + return this.inheritFromParentState; + } + + /** + * Set the inheritFromParentState property: Update Settings. + * + * Enabled - Resource should inherit configurations from parent. + * Disabled - Resource should not inherit configurations from parent. + * + * @param inheritFromParentState the inheritFromParentState value to set. + * @return the ActionableRemediation object itself. + */ + public ActionableRemediation withInheritFromParentState(InheritFromParentState inheritFromParentState) { + this.inheritFromParentState = inheritFromParentState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (categoryConfigurations() != null) { + categoryConfigurations().forEach(e -> e.validate()); + } + if (branchConfiguration() != null) { + branchConfiguration().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediationState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediationState.java new file mode 100644 index 000000000000..3a7ee9c6462b --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActionableRemediationState.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * ActionableRemediation Setting. + * None - the setting was never set. + * Enabled - ActionableRemediation is enabled. + * Disabled - ActionableRemediation is disabled. + */ +public final class ActionableRemediationState extends ExpandableStringEnum { + /** + * Static value None for ActionableRemediationState. + */ + public static final ActionableRemediationState NONE = fromString("None"); + + /** + * Static value Disabled for ActionableRemediationState. + */ + public static final ActionableRemediationState DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for ActionableRemediationState. + */ + public static final ActionableRemediationState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of ActionableRemediationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionableRemediationState() { + } + + /** + * Creates or finds a ActionableRemediationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionableRemediationState. + */ + @JsonCreator + public static ActionableRemediationState fromString(String name) { + return fromString(name, ActionableRemediationState.class); + } + + /** + * Gets known ActionableRemediationState values. + * + * @return known ActionableRemediationState values. + */ + public static Collection values() { + return values(ActionableRemediationState.class); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActiveConnectionsNotInAllowedRange.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActiveConnectionsNotInAllowedRange.java index b8f0145eb288..6b7905f7e4d5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActiveConnectionsNotInAllowedRange.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ActiveConnectionsNotInAllowedRange.java @@ -9,37 +9,49 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Number of active connections is not in allowed range. */ +/** + * Number of active connections is not in allowed range. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("ActiveConnectionsNotInAllowedRange") @Fluent public final class ActiveConnectionsNotInAllowedRange extends TimeWindowCustomAlertRule { - /** Creates an instance of ActiveConnectionsNotInAllowedRange class. */ + /** + * Creates an instance of ActiveConnectionsNotInAllowedRange class. + */ public ActiveConnectionsNotInAllowedRange() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ActiveConnectionsNotInAllowedRange withTimeWindowSize(Duration timeWindowSize) { super.withTimeWindowSize(timeWindowSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ActiveConnectionsNotInAllowedRange withMinThreshold(int minThreshold) { super.withMinThreshold(minThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ActiveConnectionsNotInAllowedRange withMaxThreshold(int maxThreshold) { super.withMaxThreshold(maxThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ActiveConnectionsNotInAllowedRange withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -48,7 +60,7 @@ public ActiveConnectionsNotInAllowedRange withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroup.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroup.java index cb789472d089..7f2d4319197a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroup.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroup.java @@ -9,32 +9,34 @@ import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupInner; import java.util.List; -/** An immutable client-side representation of AdaptiveApplicationControlGroup. */ +/** + * An immutable client-side representation of AdaptiveApplicationControlGroup. + */ public interface AdaptiveApplicationControlGroup { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: Location where the resource is stored. - * + * * @return the location value. */ String location(); @@ -42,7 +44,7 @@ public interface AdaptiveApplicationControlGroup { /** * Gets the enforcementMode property: The application control policy enforcement/protection mode of the machine * group. - * + * * @return the enforcementMode value. */ EnforcementMode enforcementMode(); @@ -50,246 +52,281 @@ public interface AdaptiveApplicationControlGroup { /** * Gets the protectionMode property: The protection mode of the collection/file types. Exe/Msi/Script are used for * Windows, Executable is used for Linux. - * + * * @return the protectionMode value. */ ProtectionMode protectionMode(); /** * Gets the configurationStatus property: The configuration status of the machines group or machine or rule. - * + * * @return the configurationStatus value. */ ConfigurationStatus configurationStatus(); /** * Gets the recommendationStatus property: The initial recommendation status of the machine group or machine. - * + * * @return the recommendationStatus value. */ RecommendationStatus recommendationStatus(); /** * Gets the issues property: The issues property. - * + * * @return the issues value. */ List issues(); /** * Gets the sourceSystem property: The source type of the machine group. - * + * * @return the sourceSystem value. */ SourceSystem sourceSystem(); /** * Gets the vmRecommendations property: The vmRecommendations property. - * + * * @return the vmRecommendations value. */ List vmRecommendations(); /** * Gets the pathRecommendations property: The pathRecommendations property. - * + * * @return the pathRecommendations value. */ List pathRecommendations(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupInner object. - * + * * @return the inner object. */ AdaptiveApplicationControlGroupInner innerModel(); - /** The entirety of the AdaptiveApplicationControlGroup definition. */ + /** + * The entirety of the AdaptiveApplicationControlGroup definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The AdaptiveApplicationControlGroup definition stages. */ + + /** + * The AdaptiveApplicationControlGroup definition stages. + */ interface DefinitionStages { - /** The first stage of the AdaptiveApplicationControlGroup definition. */ + /** + * The first stage of the AdaptiveApplicationControlGroup definition. + */ interface Blank extends WithParentResource { } - /** The stage of the AdaptiveApplicationControlGroup definition allowing to specify parent resource. */ + + /** + * The stage of the AdaptiveApplicationControlGroup definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies ascLocation. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @return the next definition stage. */ WithCreate withExistingLocation(String ascLocation); } + /** * The stage of the AdaptiveApplicationControlGroup definition which contains all the minimum required * properties for the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithEnforcementMode, - DefinitionStages.WithProtectionMode, - DefinitionStages.WithVmRecommendations, - DefinitionStages.WithPathRecommendations { + interface WithCreate extends DefinitionStages.WithEnforcementMode, DefinitionStages.WithProtectionMode, + DefinitionStages.WithVmRecommendations, DefinitionStages.WithPathRecommendations { /** * Executes the create request. - * + * * @return the created resource. */ AdaptiveApplicationControlGroup create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ AdaptiveApplicationControlGroup create(Context context); } - /** The stage of the AdaptiveApplicationControlGroup definition allowing to specify enforcementMode. */ + + /** + * The stage of the AdaptiveApplicationControlGroup definition allowing to specify enforcementMode. + */ interface WithEnforcementMode { /** * Specifies the enforcementMode property: The application control policy enforcement/protection mode of the * machine group. - * + * * @param enforcementMode The application control policy enforcement/protection mode of the machine group. * @return the next definition stage. */ WithCreate withEnforcementMode(EnforcementMode enforcementMode); } - /** The stage of the AdaptiveApplicationControlGroup definition allowing to specify protectionMode. */ + + /** + * The stage of the AdaptiveApplicationControlGroup definition allowing to specify protectionMode. + */ interface WithProtectionMode { /** * Specifies the protectionMode property: The protection mode of the collection/file types. Exe/Msi/Script * are used for Windows, Executable is used for Linux.. - * + * * @param protectionMode The protection mode of the collection/file types. Exe/Msi/Script are used for - * Windows, Executable is used for Linux. + * Windows, Executable is used for Linux. * @return the next definition stage. */ WithCreate withProtectionMode(ProtectionMode protectionMode); } - /** The stage of the AdaptiveApplicationControlGroup definition allowing to specify vmRecommendations. */ + + /** + * The stage of the AdaptiveApplicationControlGroup definition allowing to specify vmRecommendations. + */ interface WithVmRecommendations { /** * Specifies the vmRecommendations property: The vmRecommendations property.. - * + * * @param vmRecommendations The vmRecommendations property. * @return the next definition stage. */ WithCreate withVmRecommendations(List vmRecommendations); } - /** The stage of the AdaptiveApplicationControlGroup definition allowing to specify pathRecommendations. */ + + /** + * The stage of the AdaptiveApplicationControlGroup definition allowing to specify pathRecommendations. + */ interface WithPathRecommendations { /** * Specifies the pathRecommendations property: The pathRecommendations property.. - * + * * @param pathRecommendations The pathRecommendations property. * @return the next definition stage. */ WithCreate withPathRecommendations(List pathRecommendations); } } + /** * Begins update for the AdaptiveApplicationControlGroup resource. - * + * * @return the stage of resource update. */ AdaptiveApplicationControlGroup.Update update(); - /** The template for AdaptiveApplicationControlGroup update. */ - interface Update - extends UpdateStages.WithEnforcementMode, - UpdateStages.WithProtectionMode, - UpdateStages.WithVmRecommendations, - UpdateStages.WithPathRecommendations { + /** + * The template for AdaptiveApplicationControlGroup update. + */ + interface Update extends UpdateStages.WithEnforcementMode, UpdateStages.WithProtectionMode, + UpdateStages.WithVmRecommendations, UpdateStages.WithPathRecommendations { /** * Executes the update request. - * + * * @return the updated resource. */ AdaptiveApplicationControlGroup apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ AdaptiveApplicationControlGroup apply(Context context); } - /** The AdaptiveApplicationControlGroup update stages. */ + + /** + * The AdaptiveApplicationControlGroup update stages. + */ interface UpdateStages { - /** The stage of the AdaptiveApplicationControlGroup update allowing to specify enforcementMode. */ + /** + * The stage of the AdaptiveApplicationControlGroup update allowing to specify enforcementMode. + */ interface WithEnforcementMode { /** * Specifies the enforcementMode property: The application control policy enforcement/protection mode of the * machine group. - * + * * @param enforcementMode The application control policy enforcement/protection mode of the machine group. * @return the next definition stage. */ Update withEnforcementMode(EnforcementMode enforcementMode); } - /** The stage of the AdaptiveApplicationControlGroup update allowing to specify protectionMode. */ + + /** + * The stage of the AdaptiveApplicationControlGroup update allowing to specify protectionMode. + */ interface WithProtectionMode { /** * Specifies the protectionMode property: The protection mode of the collection/file types. Exe/Msi/Script * are used for Windows, Executable is used for Linux.. - * + * * @param protectionMode The protection mode of the collection/file types. Exe/Msi/Script are used for - * Windows, Executable is used for Linux. + * Windows, Executable is used for Linux. * @return the next definition stage. */ Update withProtectionMode(ProtectionMode protectionMode); } - /** The stage of the AdaptiveApplicationControlGroup update allowing to specify vmRecommendations. */ + + /** + * The stage of the AdaptiveApplicationControlGroup update allowing to specify vmRecommendations. + */ interface WithVmRecommendations { /** * Specifies the vmRecommendations property: The vmRecommendations property.. - * + * * @param vmRecommendations The vmRecommendations property. * @return the next definition stage. */ Update withVmRecommendations(List vmRecommendations); } - /** The stage of the AdaptiveApplicationControlGroup update allowing to specify pathRecommendations. */ + + /** + * The stage of the AdaptiveApplicationControlGroup update allowing to specify pathRecommendations. + */ interface WithPathRecommendations { /** * Specifies the pathRecommendations property: The pathRecommendations property.. - * + * * @param pathRecommendations The pathRecommendations property. * @return the next definition stage. */ Update withPathRecommendations(List pathRecommendations); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ AdaptiveApplicationControlGroup refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroups.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroups.java index a394948e9205..259c22a7be24 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroups.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlGroups.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupsInner; import java.util.List; -/** An immutable client-side representation of AdaptiveApplicationControlGroups. */ +/** + * An immutable client-side representation of AdaptiveApplicationControlGroups. + */ public interface AdaptiveApplicationControlGroups { /** * Gets the value property: The value property. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupsInner object. - * + * * @return the inner object. */ AdaptiveApplicationControlGroupsInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssue.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssue.java index a4c59fbd56e6..660a6b156bc5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssue.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssue.java @@ -8,32 +8,46 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** An alert that machines within a group can have. */ +/** + * An alert that machines within a group can have. + */ public final class AdaptiveApplicationControlIssue extends ExpandableStringEnum { - /** Static value ViolationsAudited for AdaptiveApplicationControlIssue. */ + /** + * Static value ViolationsAudited for AdaptiveApplicationControlIssue. + */ public static final AdaptiveApplicationControlIssue VIOLATIONS_AUDITED = fromString("ViolationsAudited"); - /** Static value ViolationsBlocked for AdaptiveApplicationControlIssue. */ + /** + * Static value ViolationsBlocked for AdaptiveApplicationControlIssue. + */ public static final AdaptiveApplicationControlIssue VIOLATIONS_BLOCKED = fromString("ViolationsBlocked"); - /** Static value MsiAndScriptViolationsAudited for AdaptiveApplicationControlIssue. */ - public static final AdaptiveApplicationControlIssue MSI_AND_SCRIPT_VIOLATIONS_AUDITED = - fromString("MsiAndScriptViolationsAudited"); + /** + * Static value MsiAndScriptViolationsAudited for AdaptiveApplicationControlIssue. + */ + public static final AdaptiveApplicationControlIssue MSI_AND_SCRIPT_VIOLATIONS_AUDITED + = fromString("MsiAndScriptViolationsAudited"); - /** Static value MsiAndScriptViolationsBlocked for AdaptiveApplicationControlIssue. */ - public static final AdaptiveApplicationControlIssue MSI_AND_SCRIPT_VIOLATIONS_BLOCKED = - fromString("MsiAndScriptViolationsBlocked"); + /** + * Static value MsiAndScriptViolationsBlocked for AdaptiveApplicationControlIssue. + */ + public static final AdaptiveApplicationControlIssue MSI_AND_SCRIPT_VIOLATIONS_BLOCKED + = fromString("MsiAndScriptViolationsBlocked"); - /** Static value ExecutableViolationsAudited for AdaptiveApplicationControlIssue. */ - public static final AdaptiveApplicationControlIssue EXECUTABLE_VIOLATIONS_AUDITED = - fromString("ExecutableViolationsAudited"); + /** + * Static value ExecutableViolationsAudited for AdaptiveApplicationControlIssue. + */ + public static final AdaptiveApplicationControlIssue EXECUTABLE_VIOLATIONS_AUDITED + = fromString("ExecutableViolationsAudited"); - /** Static value RulesViolatedManually for AdaptiveApplicationControlIssue. */ + /** + * Static value RulesViolatedManually for AdaptiveApplicationControlIssue. + */ public static final AdaptiveApplicationControlIssue RULES_VIOLATED_MANUALLY = fromString("RulesViolatedManually"); /** * Creates a new instance of AdaptiveApplicationControlIssue value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +56,7 @@ public AdaptiveApplicationControlIssue() { /** * Creates or finds a AdaptiveApplicationControlIssue from its string representation. - * + * * @param name a name to look for. * @return the corresponding AdaptiveApplicationControlIssue. */ @@ -53,7 +67,7 @@ public static AdaptiveApplicationControlIssue fromString(String name) { /** * Gets known AdaptiveApplicationControlIssue values. - * + * * @return known AdaptiveApplicationControlIssue values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssueSummary.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssueSummary.java index 57abcac239b7..dedc12ab3abf 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssueSummary.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControlIssueSummary.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents a summary of the alerts of the machine group. */ +/** + * Represents a summary of the alerts of the machine group. + */ @Fluent public final class AdaptiveApplicationControlIssueSummary { /* @@ -22,13 +24,15 @@ public final class AdaptiveApplicationControlIssueSummary { @JsonProperty(value = "numberOfVms") private Float numberOfVms; - /** Creates an instance of AdaptiveApplicationControlIssueSummary class. */ + /** + * Creates an instance of AdaptiveApplicationControlIssueSummary class. + */ public AdaptiveApplicationControlIssueSummary() { } /** * Get the issue property: An alert that machines within a group can have. - * + * * @return the issue value. */ public AdaptiveApplicationControlIssue issue() { @@ -37,7 +41,7 @@ public AdaptiveApplicationControlIssue issue() { /** * Set the issue property: An alert that machines within a group can have. - * + * * @param issue the issue value to set. * @return the AdaptiveApplicationControlIssueSummary object itself. */ @@ -48,7 +52,7 @@ public AdaptiveApplicationControlIssueSummary withIssue(AdaptiveApplicationContr /** * Get the numberOfVms property: The number of machines in the group that have this alert. - * + * * @return the numberOfVms value. */ public Float numberOfVms() { @@ -57,7 +61,7 @@ public Float numberOfVms() { /** * Set the numberOfVms property: The number of machines in the group that have this alert. - * + * * @param numberOfVms the numberOfVms value to set. * @return the AdaptiveApplicationControlIssueSummary object itself. */ @@ -68,7 +72,7 @@ public AdaptiveApplicationControlIssueSummary withNumberOfVms(Float numberOfVms) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControls.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControls.java index e2584d847eb7..f6dc614ced7c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControls.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveApplicationControls.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of AdaptiveApplicationControls. */ +/** + * Resource collection API of AdaptiveApplicationControls. + */ public interface AdaptiveApplicationControls { /** * Gets a list of application control machine groups for the subscription. - * + * * @param includePathRecommendations Include the policy rules. * @param summary Return output in a summarized form. * @param context The context to associate with this operation. @@ -20,12 +22,12 @@ public interface AdaptiveApplicationControls { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of application control machine groups for the subscription along with {@link Response}. */ - Response listWithResponse( - Boolean includePathRecommendations, Boolean summary, Context context); + Response listWithResponse(Boolean includePathRecommendations, Boolean summary, + Context context); /** * Gets a list of application control machine groups for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of application control machine groups for the subscription. @@ -34,9 +36,9 @@ Response listWithResponse( /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,9 +50,9 @@ Response listWithResponse( /** * Gets an application control VM/server group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -61,9 +63,9 @@ Response listWithResponse( /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -75,9 +77,9 @@ Response listWithResponse( /** * Delete an application control machine group. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param groupName Name of an application control machine group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -87,7 +89,7 @@ Response listWithResponse( /** * Gets an application control VM/server group. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,7 +100,7 @@ Response listWithResponse( /** * Gets an application control VM/server group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -110,7 +112,7 @@ Response listWithResponse( /** * Delete an application control machine group. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -120,7 +122,7 @@ Response listWithResponse( /** * Delete an application control machine group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,7 +134,7 @@ Response listWithResponse( /** * Begins definition for a new AdaptiveApplicationControlGroup resource. - * + * * @param name resource name. * @return the first stage of the new AdaptiveApplicationControlGroup definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardening.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardening.java index 8cd1c579fa38..7909db507d64 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardening.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardening.java @@ -8,39 +8,41 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of AdaptiveNetworkHardening. */ +/** + * An immutable client-side representation of AdaptiveNetworkHardening. + */ public interface AdaptiveNetworkHardening { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the rules property: The security rules which are recommended to be effective on the VM. - * + * * @return the rules value. */ List rules(); /** * Gets the rulesCalculationTime property: The UTC time on which the rules were calculated. - * + * * @return the rulesCalculationTime value. */ OffsetDateTime rulesCalculationTime(); @@ -48,14 +50,14 @@ public interface AdaptiveNetworkHardening { /** * Gets the effectiveNetworkSecurityGroups property: The Network Security Groups effective on the network interfaces * of the protected resource. - * + * * @return the effectiveNetworkSecurityGroups value. */ List effectiveNetworkSecurityGroups(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AdaptiveNetworkHardeningInner object. - * + * * @return the inner object. */ AdaptiveNetworkHardeningInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningEnforceRequest.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningEnforceRequest.java index 0c6dfdd280f7..0e95b9a6fe2d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningEnforceRequest.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningEnforceRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The AdaptiveNetworkHardeningEnforceRequest model. */ +/** + * The AdaptiveNetworkHardeningEnforceRequest model. + */ @Fluent public final class AdaptiveNetworkHardeningEnforceRequest { /* @@ -25,13 +27,15 @@ public final class AdaptiveNetworkHardeningEnforceRequest { @JsonProperty(value = "networkSecurityGroups", required = true) private List networkSecurityGroups; - /** Creates an instance of AdaptiveNetworkHardeningEnforceRequest class. */ + /** + * Creates an instance of AdaptiveNetworkHardeningEnforceRequest class. + */ public AdaptiveNetworkHardeningEnforceRequest() { } /** * Get the rules property: The rules to enforce. - * + * * @return the rules value. */ public List rules() { @@ -40,7 +44,7 @@ public List rules() { /** * Set the rules property: The rules to enforce. - * + * * @param rules the rules value to set. * @return the AdaptiveNetworkHardeningEnforceRequest object itself. */ @@ -50,9 +54,9 @@ public AdaptiveNetworkHardeningEnforceRequest withRules(List rules) { } /** - * Get the networkSecurityGroups property: The Azure resource IDs of the effective network security groups that will - * be updated with the created security rules from the Adaptive Network Hardening rules. - * + * Get the networkSecurityGroups property: The Azure resource IDs of the effective network security groups that + * will be updated with the created security rules from the Adaptive Network Hardening rules. + * * @return the networkSecurityGroups value. */ public List networkSecurityGroups() { @@ -60,9 +64,9 @@ public List networkSecurityGroups() { } /** - * Set the networkSecurityGroups property: The Azure resource IDs of the effective network security groups that will - * be updated with the created security rules from the Adaptive Network Hardening rules. - * + * Set the networkSecurityGroups property: The Azure resource IDs of the effective network security groups that + * will be updated with the created security rules from the Adaptive Network Hardening rules. + * * @param networkSecurityGroups the networkSecurityGroups value to set. * @return the AdaptiveNetworkHardeningEnforceRequest object itself. */ @@ -73,24 +77,19 @@ public AdaptiveNetworkHardeningEnforceRequest withNetworkSecurityGroups(List e.validate()); } if (networkSecurityGroups() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property networkSecurityGroups in model" - + " AdaptiveNetworkHardeningEnforceRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property networkSecurityGroups in model AdaptiveNetworkHardeningEnforceRequest")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardenings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardenings.java index 735512030947..2adb4a994600 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardenings.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardenings.java @@ -8,13 +8,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of AdaptiveNetworkHardenings. */ +/** + * Resource collection API of AdaptiveNetworkHardenings. + */ public interface AdaptiveNetworkHardenings { /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -22,16 +24,16 @@ public interface AdaptiveNetworkHardenings { * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ - PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName); + PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName); /** * Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -40,16 +42,16 @@ PagedIterable listByExtendedResource( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Adaptive Network Hardenings resources in scope of an extended resource as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ - PagedIterable listByExtendedResource( - String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, Context context); + PagedIterable listByExtendedResource(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, Context context); /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -60,19 +62,14 @@ PagedIterable listByExtendedResource( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single Adaptive Network Hardening resource along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - Context context); + Response getWithResponse(String resourceGroupName, String resourceNamespace, + String resourceType, String resourceName, String adaptiveNetworkHardeningResourceName, Context context); /** * Gets a single Adaptive Network Hardening resource. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -82,18 +79,14 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single Adaptive Network Hardening resource. */ - AdaptiveNetworkHardening get( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName); + AdaptiveNetworkHardening get(String resourceGroupName, String resourceNamespace, String resourceType, + String resourceName, String adaptiveNetworkHardeningResourceName); /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -103,19 +96,14 @@ AdaptiveNetworkHardening get( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body); + void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body); /** * Enforces the given rules on the NSG(s) listed in the request. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param resourceNamespace The Namespace of the resource. * @param resourceType The type of the resource. * @param resourceName Name of the resource. @@ -126,12 +114,6 @@ void enforce( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void enforce( - String resourceGroupName, - String resourceNamespace, - String resourceType, - String resourceName, - String adaptiveNetworkHardeningResourceName, - AdaptiveNetworkHardeningEnforceRequest body, - Context context); + void enforce(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, + String adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceRequest body, Context context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningsList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningsList.java index f4c80bcc0897..45483b050a14 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningsList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdaptiveNetworkHardeningsList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response for ListAdaptiveNetworkHardenings API service call. */ +/** + * Response for ListAdaptiveNetworkHardenings API service call. + */ @Fluent public final class AdaptiveNetworkHardeningsList { /* @@ -24,13 +26,15 @@ public final class AdaptiveNetworkHardeningsList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of AdaptiveNetworkHardeningsList class. */ + /** + * Creates an instance of AdaptiveNetworkHardeningsList class. + */ public AdaptiveNetworkHardeningsList() { } /** * Get the value property: A list of Adaptive Network Hardenings resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: A list of Adaptive Network Hardenings resources. - * + * * @param value the value value to set. * @return the AdaptiveNetworkHardeningsList object itself. */ @@ -50,7 +54,7 @@ public AdaptiveNetworkHardeningsList withValue(List { - /** Static value Alerts for AdditionalWorkspaceDataType. */ + /** + * Static value Alerts for AdditionalWorkspaceDataType. + */ public static final AdditionalWorkspaceDataType ALERTS = fromString("Alerts"); - /** Static value RawEvents for AdditionalWorkspaceDataType. */ + /** + * Static value RawEvents for AdditionalWorkspaceDataType. + */ public static final AdditionalWorkspaceDataType RAW_EVENTS = fromString("RawEvents"); /** * Creates a new instance of AdditionalWorkspaceDataType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AdditionalWorkspaceDataType() { /** * Creates or finds a AdditionalWorkspaceDataType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AdditionalWorkspaceDataType. */ @@ -38,7 +44,7 @@ public static AdditionalWorkspaceDataType fromString(String name) { /** * Gets known AdditionalWorkspaceDataType values. - * + * * @return known AdditionalWorkspaceDataType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspaceType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspaceType.java index e893e00c1bbc..51f98a039b2b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspaceType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspaceType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Workspace type. */ +/** + * Workspace type. + */ public final class AdditionalWorkspaceType extends ExpandableStringEnum { - /** Static value Sentinel for AdditionalWorkspaceType. */ + /** + * Static value Sentinel for AdditionalWorkspaceType. + */ public static final AdditionalWorkspaceType SENTINEL = fromString("Sentinel"); /** * Creates a new instance of AdditionalWorkspaceType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public AdditionalWorkspaceType() { /** * Creates or finds a AdditionalWorkspaceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AdditionalWorkspaceType. */ @@ -35,7 +39,7 @@ public static AdditionalWorkspaceType fromString(String name) { /** * Gets known AdditionalWorkspaceType values. - * + * * @return known AdditionalWorkspaceType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspacesProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspacesProperties.java index 7cd4c486ec2d..83f3eef478b3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspacesProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AdditionalWorkspacesProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of the additional workspaces. */ +/** + * Properties of the additional workspaces. + */ @Fluent public final class AdditionalWorkspacesProperties { /* @@ -29,13 +31,15 @@ public final class AdditionalWorkspacesProperties { @JsonProperty(value = "dataTypes") private List dataTypes; - /** Creates an instance of AdditionalWorkspacesProperties class. */ + /** + * Creates an instance of AdditionalWorkspacesProperties class. + */ public AdditionalWorkspacesProperties() { } /** * Get the workspace property: Workspace resource id. - * + * * @return the workspace value. */ public String workspace() { @@ -44,7 +48,7 @@ public String workspace() { /** * Set the workspace property: Workspace resource id. - * + * * @param workspace the workspace value to set. * @return the AdditionalWorkspacesProperties object itself. */ @@ -55,7 +59,7 @@ public AdditionalWorkspacesProperties withWorkspace(String workspace) { /** * Get the type property: Workspace type. - * + * * @return the type value. */ public AdditionalWorkspaceType type() { @@ -64,7 +68,7 @@ public AdditionalWorkspaceType type() { /** * Set the type property: Workspace type. - * + * * @param type the type value to set. * @return the AdditionalWorkspacesProperties object itself. */ @@ -75,7 +79,7 @@ public AdditionalWorkspacesProperties withType(AdditionalWorkspaceType type) { /** * Get the dataTypes property: List of data types sent to workspace. - * + * * @return the dataTypes value. */ public List dataTypes() { @@ -84,7 +88,7 @@ public List dataTypes() { /** * Set the dataTypes property: List of data types sent to workspace. - * + * * @param dataTypes the dataTypes value to set. * @return the AdditionalWorkspacesProperties object itself. */ @@ -95,7 +99,7 @@ public AdditionalWorkspacesProperties withDataTypes(List resourceIdentifiers(); /** * Gets the remediationSteps property: Manual action items to take to remediate the alert. - * + * * @return the remediationSteps value. */ List remediationSteps(); /** * Gets the vendorName property: The name of the vendor that raises the alert. - * + * * @return the vendorName value. */ String vendorName(); /** * Gets the status property: The life cycle status of the alert. - * + * * @return the status value. */ AlertStatus status(); /** * Gets the extendedLinks property: Links related to the alert. - * + * * @return the extendedLinks value. */ List> extendedLinks(); /** * Gets the alertUri property: A direct link to the alert page in Azure Portal. - * + * * @return the alertUri value. */ String alertUri(); /** * Gets the timeGeneratedUtc property: The UTC time the alert was generated in ISO8601 format. - * + * * @return the timeGeneratedUtc value. */ OffsetDateTime timeGeneratedUtc(); @@ -162,21 +164,21 @@ public interface Alert { * Gets the productName property: The name of the product which published this alert (Microsoft Sentinel, Microsoft * Defender for Identity, Microsoft Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender for * Cloud Apps, and so on). - * + * * @return the productName value. */ String productName(); /** * Gets the processingEndTimeUtc property: The UTC processing end time of the alert in ISO8601 format. - * + * * @return the processingEndTimeUtc value. */ OffsetDateTime processingEndTimeUtc(); /** * Gets the entities property: A list of entities related to the alert. - * + * * @return the entities value. */ List entities(); @@ -184,7 +186,7 @@ public interface Alert { /** * Gets the isIncident property: This field determines whether the alert is an incident (a compound grouping of * several alerts) or a single alert. - * + * * @return the isIncident value. */ Boolean isIncident(); @@ -192,49 +194,49 @@ public interface Alert { /** * Gets the correlationKey property: Key for corelating related alerts. Alerts with the same correlation key * considered to be related. - * + * * @return the correlationKey value. */ String correlationKey(); /** * Gets the extendedProperties property: Custom properties for the alert. - * + * * @return the extendedProperties value. */ Map extendedProperties(); /** * Gets the compromisedEntity property: The display name of the resource most related to this alert. - * + * * @return the compromisedEntity value. */ String compromisedEntity(); /** * Gets the techniques property: kill chain related techniques behind the alert. - * + * * @return the techniques value. */ List techniques(); /** * Gets the subTechniques property: Kill chain related sub-techniques behind the alert. - * + * * @return the subTechniques value. */ List subTechniques(); /** * Gets the supportingEvidence property: Changing set of properties depending on the supportingEvidence type. - * + * * @return the supportingEvidence value. */ AlertPropertiesSupportingEvidence supportingEvidence(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AlertInner object. - * + * * @return the inner object. */ AlertInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertEntity.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertEntity.java index b835d2cab6fb..1f984f888d8d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertEntity.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertEntity.java @@ -12,7 +12,9 @@ import java.util.HashMap; import java.util.Map; -/** Changing set of properties depending on the entity type. */ +/** + * Changing set of properties depending on the entity type. + */ @Fluent public final class AlertEntity { /* @@ -24,15 +26,18 @@ public final class AlertEntity { /* * Changing set of properties depending on the entity type. */ - @JsonIgnore private Map additionalProperties; + @JsonIgnore + private Map additionalProperties; - /** Creates an instance of AlertEntity class. */ + /** + * Creates an instance of AlertEntity class. + */ public AlertEntity() { } /** * Get the type property: Type of entity. - * + * * @return the type value. */ public String type() { @@ -41,7 +46,7 @@ public String type() { /** * Get the additionalProperties property: Changing set of properties depending on the entity type. - * + * * @return the additionalProperties value. */ @JsonAnyGetter @@ -51,7 +56,7 @@ public Map additionalProperties() { /** * Set the additionalProperties property: Changing set of properties depending on the entity type. - * + * * @param additionalProperties the additionalProperties value to set. * @return the AlertEntity object itself. */ @@ -70,7 +75,7 @@ void withAdditionalProperties(String key, Object value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertList.java index 3e5b19511e57..3e68de674d55 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of security alerts. */ +/** + * List of security alerts. + */ @Fluent public final class AlertList { /* @@ -24,13 +26,15 @@ public final class AlertList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AlertList class. */ + /** + * Creates an instance of AlertList class. + */ public AlertList() { } /** * Get the value property: describes security alert properties. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: describes security alert properties. - * + * * @param value the value value to set. * @return the AlertList object itself. */ @@ -50,7 +54,7 @@ public AlertList withValue(List value) { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertPropertiesSupportingEvidence.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertPropertiesSupportingEvidence.java index b0e6a2f61c50..a26abb60d3f0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertPropertiesSupportingEvidence.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertPropertiesSupportingEvidence.java @@ -12,7 +12,9 @@ import java.util.HashMap; import java.util.Map; -/** Changing set of properties depending on the supportingEvidence type. */ +/** + * Changing set of properties depending on the supportingEvidence type. + */ @Fluent public final class AlertPropertiesSupportingEvidence { /* @@ -24,15 +26,18 @@ public final class AlertPropertiesSupportingEvidence { /* * Changing set of properties depending on the supportingEvidence type. */ - @JsonIgnore private Map additionalProperties; + @JsonIgnore + private Map additionalProperties; - /** Creates an instance of AlertPropertiesSupportingEvidence class. */ + /** + * Creates an instance of AlertPropertiesSupportingEvidence class. + */ public AlertPropertiesSupportingEvidence() { } /** * Get the type property: Type of the supportingEvidence. - * + * * @return the type value. */ public String type() { @@ -41,7 +46,7 @@ public String type() { /** * Get the additionalProperties property: Changing set of properties depending on the supportingEvidence type. - * + * * @return the additionalProperties value. */ @JsonAnyGetter @@ -51,7 +56,7 @@ public Map additionalProperties() { /** * Set the additionalProperties property: Changing set of properties depending on the supportingEvidence type. - * + * * @param additionalProperties the additionalProperties value to set. * @return the AlertPropertiesSupportingEvidence object itself. */ @@ -70,7 +75,7 @@ void withAdditionalProperties(String key, Object value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSeverity.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSeverity.java index 52eb272a6f13..70543515ed02 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSeverity.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSeverity.java @@ -13,21 +13,29 @@ * https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified. */ public final class AlertSeverity extends ExpandableStringEnum { - /** Static value Informational for AlertSeverity. */ + /** + * Static value Informational for AlertSeverity. + */ public static final AlertSeverity INFORMATIONAL = fromString("Informational"); - /** Static value Low for AlertSeverity. */ + /** + * Static value Low for AlertSeverity. + */ public static final AlertSeverity LOW = fromString("Low"); - /** Static value Medium for AlertSeverity. */ + /** + * Static value Medium for AlertSeverity. + */ public static final AlertSeverity MEDIUM = fromString("Medium"); - /** Static value High for AlertSeverity. */ + /** + * Static value High for AlertSeverity. + */ public static final AlertSeverity HIGH = fromString("High"); /** * Creates a new instance of AlertSeverity value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +44,7 @@ public AlertSeverity() { /** * Creates or finds a AlertSeverity from its string representation. - * + * * @param name a name to look for. * @return the corresponding AlertSeverity. */ @@ -47,7 +55,7 @@ public static AlertSeverity fromString(String name) { /** * Gets known AlertSeverity values. - * + * * @return known AlertSeverity values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorBundlesRequestProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorBundlesRequestProperties.java index 63f1f1f6633b..1f2fe7999191 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorBundlesRequestProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorBundlesRequestProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Simulate alerts according to this bundles. */ +/** + * Simulate alerts according to this bundles. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Bundles") @Fluent @@ -21,13 +23,15 @@ public final class AlertSimulatorBundlesRequestProperties extends AlertSimulator @JsonProperty(value = "bundles") private List bundles; - /** Creates an instance of AlertSimulatorBundlesRequestProperties class. */ + /** + * Creates an instance of AlertSimulatorBundlesRequestProperties class. + */ public AlertSimulatorBundlesRequestProperties() { } /** * Get the bundles property: Bundles list. - * + * * @return the bundles value. */ public List bundles() { @@ -36,7 +40,7 @@ public List bundles() { /** * Set the bundles property: Bundles list. - * + * * @param bundles the bundles value to set. * @return the AlertSimulatorBundlesRequestProperties object itself. */ @@ -47,7 +51,7 @@ public AlertSimulatorBundlesRequestProperties withBundles(List bundl /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestBody.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestBody.java index 0e6c98294c16..68b3a74dde86 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestBody.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestBody.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Alert Simulator request body. */ +/** + * Alert Simulator request body. + */ @Fluent public final class AlertSimulatorRequestBody { /* @@ -16,13 +18,15 @@ public final class AlertSimulatorRequestBody { @JsonProperty(value = "properties") private AlertSimulatorRequestProperties properties; - /** Creates an instance of AlertSimulatorRequestBody class. */ + /** + * Creates an instance of AlertSimulatorRequestBody class. + */ public AlertSimulatorRequestBody() { } /** * Get the properties property: Alert Simulator request body data. - * + * * @return the properties value. */ public AlertSimulatorRequestProperties properties() { @@ -31,7 +35,7 @@ public AlertSimulatorRequestProperties properties() { /** * Set the properties property: Alert Simulator request body data. - * + * * @param properties the properties value to set. * @return the AlertSimulatorRequestBody object itself. */ @@ -42,7 +46,7 @@ public AlertSimulatorRequestBody withProperties(AlertSimulatorRequestProperties /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestProperties.java index f4bc7b5b76c8..5a7b49c61c35 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSimulatorRequestProperties.java @@ -14,28 +14,33 @@ import java.util.HashMap; import java.util.Map; -/** Describes properties of an alert simulation request. */ +/** + * Describes properties of an alert simulation request. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind", defaultImpl = AlertSimulatorRequestProperties.class) @JsonTypeName("AlertSimulatorRequestProperties") -@JsonSubTypes({@JsonSubTypes.Type(name = "Bundles", value = AlertSimulatorBundlesRequestProperties.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "Bundles", value = AlertSimulatorBundlesRequestProperties.class) }) @Fluent public class AlertSimulatorRequestProperties { /* * Describes properties of an alert simulation request */ - @JsonIgnore private Map additionalProperties; + @JsonIgnore + private Map additionalProperties; - /** Creates an instance of AlertSimulatorRequestProperties class. */ + /** + * Creates an instance of AlertSimulatorRequestProperties class. + */ public AlertSimulatorRequestProperties() { } /** * Get the additionalProperties property: Describes properties of an alert simulation request. - * + * * @return the additionalProperties value. */ @JsonAnyGetter @@ -45,7 +50,7 @@ public Map additionalProperties() { /** * Set the additionalProperties property: Describes properties of an alert simulation request. - * + * * @param additionalProperties the additionalProperties value to set. * @return the AlertSimulatorRequestProperties object itself. */ @@ -64,7 +69,7 @@ void withAdditionalProperties(String key, Object value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertStatus.java index 4a5d9c3eebbc..833c884ccc65 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertStatus.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertStatus.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The life cycle status of the alert. */ +/** + * The life cycle status of the alert. + */ public final class AlertStatus extends ExpandableStringEnum { - /** Static value Active for AlertStatus. */ + /** + * Static value Active for AlertStatus. + */ public static final AlertStatus ACTIVE = fromString("Active"); - /** Static value InProgress for AlertStatus. */ + /** + * Static value InProgress for AlertStatus. + */ public static final AlertStatus IN_PROGRESS = fromString("InProgress"); - /** Static value Resolved for AlertStatus. */ + /** + * Static value Resolved for AlertStatus. + */ public static final AlertStatus RESOLVED = fromString("Resolved"); - /** Static value Dismissed for AlertStatus. */ + /** + * Static value Dismissed for AlertStatus. + */ public static final AlertStatus DISMISSED = fromString("Dismissed"); /** * Creates a new instance of AlertStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public AlertStatus() { /** * Creates or finds a AlertStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding AlertStatus. */ @@ -44,7 +54,7 @@ public static AlertStatus fromString(String name) { /** * Gets known AlertStatus values. - * + * * @return known AlertStatus values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSyncSettings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSyncSettings.java index 029123d93568..a355252434c4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSyncSettings.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertSyncSettings.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Represents an alert sync setting. */ +/** + * Represents an alert sync setting. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("AlertSyncSettings") @Fluent @@ -22,13 +24,15 @@ public final class AlertSyncSettings extends SettingInner { @JsonProperty(value = "properties") private AlertSyncSettingProperties innerProperties; - /** Creates an instance of AlertSyncSettings class. */ + /** + * Creates an instance of AlertSyncSettings class. + */ public AlertSyncSettings() { } /** * Get the innerProperties property: Alert sync setting data. - * + * * @return the innerProperties value. */ private AlertSyncSettingProperties innerProperties() { @@ -37,7 +41,7 @@ private AlertSyncSettingProperties innerProperties() { /** * Get the enabled property: Is the alert sync setting enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -46,7 +50,7 @@ public Boolean enabled() { /** * Set the enabled property: Is the alert sync setting enabled. - * + * * @param enabled the enabled value to set. * @return the AlertSyncSettings object itself. */ @@ -60,7 +64,7 @@ public AlertSyncSettings withEnabled(Boolean enabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Alerts.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Alerts.java index 6b849c8c6c06..5091d717a7a5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Alerts.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Alerts.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Alerts. */ +/** + * Resource collection API of Alerts. + */ public interface Alerts { /** * List all the alerts that are associated with the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security alerts as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface Alerts { /** * List all the alerts that are associated with the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,9 +34,9 @@ public interface Alerts { /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -44,9 +46,9 @@ public interface Alerts { /** * List all the alerts that are associated with the resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,9 +59,9 @@ public interface Alerts { /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -69,9 +71,9 @@ public interface Alerts { /** * List all the alerts that are associated with the subscription that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -82,11 +84,11 @@ public interface Alerts { /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -96,11 +98,11 @@ public interface Alerts { /** * List all the alerts that are associated with the resource group that are stored in a specific location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -111,9 +113,9 @@ public interface Alerts { /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,9 +127,9 @@ public interface Alerts { /** * Get an alert that is associated with a subscription. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -138,29 +140,29 @@ public interface Alerts { /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an alert that is associated a resource group or a resource in a resource group along with {@link - * Response}. + * @return an alert that is associated a resource group or a resource in a resource group along with + * {@link Response}. */ - Response getResourceGroupLevelWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response getResourceGroupLevelWithResponse(String resourceGroupName, String ascLocation, String alertName, + Context context); /** * Get an alert that is associated a resource group or a resource in a resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -171,9 +173,9 @@ Response getResourceGroupLevelWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,14 +183,14 @@ Response getResourceGroupLevelWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateSubscriptionLevelStateToDismissWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToDismissWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -198,9 +200,9 @@ Response updateSubscriptionLevelStateToDismissWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,14 +210,14 @@ Response updateSubscriptionLevelStateToDismissWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateSubscriptionLevelStateToResolveWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToResolveWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -225,9 +227,9 @@ Response updateSubscriptionLevelStateToResolveWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,14 +237,14 @@ Response updateSubscriptionLevelStateToResolveWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateSubscriptionLevelStateToActivateWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToActivateWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -252,9 +254,9 @@ Response updateSubscriptionLevelStateToActivateWithResponse( /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,14 +264,14 @@ Response updateSubscriptionLevelStateToActivateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateSubscriptionLevelStateToInProgressWithResponse( - String ascLocation, String alertName, Context context); + Response updateSubscriptionLevelStateToInProgressWithResponse(String ascLocation, String alertName, + Context context); /** * Update the alert's state. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -279,11 +281,11 @@ Response updateSubscriptionLevelStateToInProgressWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,16 +293,16 @@ Response updateSubscriptionLevelStateToInProgressWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateResourceGroupLevelStateToResolveWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToResolveWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -310,11 +312,11 @@ Response updateResourceGroupLevelStateToResolveWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,16 +324,16 @@ Response updateResourceGroupLevelStateToResolveWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateResourceGroupLevelStateToDismissWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToDismissWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -341,11 +343,11 @@ Response updateResourceGroupLevelStateToDismissWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -353,16 +355,16 @@ Response updateResourceGroupLevelStateToDismissWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateResourceGroupLevelStateToActivateWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToActivateWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -372,11 +374,11 @@ Response updateResourceGroupLevelStateToActivateWithResponse( /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -384,16 +386,16 @@ Response updateResourceGroupLevelStateToActivateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response updateResourceGroupLevelStateToInProgressWithResponse( - String resourceGroupName, String ascLocation, String alertName, Context context); + Response updateResourceGroupLevelStateToInProgressWithResponse(String resourceGroupName, String ascLocation, + String alertName, Context context); /** * Update the alert's state. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertName Name of the alert object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -403,9 +405,9 @@ Response updateResourceGroupLevelStateToInProgressWithResponse( /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -415,9 +417,9 @@ Response updateResourceGroupLevelStateToInProgressWithResponse( /** * Simulate security alerts. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param alertSimulatorRequestBody Alert Simulator Request Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRule.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRule.java index 4e7c2860f5f7..84cf7a11c1b7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRule.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRule.java @@ -7,82 +7,84 @@ import com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of AlertsSuppressionRule. */ +/** + * An immutable client-side representation of AlertsSuppressionRule. + */ public interface AlertsSuppressionRule { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the alertType property: Type of the alert to automatically suppress. For all alert types, use '*'. - * + * * @return the alertType value. */ String alertType(); /** * Gets the lastModifiedUtc property: The last time this rule was modified. - * + * * @return the lastModifiedUtc value. */ OffsetDateTime lastModifiedUtc(); /** * Gets the expirationDateUtc property: Expiration date of the rule, if value is not provided or provided as null - * this field will default to the maximum allowed expiration date. - * + * there will no expiration at all. + * * @return the expirationDateUtc value. */ OffsetDateTime expirationDateUtc(); /** * Gets the reason property: The reason for dismissing the alert. - * + * * @return the reason value. */ String reason(); /** * Gets the state property: Possible states of the rule. - * + * * @return the state value. */ RuleState state(); /** * Gets the comment property: Any comment regarding the rule. - * + * * @return the comment value. */ String comment(); /** * Gets the suppressionAlertsScope property: The suppression conditions. - * + * * @return the suppressionAlertsScope value. */ SuppressionAlertsScope suppressionAlertsScope(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleInner object. - * + * * @return the inner object. */ AlertsSuppressionRuleInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRules.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRules.java index 201e06daeff1..dba56aff33f4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRules.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRules.java @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleInner; -/** Resource collection API of AlertsSuppressionRules. */ +/** + * Resource collection API of AlertsSuppressionRules. + */ public interface AlertsSuppressionRules { /** * List of all the dismiss rules for the given subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return suppression rules list for subscription as paginated response with {@link PagedIterable}. @@ -22,7 +24,7 @@ public interface AlertsSuppressionRules { /** * List of all the dismiss rules for the given subscription. - * + * * @param alertType Type of the alert to get rules for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,20 +36,20 @@ public interface AlertsSuppressionRules { /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with {@link - * Response}. + * @return dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription along with + * {@link Response}. */ Response getWithResponse(String alertsSuppressionRuleName, Context context); /** * Get dismiss rule, with name: {alertsSuppressionRuleName}, for the given subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,7 +60,7 @@ public interface AlertsSuppressionRules { /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @param context The context to associate with this operation. @@ -67,12 +69,12 @@ public interface AlertsSuppressionRules { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the suppression rule along with {@link Response}. */ - Response updateWithResponse( - String alertsSuppressionRuleName, AlertsSuppressionRuleInner alertsSuppressionRule, Context context); + Response updateWithResponse(String alertsSuppressionRuleName, + AlertsSuppressionRuleInner alertsSuppressionRule, Context context); /** * Update existing rule or create new rule if it doesn't exist. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param alertsSuppressionRule Suppression rule object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,7 +86,7 @@ Response updateWithResponse( /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,7 +98,7 @@ Response updateWithResponse( /** * Delete dismiss alert rule for this subscription. - * + * * @param alertsSuppressionRuleName The unique name of the suppression alert rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRulesList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRulesList.java index 7d0e5106fcd2..2e37c951cc5a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRulesList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertsSuppressionRulesList.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Suppression rules list for subscription. */ +/** + * Suppression rules list for subscription. + */ @Fluent public final class AlertsSuppressionRulesList { /* @@ -25,13 +27,15 @@ public final class AlertsSuppressionRulesList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AlertsSuppressionRulesList class. */ + /** + * Creates an instance of AlertsSuppressionRulesList class. + */ public AlertsSuppressionRulesList() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the AlertsSuppressionRulesList object itself. */ @@ -51,7 +55,7 @@ public AlertsSuppressionRulesList withValue(List val /** * Get the nextLink property: URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,15 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model AlertsSuppressionRulesList")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model AlertsSuppressionRulesList")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnections.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnections.java index 7dc20e8e9240..cd3d58d7360f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnections.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnections.java @@ -8,90 +8,92 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of AllowedConnections. */ +/** + * Resource collection API of AllowedConnections. + */ public interface AllowedConnections { /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedIterable}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Gets the list of all possible traffic between resources for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of all possible traffic between resources for the subscription as paginated response with {@link - * PagedIterable}. + * @return the list of all possible traffic between resources for the subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ PagedIterable listByHomeRegion(String ascLocation); /** * Gets the list of all possible traffic between resources for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ PagedIterable listByHomeRegion(String ascLocation, Context context); /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type along with {@link Response}. + * type along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String ascLocation, ConnectionType connectionType, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + ConnectionType connectionType, Context context); /** * Gets the list of all possible traffic between resources for the subscription and location, based on connection * type. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param connectionType The type of allowed connections (Internal, External). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of all possible traffic between resources for the subscription and location, based on connection - * type. + * type. */ AllowedConnectionsResource get(String resourceGroupName, String ascLocation, ConnectionType connectionType); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsList.java index aa29c6120ec3..f6d956c3eff2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of all possible traffic between Azure resources. */ +/** + * List of all possible traffic between Azure resources. + */ @Immutable public final class AllowedConnectionsList { /* @@ -24,13 +26,15 @@ public final class AllowedConnectionsList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AllowedConnectionsList class. */ + /** + * Creates an instance of AllowedConnectionsList class. + */ public AllowedConnectionsList() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsResource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsResource.java index f7544bb61cef..92477f0db996 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsResource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowedConnectionsResource.java @@ -8,53 +8,55 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of AllowedConnectionsResource. */ +/** + * An immutable client-side representation of AllowedConnectionsResource. + */ public interface AllowedConnectionsResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: Location where the resource is stored. - * + * * @return the location value. */ String location(); /** * Gets the calculatedDateTime property: The UTC time on which the allowed connections resource was calculated. - * + * * @return the calculatedDateTime value. */ OffsetDateTime calculatedDateTime(); /** * Gets the connectableResources property: List of connectable resources. - * + * * @return the connectableResources value. */ List connectableResources(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AllowedConnectionsResourceInner object. - * + * * @return the inner object. */ AllowedConnectionsResourceInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowlistCustomAlertRule.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowlistCustomAlertRule.java index 31e157bbd2e8..4cb2d83dc1ec 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowlistCustomAlertRule.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AllowlistCustomAlertRule.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** A custom alert rule that checks if a value (depends on the custom alert type) is allowed. */ +/** + * A custom alert rule that checks if a value (depends on the custom alert type) is allowed. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -23,8 +25,7 @@ @JsonSubTypes.Type(name = "ConnectionToIpNotAllowed", value = ConnectionToIpNotAllowed.class), @JsonSubTypes.Type(name = "ConnectionFromIpNotAllowed", value = ConnectionFromIpNotAllowed.class), @JsonSubTypes.Type(name = "LocalUserNotAllowed", value = LocalUserNotAllowed.class), - @JsonSubTypes.Type(name = "ProcessNotAllowed", value = ProcessNotAllowed.class) -}) + @JsonSubTypes.Type(name = "ProcessNotAllowed", value = ProcessNotAllowed.class) }) @Fluent public class AllowlistCustomAlertRule extends ListCustomAlertRule { /* @@ -33,13 +34,15 @@ public class AllowlistCustomAlertRule extends ListCustomAlertRule { @JsonProperty(value = "allowlistValues", required = true) private List allowlistValues; - /** Creates an instance of AllowlistCustomAlertRule class. */ + /** + * Creates an instance of AllowlistCustomAlertRule class. + */ public AllowlistCustomAlertRule() { } /** * Get the allowlistValues property: The values to allow. The format of the values depends on the rule type. - * + * * @return the allowlistValues value. */ public List allowlistValues() { @@ -48,7 +51,7 @@ public List allowlistValues() { /** * Set the allowlistValues property: The values to allow. The format of the values depends on the rule type. - * + * * @param allowlistValues the allowlistValues value to set. * @return the AllowlistCustomAlertRule object itself. */ @@ -57,7 +60,9 @@ public AllowlistCustomAlertRule withAllowlistValues(List allowlistValues return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AllowlistCustomAlertRule withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -66,17 +71,15 @@ public AllowlistCustomAlertRule withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (allowlistValues() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property allowlistValues in model AllowlistCustomAlertRule")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property allowlistValues in model AllowlistCustomAlertRule")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DMessagesNotInAllowedRange.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DMessagesNotInAllowedRange.java index 14079d7a02f2..d1aaa099e617 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DMessagesNotInAllowedRange.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DMessagesNotInAllowedRange.java @@ -9,37 +9,49 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Number of cloud to device messages (AMQP protocol) is not in allowed range. */ +/** + * Number of cloud to device messages (AMQP protocol) is not in allowed range. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("AmqpC2DMessagesNotInAllowedRange") @Fluent public final class AmqpC2DMessagesNotInAllowedRange extends TimeWindowCustomAlertRule { - /** Creates an instance of AmqpC2DMessagesNotInAllowedRange class. */ + /** + * Creates an instance of AmqpC2DMessagesNotInAllowedRange class. + */ public AmqpC2DMessagesNotInAllowedRange() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DMessagesNotInAllowedRange withTimeWindowSize(Duration timeWindowSize) { super.withTimeWindowSize(timeWindowSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DMessagesNotInAllowedRange withMinThreshold(int minThreshold) { super.withMinThreshold(minThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DMessagesNotInAllowedRange withMaxThreshold(int maxThreshold) { super.withMaxThreshold(maxThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DMessagesNotInAllowedRange withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -48,7 +60,7 @@ public AmqpC2DMessagesNotInAllowedRange withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DRejectedMessagesNotInAllowedRange.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DRejectedMessagesNotInAllowedRange.java index 833c457e1fcc..e5794a72d548 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DRejectedMessagesNotInAllowedRange.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpC2DRejectedMessagesNotInAllowedRange.java @@ -9,37 +9,49 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Number of rejected cloud to device messages (AMQP protocol) is not in allowed range. */ +/** + * Number of rejected cloud to device messages (AMQP protocol) is not in allowed range. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("AmqpC2DRejectedMessagesNotInAllowedRange") @Fluent public final class AmqpC2DRejectedMessagesNotInAllowedRange extends TimeWindowCustomAlertRule { - /** Creates an instance of AmqpC2DRejectedMessagesNotInAllowedRange class. */ + /** + * Creates an instance of AmqpC2DRejectedMessagesNotInAllowedRange class. + */ public AmqpC2DRejectedMessagesNotInAllowedRange() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DRejectedMessagesNotInAllowedRange withTimeWindowSize(Duration timeWindowSize) { super.withTimeWindowSize(timeWindowSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DRejectedMessagesNotInAllowedRange withMinThreshold(int minThreshold) { super.withMinThreshold(minThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DRejectedMessagesNotInAllowedRange withMaxThreshold(int maxThreshold) { super.withMaxThreshold(maxThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpC2DRejectedMessagesNotInAllowedRange withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -48,7 +60,7 @@ public AmqpC2DRejectedMessagesNotInAllowedRange withIsEnabled(boolean isEnabled) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpD2CMessagesNotInAllowedRange.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpD2CMessagesNotInAllowedRange.java index d7cb03368abc..ffc5b1fc88a0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpD2CMessagesNotInAllowedRange.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AmqpD2CMessagesNotInAllowedRange.java @@ -9,37 +9,49 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Number of device to cloud messages (AMQP protocol) is not in allowed range. */ +/** + * Number of device to cloud messages (AMQP protocol) is not in allowed range. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("AmqpD2CMessagesNotInAllowedRange") @Fluent public final class AmqpD2CMessagesNotInAllowedRange extends TimeWindowCustomAlertRule { - /** Creates an instance of AmqpD2CMessagesNotInAllowedRange class. */ + /** + * Creates an instance of AmqpD2CMessagesNotInAllowedRange class. + */ public AmqpD2CMessagesNotInAllowedRange() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpD2CMessagesNotInAllowedRange withTimeWindowSize(Duration timeWindowSize) { super.withTimeWindowSize(timeWindowSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpD2CMessagesNotInAllowedRange withMinThreshold(int minThreshold) { super.withMinThreshold(minThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpD2CMessagesNotInAllowedRange withMaxThreshold(int maxThreshold) { super.withMaxThreshold(maxThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmqpD2CMessagesNotInAllowedRange withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -48,7 +60,7 @@ public AmqpD2CMessagesNotInAllowedRange withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AnnotateDefaultBranchState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AnnotateDefaultBranchState.java new file mode 100644 index 000000000000..610c40f3c2c6 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AnnotateDefaultBranchState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Configuration of PR Annotations on default branch. + * + * Enabled - PR Annotations are enabled on the resource's default branch. + * Disabled - PR Annotations are disabled on the resource's default branch. + */ +public final class AnnotateDefaultBranchState extends ExpandableStringEnum { + /** + * Static value Disabled for AnnotateDefaultBranchState. + */ + public static final AnnotateDefaultBranchState DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for AnnotateDefaultBranchState. + */ + public static final AnnotateDefaultBranchState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of AnnotateDefaultBranchState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AnnotateDefaultBranchState() { + } + + /** + * Creates or finds a AnnotateDefaultBranchState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AnnotateDefaultBranchState. + */ + @JsonCreator + public static AnnotateDefaultBranchState fromString(String name) { + return fromString(name, AnnotateDefaultBranchState.class); + } + + /** + * Gets known AnnotateDefaultBranchState values. + * + * @return known AnnotateDefaultBranchState values. + */ + public static Collection values() { + return values(AnnotateDefaultBranchState.class); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollection.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollection.java new file mode 100644 index 000000000000..e20f45dc9be3 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollection.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.resourcemanager.security.fluent.models.ApiCollectionInner; + +/** + * An immutable client-side representation of ApiCollection. + */ +public interface ApiCollection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the provisioningState property: Gets the provisioning state of the API collection. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the displayName property: The display name of the API collection. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the discoveredVia property: The resource Id of the resource from where this API collection was discovered. + * + * @return the discoveredVia value. + */ + String discoveredVia(); + + /** + * Gets the baseUrl property: The base URI for this API collection. All endpoints of this API collection extend this + * base URI. + * + * @return the baseUrl value. + */ + String baseUrl(); + + /** + * Gets the numberOfApiEndpoints property: The number of API endpoints discovered in this API collection. + * + * @return the numberOfApiEndpoints value. + */ + Long numberOfApiEndpoints(); + + /** + * Gets the numberOfInactiveApiEndpoints property: The number of API endpoints in this API collection that have not + * received any API traffic in the last 30 days. + * + * @return the numberOfInactiveApiEndpoints value. + */ + Long numberOfInactiveApiEndpoints(); + + /** + * Gets the numberOfUnauthenticatedApiEndpoints property: The number of API endpoints in this API collection that + * are unauthenticated. + * + * @return the numberOfUnauthenticatedApiEndpoints value. + */ + Long numberOfUnauthenticatedApiEndpoints(); + + /** + * Gets the numberOfExternalApiEndpoints property: The number of API endpoints in this API collection for which API + * traffic from the internet was observed. + * + * @return the numberOfExternalApiEndpoints value. + */ + Long numberOfExternalApiEndpoints(); + + /** + * Gets the numberOfApiEndpointsWithSensitiveDataExposed property: The number of API endpoints in this API + * collection which are exposing sensitive data in their requests and/or responses. + * + * @return the numberOfApiEndpointsWithSensitiveDataExposed value. + */ + Long numberOfApiEndpointsWithSensitiveDataExposed(); + + /** + * Gets the sensitivityLabel property: The highest priority sensitivity label from Microsoft Purview in this API + * collection. + * + * @return the sensitivityLabel value. + */ + String sensitivityLabel(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.ApiCollectionInner object. + * + * @return the inner object. + */ + ApiCollectionInner innerModel(); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionResponseList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionList.java similarity index 77% rename from sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionResponseList.java rename to sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionList.java index 2666ef531123..df603453bbd4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionResponseList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionList.java @@ -5,18 +5,20 @@ package com.azure.resourcemanager.security.models; import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner; +import com.azure.resourcemanager.security.fluent.models.ApiCollectionInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Page of a list of API collections as represented by Defender for APIs. */ +/** + * Page of a list of API collections as represented by Microsoft Defender for APIs. + */ @Immutable -public final class ApiCollectionResponseList { +public final class ApiCollectionList { /* * API collections in this page. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* * The URI to fetch the next page. @@ -24,22 +26,24 @@ public final class ApiCollectionResponseList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ApiCollectionResponseList class. */ - public ApiCollectionResponseList() { + /** + * Creates an instance of ApiCollectionList class. + */ + public ApiCollectionList() { } /** * Get the value property: API collections in this page. - * + * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOffboardings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOffboardings.java deleted file mode 100644 index 8fbc3ffe617e..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOffboardings.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ApiCollectionOffboardings. */ -public interface ApiCollectionOffboardings { - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context); - - /** - * Offboard an Azure API Management API from Defender for APIs - * - *

Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations - * within the Azure API Management API for intrusive behaviors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String serviceName, String apiCollectionId); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOnboardings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOnboardings.java deleted file mode 100644 index c4109ca69adb..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollectionOnboardings.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ApiCollectionOnboardings. */ -public interface ApiCollectionOnboardings { - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs along with {@link Response}. - */ - Response createWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context); - - /** - * Onboard an Azure API Management API to Defender for APIs - * - *

Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations - * within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an API collection as represented by Defender for APIs. - */ - ApiCollectionResponse create(String resourceGroupName, String serviceName, String apiCollectionId); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollections.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollections.java index d21a442595cb..e8883e5365b7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollections.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApiCollections.java @@ -8,78 +8,210 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ApiCollections. */ +/** + * Resource collection API of ApiCollections. + */ public interface ApiCollections { /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of API collections within a subscription + * + * Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets a list of API collections within a resource group + * + * Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs + * as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedIterable}. + */ + PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName); + + /** + * Gets a list of onboarded Azure API Management APIs + * + * Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs as paginated + * response with {@link PagedIterable}. + */ + PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName, + Context context); + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs along with + * {@link Response}. + */ + Response getByAzureApiManagementServiceWithResponse(String resourceGroupName, String serviceName, + String apiId, Context context); + + /** + * Gets an onboarded Azure API Management API + * + * Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API + * Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the + * Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. + */ + ApiCollection getByAzureApiManagementService(String resourceGroupName, String serviceName, String apiId); + + /** + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedIterable}. + * @return an API collection as represented by Microsoft Defender for APIs. */ - PagedIterable list(String resourceGroupName, String serviceName); + ApiCollection onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId); /** - * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs - * - *

Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API - * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API - * Management API for intrusive behaviors and provide alerts for attacks that have been detected. - * + * Onboard an Azure API Management API to Microsoft Defender for APIs + * + * Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the + * operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been + * detected. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure API Management APIs that have been onboarded to Defender for APIs as paginated response - * with {@link PagedIterable}. + * @return an API collection as represented by Microsoft Defender for APIs. */ - PagedIterable list(String resourceGroupName, String serviceName, Context context); + ApiCollection onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId, + Context context); /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs along with {@link Response}. + * @return the {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String serviceName, String apiCollectionId, Context context); + Response offboardAzureApiManagementApiWithResponse(String resourceGroupName, String serviceName, String apiId, + Context context); /** - * Gets an Azure API Management API if it has been onboarded to Defender for APIs - * - *

Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API - * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for - * intrusive behaviors and provide alerts for attacks that have been detected. - * + * Offboard an Azure API Management API from Microsoft Defender for APIs + * + * Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the + * operations within the Azure API Management API for intrusive behaviors. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceName The name of the API Management service. - * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider - * namespace. This string matches the Azure API Management API name. + * @param apiId API revision identifier. Must be unique in the API Management service instance. Non-current revision + * has ;rev=n as a suffix where n is the revision number. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure API Management API if it has been onboarded to Defender for APIs. */ - ApiCollectionResponse get(String resourceGroupName, String serviceName, String apiCollectionId); + void offboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Application.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Application.java index 9a2925359582..51f5fa4954de 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Application.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Application.java @@ -8,218 +8,252 @@ import com.azure.resourcemanager.security.fluent.models.ApplicationInner; import java.util.List; -/** An immutable client-side representation of Application. */ +/** + * An immutable client-side representation of Application. + */ public interface Application { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the displayName property: display name of the application. - * + * * @return the displayName value. */ String displayName(); /** * Gets the description property: description of the application. - * + * * @return the description value. */ String description(); /** * Gets the sourceResourceType property: The application source, what it affects, e.g. Assessments. - * + * * @return the sourceResourceType value. */ ApplicationSourceResourceType sourceResourceType(); /** * Gets the conditionSets property: The application conditionSets - see examples. - * + * * @return the conditionSets value. */ List conditionSets(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.ApplicationInner object. - * + * * @return the inner object. */ ApplicationInner innerModel(); - /** The entirety of the Application definition. */ + /** + * The entirety of the Application definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate { } - /** The Application definition stages. */ + + /** + * The Application definition stages. + */ interface DefinitionStages { - /** The first stage of the Application definition. */ + /** + * The first stage of the Application definition. + */ interface Blank extends WithCreate { } + /** * The stage of the Application definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithDescription, - DefinitionStages.WithSourceResourceType, - DefinitionStages.WithConditionSets { + interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithDescription, + DefinitionStages.WithSourceResourceType, DefinitionStages.WithConditionSets { /** * Executes the create request. - * + * * @return the created resource. */ Application create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Application create(Context context); } - /** The stage of the Application definition allowing to specify displayName. */ + + /** + * The stage of the Application definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: display name of the application. - * + * * @param displayName display name of the application. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the Application definition allowing to specify description. */ + + /** + * The stage of the Application definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: description of the application. - * + * * @param description description of the application. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the Application definition allowing to specify sourceResourceType. */ + + /** + * The stage of the Application definition allowing to specify sourceResourceType. + */ interface WithSourceResourceType { /** * Specifies the sourceResourceType property: The application source, what it affects, e.g. Assessments. - * + * * @param sourceResourceType The application source, what it affects, e.g. Assessments. * @return the next definition stage. */ WithCreate withSourceResourceType(ApplicationSourceResourceType sourceResourceType); } - /** The stage of the Application definition allowing to specify conditionSets. */ + + /** + * The stage of the Application definition allowing to specify conditionSets. + */ interface WithConditionSets { /** * Specifies the conditionSets property: The application conditionSets - see examples. - * + * * @param conditionSets The application conditionSets - see examples. * @return the next definition stage. */ WithCreate withConditionSets(List conditionSets); } } + /** * Begins update for the Application resource. - * + * * @return the stage of resource update. */ Application.Update update(); - /** The template for Application update. */ - interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithDescription, - UpdateStages.WithSourceResourceType, - UpdateStages.WithConditionSets { + /** + * The template for Application update. + */ + interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithDescription, + UpdateStages.WithSourceResourceType, UpdateStages.WithConditionSets { /** * Executes the update request. - * + * * @return the updated resource. */ Application apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Application apply(Context context); } - /** The Application update stages. */ + + /** + * The Application update stages. + */ interface UpdateStages { - /** The stage of the Application update allowing to specify displayName. */ + /** + * The stage of the Application update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: display name of the application. - * + * * @param displayName display name of the application. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the Application update allowing to specify description. */ + + /** + * The stage of the Application update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: description of the application. - * + * * @param description description of the application. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the Application update allowing to specify sourceResourceType. */ + + /** + * The stage of the Application update allowing to specify sourceResourceType. + */ interface WithSourceResourceType { /** * Specifies the sourceResourceType property: The application source, what it affects, e.g. Assessments. - * + * * @param sourceResourceType The application source, what it affects, e.g. Assessments. * @return the next definition stage. */ Update withSourceResourceType(ApplicationSourceResourceType sourceResourceType); } - /** The stage of the Application update allowing to specify conditionSets. */ + + /** + * The stage of the Application update allowing to specify conditionSets. + */ interface WithConditionSets { /** * Specifies the conditionSets property: The application conditionSets - see examples. - * + * * @param conditionSets The application conditionSets - see examples. * @return the next definition stage. */ Update withConditionSets(List conditionSets); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Application refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationOperations.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationOperations.java index 233b962c3115..e5c4555d335d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationOperations.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationOperations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ApplicationOperations. */ +/** + * Resource collection API of ApplicationOperations. + */ public interface ApplicationOperations { /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -23,7 +25,7 @@ public interface ApplicationOperations { /** * Get a specific application for the requested scope by applicationId. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,7 +36,7 @@ public interface ApplicationOperations { /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -46,7 +48,7 @@ public interface ApplicationOperations { /** * Delete an Application over a given scope. - * + * * @param applicationId The security Application key - unique key for the standard application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -56,7 +58,7 @@ public interface ApplicationOperations { /** * Get a specific application for the requested scope by applicationId. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -67,7 +69,7 @@ public interface ApplicationOperations { /** * Get a specific application for the requested scope by applicationId. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,7 +81,7 @@ public interface ApplicationOperations { /** * Delete an Application over a given scope. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -89,7 +91,7 @@ public interface ApplicationOperations { /** * Delete an Application over a given scope. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,7 +103,7 @@ public interface ApplicationOperations { /** * Begins definition for a new Application resource. - * + * * @param name resource name. * @return the first stage of the new Application definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationSourceResourceType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationSourceResourceType.java index 9d2dd77b7267..0709908b82c8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationSourceResourceType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationSourceResourceType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The application source, what it affects, e.g. Assessments. */ +/** + * The application source, what it affects, e.g. Assessments. + */ public final class ApplicationSourceResourceType extends ExpandableStringEnum { - /** Static value Assessments for ApplicationSourceResourceType. */ + /** + * Static value Assessments for ApplicationSourceResourceType. + */ public static final ApplicationSourceResourceType ASSESSMENTS = fromString("Assessments"); /** * Creates a new instance of ApplicationSourceResourceType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ApplicationSourceResourceType() { /** * Creates or finds a ApplicationSourceResourceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ApplicationSourceResourceType. */ @@ -35,7 +39,7 @@ public static ApplicationSourceResourceType fromString(String name) { /** * Gets known ApplicationSourceResourceType values. - * + * * @return known ApplicationSourceResourceType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Applications.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Applications.java index 64f396cfe67c..5efcf23b1b75 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Applications.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Applications.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Applications. */ +/** + * Resource collection API of Applications. + */ public interface Applications { /** * Get a list of all relevant applications over a subscription level scope. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedIterable}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Get a list of all relevant applications over a subscription level scope. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all relevant applications over a subscription level scope as paginated response with {@link - * PagedIterable}. + * @return a list of all relevant applications over a subscription level scope as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationsList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationsList.java index deccd03c7231..78731b63b2d7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationsList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ApplicationsList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Page of a security applications list. */ +/** + * Page of a security applications list. + */ @Immutable public final class ApplicationsList { /* @@ -24,13 +26,15 @@ public final class ApplicationsList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ApplicationsList class. */ + /** + * Creates an instance of ApplicationsList class. + */ public ApplicationsList() { } /** * Get the value property: Collection of applications in this page. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocation.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocation.java index f052a42ed916..2b6a9cd03eba 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocation.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocation.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.security.fluent.models.AscLocationInner; -/** An immutable client-side representation of AscLocation. */ +/** + * An immutable client-side representation of AscLocation. + */ public interface AscLocation { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: An empty set of properties. - * + * * @return the properties value. */ Object properties(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AscLocationInner object. - * + * * @return the inner object. */ AscLocationInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocationList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocationList.java index c8d7e6191558..37c1ab8c536e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocationList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AscLocationList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of locations where ASC saves your data. */ +/** + * List of locations where ASC saves your data. + */ @Immutable public final class AscLocationList { /* @@ -24,13 +26,15 @@ public final class AscLocationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AscLocationList class. */ + /** + * Creates an instance of AscLocationList class. + */ public AscLocationList() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessedResourceType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessedResourceType.java index ac3b775039ef..0491ec20d2dd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessedResourceType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessedResourceType.java @@ -8,21 +8,29 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Sub-assessment resource type. */ +/** + * Sub-assessment resource type. + */ public final class AssessedResourceType extends ExpandableStringEnum { - /** Static value SqlServerVulnerability for AssessedResourceType. */ + /** + * Static value SqlServerVulnerability for AssessedResourceType. + */ public static final AssessedResourceType SQL_SERVER_VULNERABILITY = fromString("SqlServerVulnerability"); - /** Static value ContainerRegistryVulnerability for AssessedResourceType. */ - public static final AssessedResourceType CONTAINER_REGISTRY_VULNERABILITY = - fromString("ContainerRegistryVulnerability"); + /** + * Static value ContainerRegistryVulnerability for AssessedResourceType. + */ + public static final AssessedResourceType CONTAINER_REGISTRY_VULNERABILITY + = fromString("ContainerRegistryVulnerability"); - /** Static value ServerVulnerability for AssessedResourceType. */ + /** + * Static value ServerVulnerability for AssessedResourceType. + */ public static final AssessedResourceType SERVER_VULNERABILITY = fromString("ServerVulnerability"); /** * Creates a new instance of AssessedResourceType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +39,7 @@ public AssessedResourceType() { /** * Creates or finds a AssessedResourceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AssessedResourceType. */ @@ -42,7 +50,7 @@ public static AssessedResourceType fromString(String name) { /** * Gets known AssessedResourceType values. - * + * * @return known AssessedResourceType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentLinks.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentLinks.java index 7c6620d027bd..0b4cfd261e35 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentLinks.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentLinks.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Links relevant to the assessment. */ +/** + * Links relevant to the assessment. + */ @Immutable public final class AssessmentLinks { /* @@ -16,13 +18,15 @@ public final class AssessmentLinks { @JsonProperty(value = "azurePortalUri", access = JsonProperty.Access.WRITE_ONLY) private String azurePortalUri; - /** Creates an instance of AssessmentLinks class. */ + /** + * Creates an instance of AssessmentLinks class. + */ public AssessmentLinks() { } /** * Get the azurePortalUri property: Link to assessment in Azure Portal. - * + * * @return the azurePortalUri value. */ public String azurePortalUri() { @@ -31,7 +35,7 @@ public String azurePortalUri() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatus.java index 3acea6c5664a..7ff0e4acab51 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatus.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatus.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The result of the assessment. */ +/** + * The result of the assessment. + */ @Fluent public class AssessmentStatus { /* @@ -29,13 +31,15 @@ public class AssessmentStatus { @JsonProperty(value = "description") private String description; - /** Creates an instance of AssessmentStatus class. */ + /** + * Creates an instance of AssessmentStatus class. + */ public AssessmentStatus() { } /** * Get the code property: Programmatic code for the status of the assessment. - * + * * @return the code value. */ public AssessmentStatusCode code() { @@ -44,7 +48,7 @@ public AssessmentStatusCode code() { /** * Set the code property: Programmatic code for the status of the assessment. - * + * * @param code the code value to set. * @return the AssessmentStatus object itself. */ @@ -55,7 +59,7 @@ public AssessmentStatus withCode(AssessmentStatusCode code) { /** * Get the cause property: Programmatic code for the cause of the assessment status. - * + * * @return the cause value. */ public String cause() { @@ -64,7 +68,7 @@ public String cause() { /** * Set the cause property: Programmatic code for the cause of the assessment status. - * + * * @param cause the cause value to set. * @return the AssessmentStatus object itself. */ @@ -75,7 +79,7 @@ public AssessmentStatus withCause(String cause) { /** * Get the description property: Human readable description of the assessment status. - * + * * @return the description value. */ public String description() { @@ -84,7 +88,7 @@ public String description() { /** * Set the description property: Human readable description of the assessment status. - * + * * @param description the description value to set. * @return the AssessmentStatus object itself. */ @@ -95,14 +99,13 @@ public AssessmentStatus withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (code() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property code in model AssessmentStatus")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property code in model AssessmentStatus")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusCode.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusCode.java index bb42fd8a6653..68c19755a065 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusCode.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusCode.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Programmatic code for the status of the assessment. */ +/** + * Programmatic code for the status of the assessment. + */ public final class AssessmentStatusCode extends ExpandableStringEnum { - /** Static value Healthy for AssessmentStatusCode. */ + /** + * Static value Healthy for AssessmentStatusCode. + */ public static final AssessmentStatusCode HEALTHY = fromString("Healthy"); - /** Static value Unhealthy for AssessmentStatusCode. */ + /** + * Static value Unhealthy for AssessmentStatusCode. + */ public static final AssessmentStatusCode UNHEALTHY = fromString("Unhealthy"); - /** Static value NotApplicable for AssessmentStatusCode. */ + /** + * Static value NotApplicable for AssessmentStatusCode. + */ public static final AssessmentStatusCode NOT_APPLICABLE = fromString("NotApplicable"); /** * Creates a new instance of AssessmentStatusCode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public AssessmentStatusCode() { /** * Creates or finds a AssessmentStatusCode from its string representation. - * + * * @param name a name to look for. * @return the corresponding AssessmentStatusCode. */ @@ -41,7 +49,7 @@ public static AssessmentStatusCode fromString(String name) { /** * Gets known AssessmentStatusCode values. - * + * * @return known AssessmentStatusCode values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusResponse.java index 44837f46729b..d268c5ef77de 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusResponse.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentStatusResponse.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The result of the assessment. */ +/** + * The result of the assessment. + */ @Fluent public final class AssessmentStatusResponse extends AssessmentStatus { /* @@ -23,14 +25,16 @@ public final class AssessmentStatusResponse extends AssessmentStatus { @JsonProperty(value = "statusChangeDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime statusChangeDate; - /** Creates an instance of AssessmentStatusResponse class. */ + /** + * Creates an instance of AssessmentStatusResponse class. + */ public AssessmentStatusResponse() { } /** * Get the firstEvaluationDate property: The time that the assessment was created and first evaluated. Returned as * UTC time in ISO 8601 format. - * + * * @return the firstEvaluationDate value. */ public OffsetDateTime firstEvaluationDate() { @@ -40,28 +44,34 @@ public OffsetDateTime firstEvaluationDate() { /** * Get the statusChangeDate property: The time that the status of the assessment last changed. Returned as UTC time * in ISO 8601 format. - * + * * @return the statusChangeDate value. */ public OffsetDateTime statusChangeDate() { return this.statusChangeDate; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssessmentStatusResponse withCode(AssessmentStatusCode code) { super.withCode(code); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssessmentStatusResponse withCause(String cause) { super.withCause(cause); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssessmentStatusResponse withDescription(String description) { super.withDescription(description); @@ -70,7 +80,7 @@ public AssessmentStatusResponse withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentType.java index 18580a1dd30e..ecf72873685d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentType.java @@ -13,21 +13,29 @@ * Policy definition. */ public final class AssessmentType extends ExpandableStringEnum { - /** Static value BuiltIn for AssessmentType. */ + /** + * Static value BuiltIn for AssessmentType. + */ public static final AssessmentType BUILT_IN = fromString("BuiltIn"); - /** Static value CustomPolicy for AssessmentType. */ + /** + * Static value CustomPolicy for AssessmentType. + */ public static final AssessmentType CUSTOM_POLICY = fromString("CustomPolicy"); - /** Static value CustomerManaged for AssessmentType. */ + /** + * Static value CustomerManaged for AssessmentType. + */ public static final AssessmentType CUSTOMER_MANAGED = fromString("CustomerManaged"); - /** Static value VerifiedPartner for AssessmentType. */ + /** + * Static value VerifiedPartner for AssessmentType. + */ public static final AssessmentType VERIFIED_PARTNER = fromString("VerifiedPartner"); /** * Creates a new instance of AssessmentType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +44,7 @@ public AssessmentType() { /** * Creates or finds a AssessmentType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AssessmentType. */ @@ -47,7 +55,7 @@ public static AssessmentType fromString(String name) { /** * Gets known AssessmentType values. - * + * * @return known AssessmentType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Assessments.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Assessments.java index d986d2a6d254..b5a734d81404 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Assessments.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Assessments.java @@ -8,38 +8,40 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Assessments. */ +/** + * Resource collection API of Assessments. + */ public interface Assessments { /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String scope); /** * Get security assessments on all your scanned resources inside a scope. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security assessments on all your scanned resources inside a scope as paginated response with {@link - * PagedIterable}. + * @return security assessments on all your scanned resources inside a scope as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String scope, Context context); /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param expand OData expand. Optional. @@ -49,12 +51,12 @@ public interface Assessments { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a security assessment on your scanned resource along with {@link Response}. */ - Response getWithResponse( - String resourceId, String assessmentName, ExpandEnum expand, Context context); + Response getWithResponse(String resourceId, String assessmentName, ExpandEnum expand, + Context context); /** * Get a security assessment on your scanned resource. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,7 +69,7 @@ Response getWithResponse( /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. @@ -81,7 +83,7 @@ Response getWithResponse( /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param resourceId The identifier of the resource. * @param assessmentName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,7 +94,7 @@ Response getWithResponse( /** * Get a security assessment on your scanned resource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -103,7 +105,7 @@ Response getWithResponse( /** * Get a security assessment on your scanned resource. - * + * * @param id the resource ID. * @param expand OData expand. Optional. * @param context The context to associate with this operation. @@ -117,7 +119,7 @@ Response getWithResponse( /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -128,7 +130,7 @@ Response getWithResponse( /** * Delete a security assessment on your resource. An assessment metadata that describes this assessment must be * predefined with the same name before inserting the assessment result. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,7 +142,7 @@ Response getWithResponse( /** * Begins definition for a new SecurityAssessmentResponse resource. - * + * * @param name resource name. * @return the first stage of the new SecurityAssessmentResponse definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentsMetadatas.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentsMetadatas.java index e5145325396c..33e7a2d02d99 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentsMetadatas.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AssessmentsMetadatas.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of AssessmentsMetadatas. */ +/** + * Resource collection API of AssessmentsMetadatas. + */ public interface AssessmentsMetadatas { /** * Get metadata information on all assessment types. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on all assessment types as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface AssessmentsMetadatas { /** * Get metadata information on all assessment types. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +34,7 @@ public interface AssessmentsMetadatas { /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -44,7 +46,7 @@ public interface AssessmentsMetadatas { /** * Get metadata information on an assessment type. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,29 +57,29 @@ public interface AssessmentsMetadatas { /** * Get metadata information on all assessment types in a specific subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedIterable}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable listBySubscription(); /** * Get metadata information on all assessment types in a specific subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata information on all assessment types in a specific subscription as paginated response with {@link - * PagedIterable}. + * @return metadata information on all assessment types in a specific subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable listBySubscription(Context context); /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,12 +87,12 @@ public interface AssessmentsMetadatas { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata information on an assessment type in a specific subscription along with {@link Response}. */ - Response getInSubscriptionWithResponse( - String assessmentMetadataName, Context context); + Response getInSubscriptionWithResponse(String assessmentMetadataName, + Context context); /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,7 +104,7 @@ Response getInSubscriptionWithResponse( /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +117,7 @@ Response getInSubscriptionWithResponse( /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param assessmentMetadataName The Assessment Key - Unique key for the assessment type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -125,7 +127,7 @@ Response getInSubscriptionWithResponse( /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -136,7 +138,7 @@ Response getInSubscriptionWithResponse( /** * Get metadata information on an assessment type in a specific subscription. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,7 +151,7 @@ Response getInSubscriptionWithResponse( /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -160,7 +162,7 @@ Response getInSubscriptionWithResponse( /** * Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the * assessments of that type in that subscription. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,7 +174,7 @@ Response getInSubscriptionWithResponse( /** * Begins definition for a new SecurityAssessmentMetadataResponse resource. - * + * * @param name resource name. * @return the first stage of the new SecurityAssessmentMetadataResponse definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaExternalSecuritySolution.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaExternalSecuritySolution.java index 218d2ba95a85..2609dfb7d76c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaExternalSecuritySolution.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaExternalSecuritySolution.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Represents an ATA security solution which sends logs to an OMS workspace. */ +/** + * Represents an ATA security solution which sends logs to an OMS workspace. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("ATA") @Fluent @@ -21,13 +23,15 @@ public final class AtaExternalSecuritySolution extends ExternalSecuritySolutionI @JsonProperty(value = "properties") private AtaSolutionProperties properties; - /** Creates an instance of AtaExternalSecuritySolution class. */ + /** + * Creates an instance of AtaExternalSecuritySolution class. + */ public AtaExternalSecuritySolution() { } /** * Get the properties property: The external security solution properties for ATA solutions. - * + * * @return the properties value. */ public AtaSolutionProperties properties() { @@ -36,7 +40,7 @@ public AtaSolutionProperties properties() { /** * Set the properties property: The external security solution properties for ATA solutions. - * + * * @param properties the properties value to set. * @return the AtaExternalSecuritySolution object itself. */ @@ -47,7 +51,7 @@ public AtaExternalSecuritySolution withProperties(AtaSolutionProperties properti /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaSolutionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaSolutionProperties.java index 5167966f1d5d..ec7f9ebb9d13 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaSolutionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AtaSolutionProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The external security solution properties for ATA solutions. */ +/** + * The external security solution properties for ATA solutions. + */ @Fluent public final class AtaSolutionProperties extends ExternalSecuritySolutionProperties { /* @@ -16,13 +18,15 @@ public final class AtaSolutionProperties extends ExternalSecuritySolutionPropert @JsonProperty(value = "lastEventReceived") private String lastEventReceived; - /** Creates an instance of AtaSolutionProperties class. */ + /** + * Creates an instance of AtaSolutionProperties class. + */ public AtaSolutionProperties() { } /** * Get the lastEventReceived property: The lastEventReceived property. - * + * * @return the lastEventReceived value. */ public String lastEventReceived() { @@ -31,7 +35,7 @@ public String lastEventReceived() { /** * Set the lastEventReceived property: The lastEventReceived property. - * + * * @param lastEventReceived the lastEventReceived value to set. * @return the AtaSolutionProperties object itself. */ @@ -40,21 +44,27 @@ public AtaSolutionProperties withLastEventReceived(String lastEventReceived) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AtaSolutionProperties withDeviceVendor(String deviceVendor) { super.withDeviceVendor(deviceVendor); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AtaSolutionProperties withDeviceType(String deviceType) { super.withDeviceType(deviceType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AtaSolutionProperties withWorkspace(ConnectedWorkspace workspace) { super.withWorkspace(workspace); @@ -63,7 +73,7 @@ public AtaSolutionProperties withWorkspace(ConnectedWorkspace workspace) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationDetailsProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationDetailsProperties.java index 71b7f498e5e9..cfa26ae891dc 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationDetailsProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationDetailsProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Settings for cloud authentication management. */ +/** + * Settings for cloud authentication management. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -21,8 +23,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "awsCreds", value = AwsCredsAuthenticationDetailsProperties.class), @JsonSubTypes.Type(name = "awsAssumeRole", value = AwAssumeRoleAuthenticationDetailsProperties.class), - @JsonSubTypes.Type(name = "gcpCredentials", value = GcpCredentialsDetailsProperties.class) -}) + @JsonSubTypes.Type(name = "gcpCredentials", value = GcpCredentialsDetailsProperties.class) }) @Immutable public class AuthenticationDetailsProperties { /* @@ -37,13 +38,15 @@ public class AuthenticationDetailsProperties { @JsonProperty(value = "grantedPermissions", access = JsonProperty.Access.WRITE_ONLY) private List grantedPermissions; - /** Creates an instance of AuthenticationDetailsProperties class. */ + /** + * Creates an instance of AuthenticationDetailsProperties class. + */ public AuthenticationDetailsProperties() { } /** * Get the authenticationProvisioningState property: State of the multi-cloud connector. - * + * * @return the authenticationProvisioningState value. */ public AuthenticationProvisioningState authenticationProvisioningState() { @@ -52,7 +55,7 @@ public AuthenticationProvisioningState authenticationProvisioningState() { /** * Get the grantedPermissions property: The permissions detected in the cloud account. - * + * * @return the grantedPermissions value. */ public List grantedPermissions() { @@ -61,7 +64,7 @@ public List grantedPermissions() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationProvisioningState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationProvisioningState.java index e81b2a271af0..d0332051ff53 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationProvisioningState.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationProvisioningState.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** State of the multi-cloud connector. */ +/** + * State of the multi-cloud connector. + */ public final class AuthenticationProvisioningState extends ExpandableStringEnum { - /** Static value Valid for AuthenticationProvisioningState. */ + /** + * Static value Valid for AuthenticationProvisioningState. + */ public static final AuthenticationProvisioningState VALID = fromString("Valid"); - /** Static value Invalid for AuthenticationProvisioningState. */ + /** + * Static value Invalid for AuthenticationProvisioningState. + */ public static final AuthenticationProvisioningState INVALID = fromString("Invalid"); - /** Static value Expired for AuthenticationProvisioningState. */ + /** + * Static value Expired for AuthenticationProvisioningState. + */ public static final AuthenticationProvisioningState EXPIRED = fromString("Expired"); - /** Static value IncorrectPolicy for AuthenticationProvisioningState. */ + /** + * Static value IncorrectPolicy for AuthenticationProvisioningState. + */ public static final AuthenticationProvisioningState INCORRECT_POLICY = fromString("IncorrectPolicy"); /** * Creates a new instance of AuthenticationProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public AuthenticationProvisioningState() { /** * Creates or finds a AuthenticationProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding AuthenticationProvisioningState. */ @@ -44,7 +54,7 @@ public static AuthenticationProvisioningState fromString(String name) { /** * Gets known AuthenticationProvisioningState values. - * + * * @return known AuthenticationProvisioningState values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationType.java index 39089c8a4a99..0a61e277f217 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthenticationType.java @@ -13,18 +13,24 @@ * account organization credentials. */ public final class AuthenticationType extends ExpandableStringEnum { - /** Static value awsCreds for AuthenticationType. */ + /** + * Static value awsCreds for AuthenticationType. + */ public static final AuthenticationType AWS_CREDS = fromString("awsCreds"); - /** Static value awsAssumeRole for AuthenticationType. */ + /** + * Static value awsAssumeRole for AuthenticationType. + */ public static final AuthenticationType AWS_ASSUME_ROLE = fromString("awsAssumeRole"); - /** Static value gcpCredentials for AuthenticationType. */ + /** + * Static value gcpCredentials for AuthenticationType. + */ public static final AuthenticationType GCP_CREDENTIALS = fromString("gcpCredentials"); /** * Creates a new instance of AuthenticationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public AuthenticationType() { /** * Creates or finds a AuthenticationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AuthenticationType. */ @@ -44,7 +50,7 @@ public static AuthenticationType fromString(String name) { /** * Gets known AuthenticationType values. - * + * * @return known AuthenticationType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Authorization.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Authorization.java new file mode 100644 index 000000000000..489e98d2f97a --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Authorization.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Authorization payload. + */ +@Fluent +public final class Authorization { + /* + * Gets or sets one-time OAuth code to exchange for refresh and access tokens. + * + * Only used during PUT/PATCH operations. The secret is cleared during GET. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Creates an instance of Authorization class. + */ + public Authorization() { + } + + /** + * Get the code property: Gets or sets one-time OAuth code to exchange for refresh and access tokens. + * + * Only used during PUT/PATCH operations. The secret is cleared during GET. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: Gets or sets one-time OAuth code to exchange for refresh and access tokens. + * + * Only used during PUT/PATCH operations. The secret is cleared during GET. + * + * @param code the code value to set. + * @return the Authorization object itself. + */ + public Authorization withCode(String code) { + this.code = code; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoDiscovery.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoDiscovery.java new file mode 100644 index 000000000000..b10fbe6540f0 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoDiscovery.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * AutoDiscovery states. + */ +public final class AutoDiscovery extends ExpandableStringEnum { + /** + * Static value Disabled for AutoDiscovery. + */ + public static final AutoDiscovery DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for AutoDiscovery. + */ + public static final AutoDiscovery ENABLED = fromString("Enabled"); + + /** + * Static value NotApplicable for AutoDiscovery. + */ + public static final AutoDiscovery NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of AutoDiscovery value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutoDiscovery() { + } + + /** + * Creates or finds a AutoDiscovery from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutoDiscovery. + */ + @JsonCreator + public static AutoDiscovery fromString(String name) { + return fromString(name, AutoDiscovery.class); + } + + /** + * Gets known AutoDiscovery values. + * + * @return known AutoDiscovery values. + */ + public static Collection values() { + return values(AutoDiscovery.class); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvision.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvision.java index 0b365391e9a0..c4f1323e11b6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvision.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvision.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Describes what kind of security agent provisioning action to take. */ +/** + * Describes what kind of security agent provisioning action to take. + */ public final class AutoProvision extends ExpandableStringEnum { - /** Static value On for AutoProvision. */ + /** + * Static value On for AutoProvision. + */ public static final AutoProvision ON = fromString("On"); - /** Static value Off for AutoProvision. */ + /** + * Static value Off for AutoProvision. + */ public static final AutoProvision OFF = fromString("Off"); /** * Creates a new instance of AutoProvision value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AutoProvision() { /** * Creates or finds a AutoProvision from its string representation. - * + * * @param name a name to look for. * @return the corresponding AutoProvision. */ @@ -38,7 +44,7 @@ public static AutoProvision fromString(String name) { /** * Gets known AutoProvision values. - * + * * @return known AutoProvision values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSetting.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSetting.java index df4279031dd7..9925a34a0a57 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSetting.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSetting.java @@ -7,51 +7,61 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AutoProvisioningSettingInner; -/** An immutable client-side representation of AutoProvisioningSetting. */ +/** + * An immutable client-side representation of AutoProvisioningSetting. + */ public interface AutoProvisioningSetting { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the autoProvision property: Describes what kind of security agent provisioning action to take. - * + * * @return the autoProvision value. */ AutoProvision autoProvision(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AutoProvisioningSettingInner object. - * + * * @return the inner object. */ AutoProvisioningSettingInner innerModel(); - /** The entirety of the AutoProvisioningSetting definition. */ + /** + * The entirety of the AutoProvisioningSetting definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate { } - /** The AutoProvisioningSetting definition stages. */ + + /** + * The AutoProvisioningSetting definition stages. + */ interface DefinitionStages { - /** The first stage of the AutoProvisioningSetting definition. */ + /** + * The first stage of the AutoProvisioningSetting definition. + */ interface Blank extends WithCreate { } + /** * The stage of the AutoProvisioningSetting definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. @@ -59,40 +69,44 @@ interface Blank extends WithCreate { interface WithCreate extends DefinitionStages.WithAutoProvision { /** * Executes the create request. - * + * * @return the created resource. */ AutoProvisioningSetting create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ AutoProvisioningSetting create(Context context); } - /** The stage of the AutoProvisioningSetting definition allowing to specify autoProvision. */ + + /** + * The stage of the AutoProvisioningSetting definition allowing to specify autoProvision. + */ interface WithAutoProvision { /** * Specifies the autoProvision property: Describes what kind of security agent provisioning action to take. - * + * * @param autoProvision Describes what kind of security agent provisioning action to take. * @return the next definition stage. */ WithCreate withAutoProvision(AutoProvision autoProvision); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ AutoProvisioningSetting refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettingList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettingList.java index de263eefa9dd..f1fff0f0d757 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettingList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettingList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of all the auto provisioning settings response. */ +/** + * List of all the auto provisioning settings response. + */ @Fluent public final class AutoProvisioningSettingList { /* @@ -24,13 +26,15 @@ public final class AutoProvisioningSettingList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AutoProvisioningSettingList class. */ + /** + * Creates an instance of AutoProvisioningSettingList class. + */ public AutoProvisioningSettingList() { } /** * Get the value property: List of all the auto provisioning settings. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of all the auto provisioning settings. - * + * * @param value the value value to set. * @return the AutoProvisioningSettingList object itself. */ @@ -50,7 +54,7 @@ public AutoProvisioningSettingList withValue(List /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettings.java index 2b050e6bc336..772fb6f8a28b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettings.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutoProvisioningSettings.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of AutoProvisioningSettings. */ +/** + * Resource collection API of AutoProvisioningSettings. + */ public interface AutoProvisioningSettings { /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the auto provisioning settings response as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface AutoProvisioningSettings { /** * Exposes the auto provisioning settings of the subscriptions. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +34,7 @@ public interface AutoProvisioningSettings { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -44,7 +46,7 @@ public interface AutoProvisioningSettings { /** * Details of a specific setting. - * + * * @param settingName Auto provisioning setting key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,7 +57,7 @@ public interface AutoProvisioningSettings { /** * Details of a specific setting. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -66,7 +68,7 @@ public interface AutoProvisioningSettings { /** * Details of a specific setting. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,7 +80,7 @@ public interface AutoProvisioningSettings { /** * Begins definition for a new AutoProvisioningSetting resource. - * + * * @param name resource name. * @return the first stage of the new AutoProvisioningSetting definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automation.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automation.java index b584f1a114a3..1e248cccbe54 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automation.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automation.java @@ -11,53 +11,55 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of Automation. */ +/** + * An immutable client-side representation of Automation. + */ public interface Automation { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the description property: The security automation description. - * + * * @return the description value. */ String description(); /** * Gets the isEnabled property: Indicates whether the security automation is enabled. - * + * * @return the isEnabled value. */ Boolean isEnabled(); @@ -66,7 +68,7 @@ public interface Automation { * Gets the scopes property: A collection of scopes on which the security automations logic is applied. Supported * scopes are the subscription itself or a resource group under that subscription. The automation will only apply on * defined scopes. - * + * * @return the scopes value. */ List scopes(); @@ -74,7 +76,7 @@ public interface Automation { /** * Gets the sources property: A collection of the source event types which evaluate the security automation set of * rules. - * + * * @return the sources value. */ List sources(); @@ -82,56 +84,63 @@ public interface Automation { /** * Gets the actions property: A collection of the actions which are triggered if all the configured rules * evaluations, within at least one rule set, are true. - * + * * @return the actions value. */ List actions(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AutomationInner object. - * + * * @return the inner object. */ AutomationInner innerModel(); - /** The entirety of the Automation definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Automation definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Automation definition stages. */ + + /** + * The Automation definition stages. + */ interface DefinitionStages { - /** The first stage of the Automation definition. */ + /** + * The first stage of the Automation definition. + */ interface Blank extends WithLocation { } - /** The stage of the Automation definition allowing to specify location. */ + + /** + * The stage of the Automation definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -139,229 +148,266 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Automation definition allowing to specify parent resource. */ + + /** + * The stage of the Automation definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the Automation definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithDescription, - DefinitionStages.WithIsEnabled, - DefinitionStages.WithScopes, - DefinitionStages.WithSources, - DefinitionStages.WithActions { + extends DefinitionStages.WithTags, DefinitionStages.WithDescription, DefinitionStages.WithIsEnabled, + DefinitionStages.WithScopes, DefinitionStages.WithSources, DefinitionStages.WithActions { /** * Executes the create request. - * + * * @return the created resource. */ Automation create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Automation create(Context context); } - /** The stage of the Automation definition allowing to specify tags. */ + + /** + * The stage of the Automation definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Automation definition allowing to specify description. */ + + /** + * The stage of the Automation definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: The security automation description.. - * + * * @param description The security automation description. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the Automation definition allowing to specify isEnabled. */ + + /** + * The stage of the Automation definition allowing to specify isEnabled. + */ interface WithIsEnabled { /** * Specifies the isEnabled property: Indicates whether the security automation is enabled.. - * + * * @param isEnabled Indicates whether the security automation is enabled. * @return the next definition stage. */ WithCreate withIsEnabled(Boolean isEnabled); } - /** The stage of the Automation definition allowing to specify scopes. */ + + /** + * The stage of the Automation definition allowing to specify scopes. + */ interface WithScopes { /** * Specifies the scopes property: A collection of scopes on which the security automations logic is applied. * Supported scopes are the subscription itself or a resource group under that subscription. The automation * will only apply on defined scopes.. - * + * * @param scopes A collection of scopes on which the security automations logic is applied. Supported scopes - * are the subscription itself or a resource group under that subscription. The automation will only - * apply on defined scopes. + * are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. * @return the next definition stage. */ WithCreate withScopes(List scopes); } - /** The stage of the Automation definition allowing to specify sources. */ + + /** + * The stage of the Automation definition allowing to specify sources. + */ interface WithSources { /** * Specifies the sources property: A collection of the source event types which evaluate the security * automation set of rules.. - * + * * @param sources A collection of the source event types which evaluate the security automation set of - * rules. + * rules. * @return the next definition stage. */ WithCreate withSources(List sources); } - /** The stage of the Automation definition allowing to specify actions. */ + + /** + * The stage of the Automation definition allowing to specify actions. + */ interface WithActions { /** * Specifies the actions property: A collection of the actions which are triggered if all the configured * rules evaluations, within at least one rule set, are true.. - * + * * @param actions A collection of the actions which are triggered if all the configured rules evaluations, - * within at least one rule set, are true. + * within at least one rule set, are true. * @return the next definition stage. */ WithCreate withActions(List actions); } } + /** * Begins update for the Automation resource. - * + * * @return the stage of resource update. */ Automation.Update update(); - /** The template for Automation update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithDescription, - UpdateStages.WithIsEnabled, - UpdateStages.WithScopes, - UpdateStages.WithSources, - UpdateStages.WithActions { + /** + * The template for Automation update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithIsEnabled, + UpdateStages.WithScopes, UpdateStages.WithSources, UpdateStages.WithActions { /** * Executes the update request. - * + * * @return the updated resource. */ Automation apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Automation apply(Context context); } - /** The Automation update stages. */ + + /** + * The Automation update stages. + */ interface UpdateStages { - /** The stage of the Automation update allowing to specify tags. */ + /** + * The stage of the Automation update allowing to specify tags. + */ interface WithTags { /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. + * Specifies the tags property: A list of key value pairs that describe the resource.. + * + * @param tags A list of key value pairs that describe the resource. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Automation update allowing to specify description. */ + + /** + * The stage of the Automation update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: The security automation description.. - * + * * @param description The security automation description. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the Automation update allowing to specify isEnabled. */ + + /** + * The stage of the Automation update allowing to specify isEnabled. + */ interface WithIsEnabled { /** * Specifies the isEnabled property: Indicates whether the security automation is enabled.. - * + * * @param isEnabled Indicates whether the security automation is enabled. * @return the next definition stage. */ Update withIsEnabled(Boolean isEnabled); } - /** The stage of the Automation update allowing to specify scopes. */ + + /** + * The stage of the Automation update allowing to specify scopes. + */ interface WithScopes { /** * Specifies the scopes property: A collection of scopes on which the security automations logic is applied. * Supported scopes are the subscription itself or a resource group under that subscription. The automation * will only apply on defined scopes.. - * + * * @param scopes A collection of scopes on which the security automations logic is applied. Supported scopes - * are the subscription itself or a resource group under that subscription. The automation will only - * apply on defined scopes. + * are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. * @return the next definition stage. */ Update withScopes(List scopes); } - /** The stage of the Automation update allowing to specify sources. */ + + /** + * The stage of the Automation update allowing to specify sources. + */ interface WithSources { /** * Specifies the sources property: A collection of the source event types which evaluate the security * automation set of rules.. - * + * * @param sources A collection of the source event types which evaluate the security automation set of - * rules. + * rules. * @return the next definition stage. */ Update withSources(List sources); } - /** The stage of the Automation update allowing to specify actions. */ + + /** + * The stage of the Automation update allowing to specify actions. + */ interface WithActions { /** * Specifies the actions property: A collection of the actions which are triggered if all the configured * rules evaluations, within at least one rule set, are true.. - * + * * @param actions A collection of the actions which are triggered if all the configured rules evaluations, - * within at least one rule set, are true. + * within at least one rule set, are true. * @return the next definition stage. */ Update withActions(List actions); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Automation refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -370,7 +416,7 @@ interface WithActions { /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param automation The security automation resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -383,7 +429,7 @@ interface WithActions { /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationAction.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationAction.java index 5aab572dca45..2932d91e5895 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationAction.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationAction.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The action that should be triggered. */ +/** + * The action that should be triggered. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,17 +21,18 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "LogicApp", value = AutomationActionLogicApp.class), @JsonSubTypes.Type(name = "EventHub", value = AutomationActionEventHub.class), - @JsonSubTypes.Type(name = "Workspace", value = AutomationActionWorkspace.class) -}) + @JsonSubTypes.Type(name = "Workspace", value = AutomationActionWorkspace.class) }) @Immutable public class AutomationAction { - /** Creates an instance of AutomationAction class. */ + /** + * Creates an instance of AutomationAction class. + */ public AutomationAction() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionEventHub.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionEventHub.java index 8d4a940480da..f0f5d7def421 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionEventHub.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionEventHub.java @@ -35,13 +35,21 @@ public final class AutomationActionEventHub extends AutomationAction { @JsonProperty(value = "connectionString") private String connectionString; - /** Creates an instance of AutomationActionEventHub class. */ + /* + * Indicates whether the trusted service is enabled or not. + */ + @JsonProperty(value = "isTrustedServiceEnabled") + private Boolean isTrustedServiceEnabled; + + /** + * Creates an instance of AutomationActionEventHub class. + */ public AutomationActionEventHub() { } /** * Get the eventHubResourceId property: The target Event Hub Azure Resource ID. - * + * * @return the eventHubResourceId value. */ public String eventHubResourceId() { @@ -50,7 +58,7 @@ public String eventHubResourceId() { /** * Set the eventHubResourceId property: The target Event Hub Azure Resource ID. - * + * * @param eventHubResourceId the eventHubResourceId value to set. * @return the AutomationActionEventHub object itself. */ @@ -61,7 +69,7 @@ public AutomationActionEventHub withEventHubResourceId(String eventHubResourceId /** * Get the sasPolicyName property: The target Event Hub SAS policy name. - * + * * @return the sasPolicyName value. */ public String sasPolicyName() { @@ -71,7 +79,7 @@ public String sasPolicyName() { /** * Get the connectionString property: The target Event Hub connection string (it will not be included in any * response). - * + * * @return the connectionString value. */ public String connectionString() { @@ -81,7 +89,7 @@ public String connectionString() { /** * Set the connectionString property: The target Event Hub connection string (it will not be included in any * response). - * + * * @param connectionString the connectionString value to set. * @return the AutomationActionEventHub object itself. */ @@ -90,9 +98,29 @@ public AutomationActionEventHub withConnectionString(String connectionString) { return this; } + /** + * Get the isTrustedServiceEnabled property: Indicates whether the trusted service is enabled or not. + * + * @return the isTrustedServiceEnabled value. + */ + public Boolean isTrustedServiceEnabled() { + return this.isTrustedServiceEnabled; + } + + /** + * Set the isTrustedServiceEnabled property: Indicates whether the trusted service is enabled or not. + * + * @param isTrustedServiceEnabled the isTrustedServiceEnabled value to set. + * @return the AutomationActionEventHub object itself. + */ + public AutomationActionEventHub withIsTrustedServiceEnabled(Boolean isTrustedServiceEnabled) { + this.isTrustedServiceEnabled = isTrustedServiceEnabled; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionLogicApp.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionLogicApp.java index 38fe7c5d0598..18128148fbc7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionLogicApp.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionLogicApp.java @@ -10,8 +10,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * The logic app action that should be triggered. To learn more about Microsoft Defender for Cloud's Workflow Automation - * capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore. + * The logic app action that should be triggered. To learn more about Microsoft Defender for Cloud's Workflow + * Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") @JsonTypeName("LogicApp") @@ -30,14 +30,16 @@ public final class AutomationActionLogicApp extends AutomationAction { @JsonProperty(value = "uri") private String uri; - /** Creates an instance of AutomationActionLogicApp class. */ + /** + * Creates an instance of AutomationActionLogicApp class. + */ public AutomationActionLogicApp() { } /** * Get the logicAppResourceId property: The triggered Logic App Azure Resource ID. This can also reside on other * subscriptions, given that you have permissions to trigger the Logic App. - * + * * @return the logicAppResourceId value. */ public String logicAppResourceId() { @@ -47,7 +49,7 @@ public String logicAppResourceId() { /** * Set the logicAppResourceId property: The triggered Logic App Azure Resource ID. This can also reside on other * subscriptions, given that you have permissions to trigger the Logic App. - * + * * @param logicAppResourceId the logicAppResourceId value to set. * @return the AutomationActionLogicApp object itself. */ @@ -58,7 +60,7 @@ public AutomationActionLogicApp withLogicAppResourceId(String logicAppResourceId /** * Get the uri property: The Logic App trigger URI endpoint (it will not be included in any response). - * + * * @return the uri value. */ public String uri() { @@ -67,7 +69,7 @@ public String uri() { /** * Set the uri property: The Logic App trigger URI endpoint (it will not be included in any response). - * + * * @param uri the uri value to set. * @return the AutomationActionLogicApp object itself. */ @@ -78,7 +80,7 @@ public AutomationActionLogicApp withUri(String uri) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionWorkspace.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionWorkspace.java index 9fd967924bdf..ede8b7b09974 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionWorkspace.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationActionWorkspace.java @@ -10,11 +10,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * The Log Analytics Workspace to which event data will be exported. Security alerts data will reside in the + * The�Log�Analytics�Workspace�to�which�event data will be exported. Security alerts data will reside in the * 'SecurityAlert' table and the assessments data will reside in the 'SecurityRecommendation' table (under the - * 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security Center - * Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Microsoft Defender - * for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore. + * 'Security'/'SecurityCenterFree' solutions). Note that in order to view the data in the workspace, the Security + * Center Log Analytics free/standard solution needs to be enabled on that workspace. To learn more about Microsoft + * Defender for Cloud continuous export capabilities, visit https://aka.ms/ASCExportLearnMore. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") @JsonTypeName("Workspace") @@ -26,13 +26,15 @@ public final class AutomationActionWorkspace extends AutomationAction { @JsonProperty(value = "workspaceResourceId") private String workspaceResourceId; - /** Creates an instance of AutomationActionWorkspace class. */ + /** + * Creates an instance of AutomationActionWorkspace class. + */ public AutomationActionWorkspace() { } /** * Get the workspaceResourceId property: The fully qualified Log Analytics Workspace Azure Resource ID. - * + * * @return the workspaceResourceId value. */ public String workspaceResourceId() { @@ -41,7 +43,7 @@ public String workspaceResourceId() { /** * Set the workspaceResourceId property: The fully qualified Log Analytics Workspace Azure Resource ID. - * + * * @param workspaceResourceId the workspaceResourceId value to set. * @return the AutomationActionWorkspace object itself. */ @@ -52,7 +54,7 @@ public AutomationActionWorkspace withWorkspaceResourceId(String workspaceResourc /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationList.java index 4bc9fc3e432c..d330a5ca764d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationList.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of security automations response. */ +/** + * List of security automations response. + */ @Fluent public final class AutomationList { /* @@ -25,13 +27,15 @@ public final class AutomationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AutomationList class. */ + /** + * Creates an instance of AutomationList class. + */ public AutomationList() { } /** * Get the value property: The list of security automations under the given scope. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The list of security automations under the given scope. - * + * * @param value the value value to set. * @return the AutomationList object itself. */ @@ -51,7 +55,7 @@ public AutomationList withValue(List value) { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AutomationList")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model AutomationList")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationRuleSet.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationRuleSet.java index eb1a7a25fcd6..71584c443469 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationRuleSet.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationRuleSet.java @@ -9,8 +9,8 @@ import java.util.List; /** - * A rule set which evaluates all its rules upon an event interception. Only when all the included rules in the rule set - * will be evaluated as 'true', will the event trigger the defined actions. + * A rule set which evaluates all its rules upon an event interception. Only when all the included rules in the rule + * set will be evaluated as 'true', will the event trigger the defined actions. */ @Fluent public final class AutomationRuleSet { @@ -20,13 +20,15 @@ public final class AutomationRuleSet { @JsonProperty(value = "rules") private List rules; - /** Creates an instance of AutomationRuleSet class. */ + /** + * Creates an instance of AutomationRuleSet class. + */ public AutomationRuleSet() { } /** * Get the rules property: The rules property. - * + * * @return the rules value. */ public List rules() { @@ -35,7 +37,7 @@ public List rules() { /** * Set the rules property: The rules property. - * + * * @param rules the rules value to set. * @return the AutomationRuleSet object itself. */ @@ -46,7 +48,7 @@ public AutomationRuleSet withRules(List rules) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationScope.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationScope.java index b6797a2853f0..1f804b33d891 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationScope.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationScope.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A single automation scope. */ +/** + * A single automation scope. + */ @Fluent public final class AutomationScope { /* @@ -23,13 +25,15 @@ public final class AutomationScope { @JsonProperty(value = "scopePath") private String scopePath; - /** Creates an instance of AutomationScope class. */ + /** + * Creates an instance of AutomationScope class. + */ public AutomationScope() { } /** * Get the description property: The resources scope description. - * + * * @return the description value. */ public String description() { @@ -38,7 +42,7 @@ public String description() { /** * Set the description property: The resources scope description. - * + * * @param description the description value to set. * @return the AutomationScope object itself. */ @@ -50,7 +54,7 @@ public AutomationScope withDescription(String description) { /** * Get the scopePath property: The resources scope path. Can be the subscription on which the automation is defined * on or a resource group under that subscription (fully qualified Azure resource IDs). - * + * * @return the scopePath value. */ public String scopePath() { @@ -60,7 +64,7 @@ public String scopePath() { /** * Set the scopePath property: The resources scope path. Can be the subscription on which the automation is defined * on or a resource group under that subscription (fully qualified Azure resource IDs). - * + * * @param scopePath the scopePath value to set. * @return the AutomationScope object itself. */ @@ -71,7 +75,7 @@ public AutomationScope withScopePath(String scopePath) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationSource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationSource.java index 7488319504ca..26aba46562a9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationSource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationSource.java @@ -28,13 +28,15 @@ public final class AutomationSource { @JsonProperty(value = "ruleSets") private List ruleSets; - /** Creates an instance of AutomationSource class. */ + /** + * Creates an instance of AutomationSource class. + */ public AutomationSource() { } /** * Get the eventSource property: A valid event source type. - * + * * @return the eventSource value. */ public EventSource eventSource() { @@ -43,7 +45,7 @@ public EventSource eventSource() { /** * Set the eventSource property: A valid event source type. - * + * * @param eventSource the eventSource value to set. * @return the AutomationSource object itself. */ @@ -55,7 +57,7 @@ public AutomationSource withEventSource(EventSource eventSource) { /** * Get the ruleSets property: A set of rules which evaluate upon event interception. A logical disjunction is * applied between defined rule sets (logical 'or'). - * + * * @return the ruleSets value. */ public List ruleSets() { @@ -65,7 +67,7 @@ public List ruleSets() { /** * Set the ruleSets property: A set of rules which evaluate upon event interception. A logical disjunction is * applied between defined rule sets (logical 'or'). - * + * * @param ruleSets the ruleSets value to set. * @return the AutomationSource object itself. */ @@ -76,7 +78,7 @@ public AutomationSource withRuleSets(List ruleSets) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationTriggeringRule.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationTriggeringRule.java index 662e8158cfe2..a9e3792e819c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationTriggeringRule.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationTriggeringRule.java @@ -37,13 +37,15 @@ public final class AutomationTriggeringRule { @JsonProperty(value = "operator") private Operator operator; - /** Creates an instance of AutomationTriggeringRule class. */ + /** + * Creates an instance of AutomationTriggeringRule class. + */ public AutomationTriggeringRule() { } /** * Get the propertyJPath property: The JPath of the entity model property that should be checked. - * + * * @return the propertyJPath value. */ public String propertyJPath() { @@ -52,7 +54,7 @@ public String propertyJPath() { /** * Set the propertyJPath property: The JPath of the entity model property that should be checked. - * + * * @param propertyJPath the propertyJPath value to set. * @return the AutomationTriggeringRule object itself. */ @@ -64,7 +66,7 @@ public AutomationTriggeringRule withPropertyJPath(String propertyJPath) { /** * Get the propertyType property: The data type of the compared operands (string, integer, floating point number or * a boolean [true/false]]. - * + * * @return the propertyType value. */ public PropertyType propertyType() { @@ -74,7 +76,7 @@ public PropertyType propertyType() { /** * Set the propertyType property: The data type of the compared operands (string, integer, floating point number or * a boolean [true/false]]. - * + * * @param propertyType the propertyType value to set. * @return the AutomationTriggeringRule object itself. */ @@ -85,7 +87,7 @@ public AutomationTriggeringRule withPropertyType(PropertyType propertyType) { /** * Get the expectedValue property: The expected value. - * + * * @return the expectedValue value. */ public String expectedValue() { @@ -94,7 +96,7 @@ public String expectedValue() { /** * Set the expectedValue property: The expected value. - * + * * @param expectedValue the expectedValue value to set. * @return the AutomationTriggeringRule object itself. */ @@ -106,7 +108,7 @@ public AutomationTriggeringRule withExpectedValue(String expectedValue) { /** * Get the operator property: A valid comparer operator to use. A case-insensitive comparison will be applied for * String PropertyType. - * + * * @return the operator value. */ public Operator operator() { @@ -116,7 +118,7 @@ public Operator operator() { /** * Set the operator property: A valid comparer operator to use. A case-insensitive comparison will be applied for * String PropertyType. - * + * * @param operator the operator value to set. * @return the AutomationTriggeringRule object itself. */ @@ -127,7 +129,7 @@ public AutomationTriggeringRule withOperator(Operator operator) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationUpdateModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationUpdateModel.java new file mode 100644 index 000000000000..7c58483c71e5 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationUpdateModel.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.security.fluent.models.AutomationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * The update model of security automation resource. + */ +@Fluent +public final class AutomationUpdateModel extends Tags { + /* + * Security automation data + */ + @JsonProperty(value = "properties") + private AutomationProperties innerProperties; + + /** + * Creates an instance of AutomationUpdateModel class. + */ + public AutomationUpdateModel() { + } + + /** + * Get the innerProperties property: Security automation data. + * + * @return the innerProperties value. + */ + private AutomationProperties innerProperties() { + return this.innerProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public AutomationUpdateModel withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the description property: The security automation description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The security automation description. + * + * @param description the description value to set. + * @return the AutomationUpdateModel object itself. + */ + public AutomationUpdateModel withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new AutomationProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the isEnabled property: Indicates whether the security automation is enabled. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); + } + + /** + * Set the isEnabled property: Indicates whether the security automation is enabled. + * + * @param isEnabled the isEnabled value to set. + * @return the AutomationUpdateModel object itself. + */ + public AutomationUpdateModel withIsEnabled(Boolean isEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new AutomationProperties(); + } + this.innerProperties().withIsEnabled(isEnabled); + return this; + } + + /** + * Get the scopes property: A collection of scopes on which the security automations logic is applied. Supported + * scopes are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. + * + * @return the scopes value. + */ + public List scopes() { + return this.innerProperties() == null ? null : this.innerProperties().scopes(); + } + + /** + * Set the scopes property: A collection of scopes on which the security automations logic is applied. Supported + * scopes are the subscription itself or a resource group under that subscription. The automation will only apply + * on defined scopes. + * + * @param scopes the scopes value to set. + * @return the AutomationUpdateModel object itself. + */ + public AutomationUpdateModel withScopes(List scopes) { + if (this.innerProperties() == null) { + this.innerProperties = new AutomationProperties(); + } + this.innerProperties().withScopes(scopes); + return this; + } + + /** + * Get the sources property: A collection of the source event types which evaluate the security automation set of + * rules. + * + * @return the sources value. + */ + public List sources() { + return this.innerProperties() == null ? null : this.innerProperties().sources(); + } + + /** + * Set the sources property: A collection of the source event types which evaluate the security automation set of + * rules. + * + * @param sources the sources value to set. + * @return the AutomationUpdateModel object itself. + */ + public AutomationUpdateModel withSources(List sources) { + if (this.innerProperties() == null) { + this.innerProperties = new AutomationProperties(); + } + this.innerProperties().withSources(sources); + return this; + } + + /** + * Get the actions property: A collection of the actions which are triggered if all the configured rules + * evaluations, within at least one rule set, are true. + * + * @return the actions value. + */ + public List actions() { + return this.innerProperties() == null ? null : this.innerProperties().actions(); + } + + /** + * Set the actions property: A collection of the actions which are triggered if all the configured rules + * evaluations, within at least one rule set, are true. + * + * @param actions the actions value to set. + * @return the AutomationUpdateModel object itself. + */ + public AutomationUpdateModel withActions(List actions) { + if (this.innerProperties() == null) { + this.innerProperties = new AutomationProperties(); + } + this.innerProperties().withActions(actions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationValidationStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationValidationStatus.java index 61079decd3e6..5aa5b623c85c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationValidationStatus.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AutomationValidationStatus.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.security.fluent.models.AutomationValidationStatusInner; -/** An immutable client-side representation of AutomationValidationStatus. */ +/** + * An immutable client-side representation of AutomationValidationStatus. + */ public interface AutomationValidationStatus { /** * Gets the isValid property: Indicates whether the model is valid or not. - * + * * @return the isValid value. */ Boolean isValid(); /** * Gets the message property: The validation message. - * + * * @return the message value. */ String message(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.AutomationValidationStatusInner object. - * + * * @return the inner object. */ AutomationValidationStatusInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automations.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automations.java index 73b46db3ba19..6b9a1155a828 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automations.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Automations.java @@ -9,12 +9,14 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.AutomationInner; -/** Resource collection API of Automations. */ +/** + * Resource collection API of Automations. + */ public interface Automations { /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of security automations response as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface Automations { /** * Lists all the security automations in the specified subscription. Use the 'nextLink' property in the response to * get the next page of security automations for the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface Automations { /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -49,9 +51,9 @@ public interface Automations { /** * Lists all the security automations in the specified resource group. Use the 'nextLink' property in the response * to get the next page of security automations for the specified resource group. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -62,9 +64,9 @@ public interface Automations { /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,14 +74,14 @@ public interface Automations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the security automation resource along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String automationName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String automationName, + Context context); /** * Retrieves information about the model of a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -90,9 +92,9 @@ Response getByResourceGroupWithResponse( /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,9 +106,9 @@ Response getByResourceGroupWithResponse( /** * Deletes a security automation. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -117,9 +119,9 @@ Response getByResourceGroupWithResponse( /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @param context The context to associate with this operation. @@ -128,15 +130,15 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the security automation model state property bag along with {@link Response}. */ - Response validateWithResponse( - String resourceGroupName, String automationName, AutomationInner automation, Context context); + Response validateWithResponse(String resourceGroupName, String automationName, + AutomationInner automation, Context context); /** * Validates the security automation model before create or update. Any validation errors are returned to the * client. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param automationName The security automation name. * @param automation The security automation resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +150,7 @@ Response validateWithResponse( /** * Retrieves information about the model of a security automation. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -159,7 +161,7 @@ Response validateWithResponse( /** * Retrieves information about the model of a security automation. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -171,7 +173,7 @@ Response validateWithResponse( /** * Deletes a security automation. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -181,7 +183,7 @@ Response validateWithResponse( /** * Deletes a security automation. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -193,7 +195,7 @@ Response validateWithResponse( /** * Begins definition for a new Automation resource. - * + * * @param name resource name. * @return the first stage of the new Automation definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwAssumeRoleAuthenticationDetailsProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwAssumeRoleAuthenticationDetailsProperties.java index 636cbdb29fbb..970082f3ded1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwAssumeRoleAuthenticationDetailsProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwAssumeRoleAuthenticationDetailsProperties.java @@ -38,13 +38,15 @@ public final class AwAssumeRoleAuthenticationDetailsProperties extends Authentic @JsonProperty(value = "awsExternalId", required = true) private String awsExternalId; - /** Creates an instance of AwAssumeRoleAuthenticationDetailsProperties class. */ + /** + * Creates an instance of AwAssumeRoleAuthenticationDetailsProperties class. + */ public AwAssumeRoleAuthenticationDetailsProperties() { } /** * Get the accountId property: The ID of the cloud account. - * + * * @return the accountId value. */ public String accountId() { @@ -52,9 +54,9 @@ public String accountId() { } /** - * Get the awsAssumeRoleArn property: Assumed role ID is an identifier that you can use to create temporary security - * credentials. - * + * Get the awsAssumeRoleArn property: Assumed role ID is an identifier that you can use to create temporary + * security credentials. + * * @return the awsAssumeRoleArn value. */ public String awsAssumeRoleArn() { @@ -62,9 +64,9 @@ public String awsAssumeRoleArn() { } /** - * Set the awsAssumeRoleArn property: Assumed role ID is an identifier that you can use to create temporary security - * credentials. - * + * Set the awsAssumeRoleArn property: Assumed role ID is an identifier that you can use to create temporary + * security credentials. + * * @param awsAssumeRoleArn the awsAssumeRoleArn value to set. * @return the AwAssumeRoleAuthenticationDetailsProperties object itself. */ @@ -75,7 +77,7 @@ public AwAssumeRoleAuthenticationDetailsProperties withAwsAssumeRoleArn(String a /** * Get the awsExternalId property: A unique identifier that is required when you assume a role in another account. - * + * * @return the awsExternalId value. */ public String awsExternalId() { @@ -84,7 +86,7 @@ public String awsExternalId() { /** * Set the awsExternalId property: A unique identifier that is required when you assume a role in another account. - * + * * @param awsExternalId the awsExternalId value to set. * @return the AwAssumeRoleAuthenticationDetailsProperties object itself. */ @@ -95,25 +97,19 @@ public AwAssumeRoleAuthenticationDetailsProperties withAwsExternalId(String awsE /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (awsAssumeRoleArn() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property awsAssumeRoleArn in model" - + " AwAssumeRoleAuthenticationDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property awsAssumeRoleArn in model AwAssumeRoleAuthenticationDetailsProperties")); } if (awsExternalId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property awsExternalId in model" - + " AwAssumeRoleAuthenticationDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property awsExternalId in model AwAssumeRoleAuthenticationDetailsProperties")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsCredsAuthenticationDetailsProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsCredsAuthenticationDetailsProperties.java index 5cff776d8f7a..d6fed89161aa 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsCredsAuthenticationDetailsProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsCredsAuthenticationDetailsProperties.java @@ -37,13 +37,15 @@ public final class AwsCredsAuthenticationDetailsProperties extends Authenticatio @JsonProperty(value = "awsSecretAccessKey", required = true) private String awsSecretAccessKey; - /** Creates an instance of AwsCredsAuthenticationDetailsProperties class. */ + /** + * Creates an instance of AwsCredsAuthenticationDetailsProperties class. + */ public AwsCredsAuthenticationDetailsProperties() { } /** * Get the accountId property: The ID of the cloud account. - * + * * @return the accountId value. */ public String accountId() { @@ -52,7 +54,7 @@ public String accountId() { /** * Get the awsAccessKeyId property: Public key element of the AWS credential object (write only). - * + * * @return the awsAccessKeyId value. */ public String awsAccessKeyId() { @@ -61,7 +63,7 @@ public String awsAccessKeyId() { /** * Set the awsAccessKeyId property: Public key element of the AWS credential object (write only). - * + * * @param awsAccessKeyId the awsAccessKeyId value to set. * @return the AwsCredsAuthenticationDetailsProperties object itself. */ @@ -72,7 +74,7 @@ public AwsCredsAuthenticationDetailsProperties withAwsAccessKeyId(String awsAcce /** * Get the awsSecretAccessKey property: Secret key element of the AWS credential object (write only). - * + * * @return the awsSecretAccessKey value. */ public String awsSecretAccessKey() { @@ -81,7 +83,7 @@ public String awsSecretAccessKey() { /** * Set the awsSecretAccessKey property: Secret key element of the AWS credential object (write only). - * + * * @param awsSecretAccessKey the awsSecretAccessKey value to set. * @return the AwsCredsAuthenticationDetailsProperties object itself. */ @@ -92,24 +94,19 @@ public AwsCredsAuthenticationDetailsProperties withAwsSecretAccessKey(String aws /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (awsAccessKeyId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property awsAccessKeyId in model AwsCredsAuthenticationDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property awsAccessKeyId in model AwsCredsAuthenticationDetailsProperties")); } if (awsSecretAccessKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property awsSecretAccessKey in model" - + " AwsCredsAuthenticationDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property awsSecretAccessKey in model AwsCredsAuthenticationDetailsProperties")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java index bfcd9c358cfd..4ede05827e7f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** The AWS connector environment data. */ +/** + * The AWS connector environment data. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "environmentType") @JsonTypeName("AwsAccount") @Fluent @@ -33,13 +35,21 @@ public final class AwsEnvironmentData extends EnvironmentData { @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY) private String accountName; - /** Creates an instance of AwsEnvironmentData class. */ + /* + * Scan interval in hours (value should be between 1-hour to 24-hours) + */ + @JsonProperty(value = "scanInterval") + private Long scanInterval; + + /** + * Creates an instance of AwsEnvironmentData class. + */ public AwsEnvironmentData() { } /** * Get the organizationalData property: The AWS account's organizational data. - * + * * @return the organizationalData value. */ public AwsOrganizationalData organizationalData() { @@ -48,7 +58,7 @@ public AwsOrganizationalData organizationalData() { /** * Set the organizationalData property: The AWS account's organizational data. - * + * * @param organizationalData the organizationalData value to set. * @return the AwsEnvironmentData object itself. */ @@ -59,7 +69,7 @@ public AwsEnvironmentData withOrganizationalData(AwsOrganizationalData organizat /** * Get the regions property: list of regions to scan. - * + * * @return the regions value. */ public List regions() { @@ -68,7 +78,7 @@ public List regions() { /** * Set the regions property: list of regions to scan. - * + * * @param regions the regions value to set. * @return the AwsEnvironmentData object itself. */ @@ -79,16 +89,36 @@ public AwsEnvironmentData withRegions(List regions) { /** * Get the accountName property: The AWS account name. - * + * * @return the accountName value. */ public String accountName() { return this.accountName; } + /** + * Get the scanInterval property: Scan interval in hours (value should be between 1-hour to 24-hours). + * + * @return the scanInterval value. + */ + public Long scanInterval() { + return this.scanInterval; + } + + /** + * Set the scanInterval property: Scan interval in hours (value should be between 1-hour to 24-hours). + * + * @param scanInterval the scanInterval value to set. + * @return the AwsEnvironmentData object itself. + */ + public AwsEnvironmentData withScanInterval(Long scanInterval) { + this.scanInterval = scanInterval; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java index 01da3de98d1f..666b6aaaa67a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The AWS organization data. */ +/** + * The AWS organization data. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("AwsOrganizationalData") @JsonSubTypes({ @JsonSubTypes.Type(name = "Organization", value = AwsOrganizationalDataMaster.class), - @JsonSubTypes.Type(name = "Member", value = AwsOrganizationalDataMember.class) -}) + @JsonSubTypes.Type(name = "Member", value = AwsOrganizationalDataMember.class) }) @Immutable public class AwsOrganizationalData { - /** Creates an instance of AwsOrganizationalData class. */ + /** + * Creates an instance of AwsOrganizationalData class. + */ public AwsOrganizationalData() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java index b7b8ffb22a08..1b9e4b252ec0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** The AWS organization data for the master account. */ +/** + * The AWS organization data for the master account. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "organizationMembershipType") @JsonTypeName("Organization") @Fluent @@ -27,14 +29,16 @@ public final class AwsOrganizationalDataMaster extends AwsOrganizationalData { @JsonProperty(value = "excludedAccountIds") private List excludedAccountIds; - /** Creates an instance of AwsOrganizationalDataMaster class. */ + /** + * Creates an instance of AwsOrganizationalDataMaster class. + */ public AwsOrganizationalDataMaster() { } /** * Get the stacksetName property: If the multi cloud account is of membership type organization, this will be the * name of the onboarding stackset. - * + * * @return the stacksetName value. */ public String stacksetName() { @@ -44,7 +48,7 @@ public String stacksetName() { /** * Set the stacksetName property: If the multi cloud account is of membership type organization, this will be the * name of the onboarding stackset. - * + * * @param stacksetName the stacksetName value to set. * @return the AwsOrganizationalDataMaster object itself. */ @@ -56,7 +60,7 @@ public AwsOrganizationalDataMaster withStacksetName(String stacksetName) { /** * Get the excludedAccountIds property: If the multi cloud account is of membership type organization, list of * accounts excluded from offering. - * + * * @return the excludedAccountIds value. */ public List excludedAccountIds() { @@ -66,7 +70,7 @@ public List excludedAccountIds() { /** * Set the excludedAccountIds property: If the multi cloud account is of membership type organization, list of * accounts excluded from offering. - * + * * @param excludedAccountIds the excludedAccountIds value to set. * @return the AwsOrganizationalDataMaster object itself. */ @@ -77,7 +81,7 @@ public AwsOrganizationalDataMaster withExcludedAccountIds(List excludedA /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java index 6951419d2b76..6ebbc86b9740 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The AWS organization data for the member account. */ +/** + * The AWS organization data for the member account. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "organizationMembershipType") @JsonTypeName("Member") @Fluent @@ -20,14 +22,16 @@ public final class AwsOrganizationalDataMember extends AwsOrganizationalData { @JsonProperty(value = "parentHierarchyId") private String parentHierarchyId; - /** Creates an instance of AwsOrganizationalDataMember class. */ + /** + * Creates an instance of AwsOrganizationalDataMember class. + */ public AwsOrganizationalDataMember() { } /** * Get the parentHierarchyId property: If the multi cloud account is not of membership type organization, this will * be the ID of the account's parent. - * + * * @return the parentHierarchyId value. */ public String parentHierarchyId() { @@ -37,7 +41,7 @@ public String parentHierarchyId() { /** * Set the parentHierarchyId property: If the multi cloud account is not of membership type organization, this will * be the ID of the account's parent. - * + * * @param parentHierarchyId the parentHierarchyId value to set. * @return the AwsOrganizationalDataMember object itself. */ @@ -48,7 +52,7 @@ public AwsOrganizationalDataMember withParentHierarchyId(String parentHierarchyI /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrg.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrg.java new file mode 100644 index 000000000000..efd6f400d3ca --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrg.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner; + +/** + * An immutable client-side representation of AzureDevOpsOrg. + */ +public interface AzureDevOpsOrg { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: Azure DevOps Organization properties. + * + * @return the properties value. + */ + AzureDevOpsOrgProperties properties(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner object. + * + * @return the inner object. + */ + AzureDevOpsOrgInner innerModel(); + + /** + * The entirety of the AzureDevOpsOrg definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AzureDevOpsOrg definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AzureDevOpsOrg definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AzureDevOpsOrg definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, securityConnectorName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @return the next definition stage. + */ + WithCreate withExistingSecurityConnector(String resourceGroupName, String securityConnectorName); + } + + /** + * The stage of the AzureDevOpsOrg definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + AzureDevOpsOrg create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AzureDevOpsOrg create(Context context); + } + + /** + * The stage of the AzureDevOpsOrg definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure DevOps Organization properties.. + * + * @param properties Azure DevOps Organization properties. + * @return the next definition stage. + */ + WithCreate withProperties(AzureDevOpsOrgProperties properties); + } + } + + /** + * Begins update for the AzureDevOpsOrg resource. + * + * @return the stage of resource update. + */ + AzureDevOpsOrg.Update update(); + + /** + * The template for AzureDevOpsOrg update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AzureDevOpsOrg apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AzureDevOpsOrg apply(Context context); + } + + /** + * The AzureDevOpsOrg update stages. + */ + interface UpdateStages { + /** + * The stage of the AzureDevOpsOrg update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure DevOps Organization properties.. + * + * @param properties Azure DevOps Organization properties. + * @return the next definition stage. + */ + Update withProperties(AzureDevOpsOrgProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AzureDevOpsOrg refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AzureDevOpsOrg refresh(Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgListResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgListResponse.java new file mode 100644 index 000000000000..4c7dd6da52da --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgListResponse.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgListResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of AzureDevOpsOrgListResponse. + */ +public interface AzureDevOpsOrgListResponse { + /** + * Gets the value property: Gets or sets list of resources. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: Gets or sets next link to scroll over the results. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgListResponseInner object. + * + * @return the inner object. + */ + AzureDevOpsOrgListResponseInner innerModel(); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgProperties.java new file mode 100644 index 000000000000..6eb6fdc84e25 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgProperties.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Azure DevOps Organization properties. + */ +@Fluent +public final class AzureDevOpsOrgProperties { + /* + * Gets or sets resource status message. + */ + @JsonProperty(value = "provisioningStatusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningStatusMessage; + + /* + * Gets or sets time when resource was last checked. + */ + @JsonProperty(value = "provisioningStatusUpdateTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime provisioningStatusUpdateTimeUtc; + + /* + * The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + */ + @JsonProperty(value = "provisioningState") + private DevOpsProvisioningState provisioningState; + + /* + * Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + */ + @JsonProperty(value = "onboardingState") + private OnboardingState onboardingState; + + /* + * Configuration payload for PR Annotations. + */ + @JsonProperty(value = "actionableRemediation") + private ActionableRemediation actionableRemediation; + + /** + * Creates an instance of AzureDevOpsOrgProperties class. + */ + public AzureDevOpsOrgProperties() { + } + + /** + * Get the provisioningStatusMessage property: Gets or sets resource status message. + * + * @return the provisioningStatusMessage value. + */ + public String provisioningStatusMessage() { + return this.provisioningStatusMessage; + } + + /** + * Get the provisioningStatusUpdateTimeUtc property: Gets or sets time when resource was last checked. + * + * @return the provisioningStatusUpdateTimeUtc value. + */ + public OffsetDateTime provisioningStatusUpdateTimeUtc() { + return this.provisioningStatusUpdateTimeUtc; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @return the provisioningState value. + */ + public DevOpsProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @param provisioningState the provisioningState value to set. + * @return the AzureDevOpsOrgProperties object itself. + */ + public AzureDevOpsOrgProperties withProvisioningState(DevOpsProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the onboardingState property: Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + * + * @return the onboardingState value. + */ + public OnboardingState onboardingState() { + return this.onboardingState; + } + + /** + * Set the onboardingState property: Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + * + * @param onboardingState the onboardingState value to set. + * @return the AzureDevOpsOrgProperties object itself. + */ + public AzureDevOpsOrgProperties withOnboardingState(OnboardingState onboardingState) { + this.onboardingState = onboardingState; + return this; + } + + /** + * Get the actionableRemediation property: Configuration payload for PR Annotations. + * + * @return the actionableRemediation value. + */ + public ActionableRemediation actionableRemediation() { + return this.actionableRemediation; + } + + /** + * Set the actionableRemediation property: Configuration payload for PR Annotations. + * + * @param actionableRemediation the actionableRemediation value to set. + * @return the AzureDevOpsOrgProperties object itself. + */ + public AzureDevOpsOrgProperties withActionableRemediation(ActionableRemediation actionableRemediation) { + this.actionableRemediation = actionableRemediation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (actionableRemediation() != null) { + actionableRemediation().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgs.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgs.java new file mode 100644 index 000000000000..8da159b8e50e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsOrgs.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of AzureDevOpsOrgs. + */ +public interface AzureDevOpsOrgs { + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination along with {@link Response}. + */ + Response listAvailableWithResponse(String resourceGroupName, + String securityConnectorName, Context context); + + /** + * Returns a list of all Azure DevOps organizations accessible by the user token consumed by the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination. + */ + AzureDevOpsOrgListResponse listAvailable(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName); + + /** + * Returns a list of Azure DevOps organizations onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName, Context context); + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String securityConnectorName, String orgName, + Context context); + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource. + */ + AzureDevOpsOrg get(String resourceGroupName, String securityConnectorName, String orgName); + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response}. + */ + AzureDevOpsOrg getById(String id); + + /** + * Returns a monitored Azure DevOps organization resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Organization resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AzureDevOpsOrg resource. + * + * @param name resource name. + * @return the first stage of the new AzureDevOpsOrg definition. + */ + AzureDevOpsOrg.DefinitionStages.Blank define(String name); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProject.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProject.java new file mode 100644 index 000000000000..c8b69c7bd227 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProject.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsProjectInner; + +/** + * An immutable client-side representation of AzureDevOpsProject. + */ +public interface AzureDevOpsProject { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: Azure DevOps Project properties. + * + * @return the properties value. + */ + AzureDevOpsProjectProperties properties(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.AzureDevOpsProjectInner object. + * + * @return the inner object. + */ + AzureDevOpsProjectInner innerModel(); + + /** + * The entirety of the AzureDevOpsProject definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AzureDevOpsProject definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AzureDevOpsProject definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AzureDevOpsProject definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, securityConnectorName, orgName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @return the next definition stage. + */ + WithCreate withExistingAzureDevOpsOrg(String resourceGroupName, String securityConnectorName, + String orgName); + } + + /** + * The stage of the AzureDevOpsProject definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + AzureDevOpsProject create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AzureDevOpsProject create(Context context); + } + + /** + * The stage of the AzureDevOpsProject definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure DevOps Project properties.. + * + * @param properties Azure DevOps Project properties. + * @return the next definition stage. + */ + WithCreate withProperties(AzureDevOpsProjectProperties properties); + } + } + + /** + * Begins update for the AzureDevOpsProject resource. + * + * @return the stage of resource update. + */ + AzureDevOpsProject.Update update(); + + /** + * The template for AzureDevOpsProject update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AzureDevOpsProject apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AzureDevOpsProject apply(Context context); + } + + /** + * The AzureDevOpsProject update stages. + */ + interface UpdateStages { + /** + * The stage of the AzureDevOpsProject update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure DevOps Project properties.. + * + * @param properties Azure DevOps Project properties. + * @return the next definition stage. + */ + Update withProperties(AzureDevOpsProjectProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AzureDevOpsProject refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AzureDevOpsProject refresh(Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectListResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectListResponse.java new file mode 100644 index 000000000000..3918608a6f0c --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectListResponse.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsProjectInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of RP resources which supports pagination. + */ +@Fluent +public final class AzureDevOpsProjectListResponse { + /* + * Gets or sets list of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Gets or sets next link to scroll over the results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of AzureDevOpsProjectListResponse class. + */ + public AzureDevOpsProjectListResponse() { + } + + /** + * Get the value property: Gets or sets list of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets or sets list of resources. + * + * @param value the value value to set. + * @return the AzureDevOpsProjectListResponse object itself. + */ + public AzureDevOpsProjectListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Gets or sets next link to scroll over the results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Gets or sets next link to scroll over the results. + * + * @param nextLink the nextLink value to set. + * @return the AzureDevOpsProjectListResponse object itself. + */ + public AzureDevOpsProjectListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectProperties.java new file mode 100644 index 000000000000..0e9cb53d01c2 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjectProperties.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Azure DevOps Project properties. + */ +@Fluent +public final class AzureDevOpsProjectProperties { + /* + * Gets or sets resource status message. + */ + @JsonProperty(value = "provisioningStatusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningStatusMessage; + + /* + * Gets or sets time when resource was last checked. + */ + @JsonProperty(value = "provisioningStatusUpdateTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime provisioningStatusUpdateTimeUtc; + + /* + * The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + */ + @JsonProperty(value = "provisioningState") + private DevOpsProvisioningState provisioningState; + + /* + * Gets or sets parent Azure DevOps Organization name. + */ + @JsonProperty(value = "parentOrgName") + private String parentOrgName; + + /* + * Gets or sets Azure DevOps Project id. + */ + @JsonProperty(value = "projectId", access = JsonProperty.Access.WRITE_ONLY) + private String projectId; + + /* + * Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + */ + @JsonProperty(value = "onboardingState") + private OnboardingState onboardingState; + + /* + * Configuration payload for PR Annotations. + */ + @JsonProperty(value = "actionableRemediation") + private ActionableRemediation actionableRemediation; + + /** + * Creates an instance of AzureDevOpsProjectProperties class. + */ + public AzureDevOpsProjectProperties() { + } + + /** + * Get the provisioningStatusMessage property: Gets or sets resource status message. + * + * @return the provisioningStatusMessage value. + */ + public String provisioningStatusMessage() { + return this.provisioningStatusMessage; + } + + /** + * Get the provisioningStatusUpdateTimeUtc property: Gets or sets time when resource was last checked. + * + * @return the provisioningStatusUpdateTimeUtc value. + */ + public OffsetDateTime provisioningStatusUpdateTimeUtc() { + return this.provisioningStatusUpdateTimeUtc; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @return the provisioningState value. + */ + public DevOpsProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @param provisioningState the provisioningState value to set. + * @return the AzureDevOpsProjectProperties object itself. + */ + public AzureDevOpsProjectProperties withProvisioningState(DevOpsProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the parentOrgName property: Gets or sets parent Azure DevOps Organization name. + * + * @return the parentOrgName value. + */ + public String parentOrgName() { + return this.parentOrgName; + } + + /** + * Set the parentOrgName property: Gets or sets parent Azure DevOps Organization name. + * + * @param parentOrgName the parentOrgName value to set. + * @return the AzureDevOpsProjectProperties object itself. + */ + public AzureDevOpsProjectProperties withParentOrgName(String parentOrgName) { + this.parentOrgName = parentOrgName; + return this; + } + + /** + * Get the projectId property: Gets or sets Azure DevOps Project id. + * + * @return the projectId value. + */ + public String projectId() { + return this.projectId; + } + + /** + * Get the onboardingState property: Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + * + * @return the onboardingState value. + */ + public OnboardingState onboardingState() { + return this.onboardingState; + } + + /** + * Set the onboardingState property: Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + * + * @param onboardingState the onboardingState value to set. + * @return the AzureDevOpsProjectProperties object itself. + */ + public AzureDevOpsProjectProperties withOnboardingState(OnboardingState onboardingState) { + this.onboardingState = onboardingState; + return this; + } + + /** + * Get the actionableRemediation property: Configuration payload for PR Annotations. + * + * @return the actionableRemediation value. + */ + public ActionableRemediation actionableRemediation() { + return this.actionableRemediation; + } + + /** + * Set the actionableRemediation property: Configuration payload for PR Annotations. + * + * @param actionableRemediation the actionableRemediation value to set. + * @return the AzureDevOpsProjectProperties object itself. + */ + public AzureDevOpsProjectProperties withActionableRemediation(ActionableRemediation actionableRemediation) { + this.actionableRemediation = actionableRemediation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (actionableRemediation() != null) { + actionableRemediation().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjects.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjects.java new file mode 100644 index 000000000000..2b5f0629348a --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsProjects.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of AzureDevOpsProjects. + */ +public interface AzureDevOpsProjects { + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName, String orgName); + + /** + * Returns a list of Azure DevOps projects onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName, String orgName, + Context context); + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, Context context); + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource. + */ + AzureDevOpsProject get(String resourceGroupName, String securityConnectorName, String orgName, String projectName); + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response}. + */ + AzureDevOpsProject getById(String id); + + /** + * Returns a monitored Azure DevOps project resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Project resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AzureDevOpsProject resource. + * + * @param name resource name. + * @return the first stage of the new AzureDevOpsProject definition. + */ + AzureDevOpsProject.DefinitionStages.Blank define(String name); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepos.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepos.java new file mode 100644 index 000000000000..65f560c6266d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepos.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of AzureDevOpsRepos. + */ +public interface AzureDevOpsRepos { + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName, String orgName, + String projectName); + + /** + * Returns a list of Azure DevOps repositories onboarded to the connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, Context context); + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String orgName, String projectName, String repoName, Context context); + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @param repoName The repository name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource. + */ + AzureDevOpsRepository get(String resourceGroupName, String securityConnectorName, String orgName, + String projectName, String repoName); + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response}. + */ + AzureDevOpsRepository getById(String id); + + /** + * Returns a monitored Azure DevOps repository resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure DevOps Repository resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AzureDevOpsRepository resource. + * + * @param name resource name. + * @return the first stage of the new AzureDevOpsRepository definition. + */ + AzureDevOpsRepository.DefinitionStages.Blank define(String name); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepository.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepository.java new file mode 100644 index 000000000000..7c3114d7c272 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepository.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsRepositoryInner; + +/** + * An immutable client-side representation of AzureDevOpsRepository. + */ +public interface AzureDevOpsRepository { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: Azure DevOps Repository properties. + * + * @return the properties value. + */ + AzureDevOpsRepositoryProperties properties(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.AzureDevOpsRepositoryInner object. + * + * @return the inner object. + */ + AzureDevOpsRepositoryInner innerModel(); + + /** + * The entirety of the AzureDevOpsRepository definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AzureDevOpsRepository definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AzureDevOpsRepository definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AzureDevOpsRepository definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, securityConnectorName, orgName, projectName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param orgName The Azure DevOps organization name. + * @param projectName The project name. + * @return the next definition stage. + */ + WithCreate withExistingProject(String resourceGroupName, String securityConnectorName, String orgName, + String projectName); + } + + /** + * The stage of the AzureDevOpsRepository definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + AzureDevOpsRepository create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AzureDevOpsRepository create(Context context); + } + + /** + * The stage of the AzureDevOpsRepository definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure DevOps Repository properties.. + * + * @param properties Azure DevOps Repository properties. + * @return the next definition stage. + */ + WithCreate withProperties(AzureDevOpsRepositoryProperties properties); + } + } + + /** + * Begins update for the AzureDevOpsRepository resource. + * + * @return the stage of resource update. + */ + AzureDevOpsRepository.Update update(); + + /** + * The template for AzureDevOpsRepository update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AzureDevOpsRepository apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AzureDevOpsRepository apply(Context context); + } + + /** + * The AzureDevOpsRepository update stages. + */ + interface UpdateStages { + /** + * The stage of the AzureDevOpsRepository update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure DevOps Repository properties.. + * + * @param properties Azure DevOps Repository properties. + * @return the next definition stage. + */ + Update withProperties(AzureDevOpsRepositoryProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AzureDevOpsRepository refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AzureDevOpsRepository refresh(Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryListResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryListResponse.java new file mode 100644 index 000000000000..96282da28947 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryListResponse.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.security.fluent.models.AzureDevOpsRepositoryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of RP resources which supports pagination. + */ +@Fluent +public final class AzureDevOpsRepositoryListResponse { + /* + * Gets or sets list of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Gets or sets next link to scroll over the results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of AzureDevOpsRepositoryListResponse class. + */ + public AzureDevOpsRepositoryListResponse() { + } + + /** + * Get the value property: Gets or sets list of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets or sets list of resources. + * + * @param value the value value to set. + * @return the AzureDevOpsRepositoryListResponse object itself. + */ + public AzureDevOpsRepositoryListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Gets or sets next link to scroll over the results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Gets or sets next link to scroll over the results. + * + * @param nextLink the nextLink value to set. + * @return the AzureDevOpsRepositoryListResponse object itself. + */ + public AzureDevOpsRepositoryListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryProperties.java new file mode 100644 index 000000000000..cdb7166152df --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsRepositoryProperties.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Azure DevOps Repository properties. + */ +@Fluent +public final class AzureDevOpsRepositoryProperties { + /* + * Gets or sets resource status message. + */ + @JsonProperty(value = "provisioningStatusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningStatusMessage; + + /* + * Gets or sets time when resource was last checked. + */ + @JsonProperty(value = "provisioningStatusUpdateTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime provisioningStatusUpdateTimeUtc; + + /* + * The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + */ + @JsonProperty(value = "provisioningState") + private DevOpsProvisioningState provisioningState; + + /* + * Gets or sets parent Azure DevOps Organization name. + */ + @JsonProperty(value = "parentOrgName") + private String parentOrgName; + + /* + * Gets or sets parent Azure DevOps Project name. + */ + @JsonProperty(value = "parentProjectName") + private String parentProjectName; + + /* + * Gets or sets Azure DevOps Repository id. + */ + @JsonProperty(value = "repoId", access = JsonProperty.Access.WRITE_ONLY) + private String repoId; + + /* + * Gets or sets Azure DevOps Repository url. + */ + @JsonProperty(value = "repoUrl", access = JsonProperty.Access.WRITE_ONLY) + private String repoUrl; + + /* + * Gets or sets Azure DevOps repository visibility, whether it is public or private etc. + */ + @JsonProperty(value = "visibility", access = JsonProperty.Access.WRITE_ONLY) + private String visibility; + + /* + * Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + */ + @JsonProperty(value = "onboardingState") + private OnboardingState onboardingState; + + /* + * Configuration payload for PR Annotations. + */ + @JsonProperty(value = "actionableRemediation") + private ActionableRemediation actionableRemediation; + + /** + * Creates an instance of AzureDevOpsRepositoryProperties class. + */ + public AzureDevOpsRepositoryProperties() { + } + + /** + * Get the provisioningStatusMessage property: Gets or sets resource status message. + * + * @return the provisioningStatusMessage value. + */ + public String provisioningStatusMessage() { + return this.provisioningStatusMessage; + } + + /** + * Get the provisioningStatusUpdateTimeUtc property: Gets or sets time when resource was last checked. + * + * @return the provisioningStatusUpdateTimeUtc value. + */ + public OffsetDateTime provisioningStatusUpdateTimeUtc() { + return this.provisioningStatusUpdateTimeUtc; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @return the provisioningState value. + */ + public DevOpsProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @param provisioningState the provisioningState value to set. + * @return the AzureDevOpsRepositoryProperties object itself. + */ + public AzureDevOpsRepositoryProperties withProvisioningState(DevOpsProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the parentOrgName property: Gets or sets parent Azure DevOps Organization name. + * + * @return the parentOrgName value. + */ + public String parentOrgName() { + return this.parentOrgName; + } + + /** + * Set the parentOrgName property: Gets or sets parent Azure DevOps Organization name. + * + * @param parentOrgName the parentOrgName value to set. + * @return the AzureDevOpsRepositoryProperties object itself. + */ + public AzureDevOpsRepositoryProperties withParentOrgName(String parentOrgName) { + this.parentOrgName = parentOrgName; + return this; + } + + /** + * Get the parentProjectName property: Gets or sets parent Azure DevOps Project name. + * + * @return the parentProjectName value. + */ + public String parentProjectName() { + return this.parentProjectName; + } + + /** + * Set the parentProjectName property: Gets or sets parent Azure DevOps Project name. + * + * @param parentProjectName the parentProjectName value to set. + * @return the AzureDevOpsRepositoryProperties object itself. + */ + public AzureDevOpsRepositoryProperties withParentProjectName(String parentProjectName) { + this.parentProjectName = parentProjectName; + return this; + } + + /** + * Get the repoId property: Gets or sets Azure DevOps Repository id. + * + * @return the repoId value. + */ + public String repoId() { + return this.repoId; + } + + /** + * Get the repoUrl property: Gets or sets Azure DevOps Repository url. + * + * @return the repoUrl value. + */ + public String repoUrl() { + return this.repoUrl; + } + + /** + * Get the visibility property: Gets or sets Azure DevOps repository visibility, whether it is public or private + * etc. + * + * @return the visibility value. + */ + public String visibility() { + return this.visibility; + } + + /** + * Get the onboardingState property: Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + * + * @return the onboardingState value. + */ + public OnboardingState onboardingState() { + return this.onboardingState; + } + + /** + * Set the onboardingState property: Details about resource onboarding status across all connectors. + * + * OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only + * applicable to top-level resources. + * Onboarded - this resource has already been onboarded by the specified connector. + * NotOnboarded - this resource has not been onboarded to any connector. + * NotApplicable - the onboarding state is not applicable to the current endpoint. + * + * @param onboardingState the onboardingState value to set. + * @return the AzureDevOpsRepositoryProperties object itself. + */ + public AzureDevOpsRepositoryProperties withOnboardingState(OnboardingState onboardingState) { + this.onboardingState = onboardingState; + return this; + } + + /** + * Get the actionableRemediation property: Configuration payload for PR Annotations. + * + * @return the actionableRemediation value. + */ + public ActionableRemediation actionableRemediation() { + return this.actionableRemediation; + } + + /** + * Set the actionableRemediation property: Configuration payload for PR Annotations. + * + * @param actionableRemediation the actionableRemediation value to set. + * @return the AzureDevOpsRepositoryProperties object itself. + */ + public AzureDevOpsRepositoryProperties withActionableRemediation(ActionableRemediation actionableRemediation) { + this.actionableRemediation = actionableRemediation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (actionableRemediation() != null) { + actionableRemediation().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsScopeEnvironmentData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsScopeEnvironmentData.java index 1f9e0d85d846..2f07e93a253b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsScopeEnvironmentData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureDevOpsScopeEnvironmentData.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The AzureDevOps scope connector's environment data. */ +/** + * The AzureDevOps scope connector's environment data. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "environmentType") @JsonTypeName("AzureDevOpsScope") @Immutable public final class AzureDevOpsScopeEnvironmentData extends EnvironmentData { - /** Creates an instance of AzureDevOpsScopeEnvironmentData class. */ + /** + * Creates an instance of AzureDevOpsScopeEnvironmentData class. + */ public AzureDevOpsScopeEnvironmentData() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceDetails.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceDetails.java index 93ae42309e0e..dde973b91ebd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceDetails.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceDetails.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Details of the Azure resource that was assessed. */ +/** + * Details of the Azure resource that was assessed. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "source") @JsonTypeName("Azure") @Immutable @@ -20,13 +22,15 @@ public final class AzureResourceDetails extends ResourceDetails { @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; - /** Creates an instance of AzureResourceDetails class. */ + /** + * Creates an instance of AzureResourceDetails class. + */ public AzureResourceDetails() { } /** * Get the id property: Azure resource Id of the assessed resource. - * + * * @return the id value. */ public String id() { @@ -35,7 +39,7 @@ public String id() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceIdentifier.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceIdentifier.java index 71269931e070..52c4ac300968 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceIdentifier.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceIdentifier.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Azure resource identifier. */ +/** + * Azure resource identifier. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("AzureResource") @Immutable @@ -20,13 +22,15 @@ public final class AzureResourceIdentifier extends ResourceIdentifier { @JsonProperty(value = "azureResourceId", access = JsonProperty.Access.WRITE_ONLY) private String azureResourceId; - /** Creates an instance of AzureResourceIdentifier class. */ + /** + * Creates an instance of AzureResourceIdentifier class. + */ public AzureResourceIdentifier() { } /** * Get the azureResourceId property: ARM resource identifier for the cloud resource being alerted on. - * + * * @return the azureResourceId value. */ public String azureResourceId() { @@ -35,7 +39,7 @@ public String azureResourceId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceLink.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceLink.java index fb5c7218394a..6daa6a30dff4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceLink.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureResourceLink.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes an Azure resource with kind. */ +/** + * Describes an Azure resource with kind. + */ @Immutable public final class AzureResourceLink { /* @@ -16,13 +18,15 @@ public final class AzureResourceLink { @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; - /** Creates an instance of AzureResourceLink class. */ + /** + * Creates an instance of AzureResourceLink class. + */ public AzureResourceLink() { } /** * Get the id property: Azure resource Id. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureServersSetting.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureServersSetting.java new file mode 100644 index 000000000000..50d6ef79f6e2 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureServersSetting.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentsAzureSettingProperties; +import com.azure.resourcemanager.security.fluent.models.ServerVulnerabilityAssessmentsSettingInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A vulnerability assessments setting on Azure servers in the defined scope. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("AzureServersSetting") +@Fluent +public final class AzureServersSetting extends ServerVulnerabilityAssessmentsSettingInner { + /* + * The vulnerability assessments setting properties on Azure servers in the defined scope. + */ + @JsonProperty(value = "properties") + private ServerVulnerabilityAssessmentsAzureSettingProperties innerProperties; + + /** + * Creates an instance of AzureServersSetting class. + */ + public AzureServersSetting() { + } + + /** + * Get the innerProperties property: The vulnerability assessments setting properties on Azure servers in the + * defined scope. + * + * @return the innerProperties value. + */ + private ServerVulnerabilityAssessmentsAzureSettingProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the selectedProvider property: The selected vulnerability assessments provider on Azure servers in the + * defined scope. + * + * @return the selectedProvider value. + */ + public ServerVulnerabilityAssessmentsAzureSettingSelectedProvider selectedProvider() { + return this.innerProperties() == null ? null : this.innerProperties().selectedProvider(); + } + + /** + * Set the selectedProvider property: The selected vulnerability assessments provider on Azure servers in the + * defined scope. + * + * @param selectedProvider the selectedProvider value to set. + * @return the AzureServersSetting object itself. + */ + public AzureServersSetting + withSelectedProvider(ServerVulnerabilityAssessmentsAzureSettingSelectedProvider selectedProvider) { + if (this.innerProperties() == null) { + this.innerProperties = new ServerVulnerabilityAssessmentsAzureSettingProperties(); + } + this.innerProperties().withSelectedProvider(selectedProvider); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureTrackedResourceLocation.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureTrackedResourceLocation.java index c48378441c4c..bb5adbfb4f26 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureTrackedResourceLocation.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AzureTrackedResourceLocation.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes an Azure resource with location. */ +/** + * Describes an Azure resource with location. + */ @Fluent public class AzureTrackedResourceLocation { /* @@ -16,13 +18,15 @@ public class AzureTrackedResourceLocation { @JsonProperty(value = "location") private String location; - /** Creates an instance of AzureTrackedResourceLocation class. */ + /** + * Creates an instance of AzureTrackedResourceLocation class. + */ public AzureTrackedResourceLocation() { } /** * Get the location property: Location where the resource is stored. - * + * * @return the location value. */ public String location() { @@ -31,7 +35,7 @@ public String location() { /** * Set the location property: Location where the resource is stored. - * + * * @param location the location value to set. * @return the AzureTrackedResourceLocation object itself. */ @@ -42,7 +46,7 @@ public AzureTrackedResourceLocation withLocation(String location) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Baseline.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Baseline.java index 99852d05bed6..a057ceaf1e39 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Baseline.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Baseline.java @@ -9,7 +9,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Baseline details. */ +/** + * Baseline details. + */ @Fluent public final class Baseline { /* @@ -24,13 +26,15 @@ public final class Baseline { @JsonProperty(value = "updatedTime") private OffsetDateTime updatedTime; - /** Creates an instance of Baseline class. */ + /** + * Creates an instance of Baseline class. + */ public Baseline() { } /** * Get the expectedResults property: Expected results. - * + * * @return the expectedResults value. */ public List> expectedResults() { @@ -39,7 +43,7 @@ public List> expectedResults() { /** * Set the expectedResults property: Expected results. - * + * * @param expectedResults the expectedResults value to set. * @return the Baseline object itself. */ @@ -50,7 +54,7 @@ public Baseline withExpectedResults(List> expectedResults) { /** * Get the updatedTime property: Baseline update time (UTC). - * + * * @return the updatedTime value. */ public OffsetDateTime updatedTime() { @@ -59,7 +63,7 @@ public OffsetDateTime updatedTime() { /** * Set the updatedTime property: Baseline update time (UTC). - * + * * @param updatedTime the updatedTime value to set. * @return the Baseline object itself. */ @@ -70,7 +74,7 @@ public Baseline withUpdatedTime(OffsetDateTime updatedTime) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BaselineAdjustedResult.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BaselineAdjustedResult.java index dfd5b9663173..4bf91b01f9ef 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BaselineAdjustedResult.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BaselineAdjustedResult.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The rule result adjusted with baseline. */ +/** + * The rule result adjusted with baseline. + */ @Fluent public final class BaselineAdjustedResult { /* @@ -35,13 +37,15 @@ public final class BaselineAdjustedResult { @JsonProperty(value = "resultsOnlyInBaseline") private List> resultsOnlyInBaseline; - /** Creates an instance of BaselineAdjustedResult class. */ + /** + * Creates an instance of BaselineAdjustedResult class. + */ public BaselineAdjustedResult() { } /** * Get the baseline property: Baseline details. - * + * * @return the baseline value. */ public Baseline baseline() { @@ -50,7 +54,7 @@ public Baseline baseline() { /** * Set the baseline property: Baseline details. - * + * * @param baseline the baseline value to set. * @return the BaselineAdjustedResult object itself. */ @@ -61,7 +65,7 @@ public BaselineAdjustedResult withBaseline(Baseline baseline) { /** * Get the status property: The rule result status. - * + * * @return the status value. */ public RuleStatus status() { @@ -70,7 +74,7 @@ public RuleStatus status() { /** * Set the status property: The rule result status. - * + * * @param status the status value to set. * @return the BaselineAdjustedResult object itself. */ @@ -81,7 +85,7 @@ public BaselineAdjustedResult withStatus(RuleStatus status) { /** * Get the resultsNotInBaseline property: Results the are not in baseline. - * + * * @return the resultsNotInBaseline value. */ public List> resultsNotInBaseline() { @@ -90,7 +94,7 @@ public List> resultsNotInBaseline() { /** * Set the resultsNotInBaseline property: Results the are not in baseline. - * + * * @param resultsNotInBaseline the resultsNotInBaseline value to set. * @return the BaselineAdjustedResult object itself. */ @@ -101,7 +105,7 @@ public BaselineAdjustedResult withResultsNotInBaseline(List> result /** * Get the resultsOnlyInBaseline property: Results the are in baseline. - * + * * @return the resultsOnlyInBaseline value. */ public List> resultsOnlyInBaseline() { @@ -110,7 +114,7 @@ public List> resultsOnlyInBaseline() { /** * Set the resultsOnlyInBaseline property: Results the are in baseline. - * + * * @param resultsOnlyInBaseline the resultsOnlyInBaseline value to set. * @return the BaselineAdjustedResult object itself. */ @@ -121,7 +125,7 @@ public BaselineAdjustedResult withResultsOnlyInBaseline(List> resul /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BenchmarkReference.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BenchmarkReference.java index 06dc061d3069..86edae55926c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BenchmarkReference.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BenchmarkReference.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The benchmark references. */ +/** + * The benchmark references. + */ @Fluent public final class BenchmarkReference { /* @@ -22,13 +24,15 @@ public final class BenchmarkReference { @JsonProperty(value = "reference") private String reference; - /** Creates an instance of BenchmarkReference class. */ + /** + * Creates an instance of BenchmarkReference class. + */ public BenchmarkReference() { } /** * Get the benchmark property: The benchmark name. - * + * * @return the benchmark value. */ public String benchmark() { @@ -37,7 +41,7 @@ public String benchmark() { /** * Set the benchmark property: The benchmark name. - * + * * @param benchmark the benchmark value to set. * @return the BenchmarkReference object itself. */ @@ -48,7 +52,7 @@ public BenchmarkReference withBenchmark(String benchmark) { /** * Get the reference property: The benchmark reference. - * + * * @return the reference value. */ public String reference() { @@ -57,7 +61,7 @@ public String reference() { /** * Set the reference property: The benchmark reference. - * + * * @param reference the reference value to set. * @return the BenchmarkReference object itself. */ @@ -68,7 +72,7 @@ public BenchmarkReference withReference(String reference) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BuiltInInfoType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BuiltInInfoType.java new file mode 100644 index 000000000000..f579d5a558ef --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BuiltInInfoType.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** + * Pre-configured sensitive information type. + */ +@Fluent +public final class BuiltInInfoType { + /* + * Display name of the info type + */ + @JsonProperty(value = "name") + private String name; + + /* + * Id of the info type + */ + @JsonProperty(value = "id") + private UUID id; + + /* + * Category of the built-in info type + */ + @JsonProperty(value = "type") + private String type; + + /** + * Creates an instance of BuiltInInfoType class. + */ + public BuiltInInfoType() { + } + + /** + * Get the name property: Display name of the info type. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Display name of the info type. + * + * @param name the name value to set. + * @return the BuiltInInfoType object itself. + */ + public BuiltInInfoType withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: Id of the info type. + * + * @return the id value. + */ + public UUID id() { + return this.id; + } + + /** + * Set the id property: Id of the info type. + * + * @param id the id value to set. + * @return the BuiltInInfoType object itself. + */ + public BuiltInInfoType withId(UUID id) { + this.id = id; + return this; + } + + /** + * Get the type property: Category of the built-in info type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Category of the built-in info type. + * + * @param type the type value to set. + * @return the BuiltInInfoType object itself. + */ + public BuiltInInfoType withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BundleType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BundleType.java index e16b0198c97e..2c284f4c2bc2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BundleType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/BundleType.java @@ -8,38 +8,58 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Alert Simulator supported bundles. */ +/** + * Alert Simulator supported bundles. + */ public final class BundleType extends ExpandableStringEnum { - /** Static value AppServices for BundleType. */ + /** + * Static value AppServices for BundleType. + */ public static final BundleType APP_SERVICES = fromString("AppServices"); - /** Static value DNS for BundleType. */ + /** + * Static value DNS for BundleType. + */ public static final BundleType DNS = fromString("DNS"); - /** Static value KeyVaults for BundleType. */ + /** + * Static value KeyVaults for BundleType. + */ public static final BundleType KEY_VAULTS = fromString("KeyVaults"); - /** Static value KubernetesService for BundleType. */ + /** + * Static value KubernetesService for BundleType. + */ public static final BundleType KUBERNETES_SERVICE = fromString("KubernetesService"); - /** Static value ResourceManager for BundleType. */ + /** + * Static value ResourceManager for BundleType. + */ public static final BundleType RESOURCE_MANAGER = fromString("ResourceManager"); - /** Static value SqlServers for BundleType. */ + /** + * Static value SqlServers for BundleType. + */ public static final BundleType SQL_SERVERS = fromString("SqlServers"); - /** Static value StorageAccounts for BundleType. */ + /** + * Static value StorageAccounts for BundleType. + */ public static final BundleType STORAGE_ACCOUNTS = fromString("StorageAccounts"); - /** Static value VirtualMachines for BundleType. */ + /** + * Static value VirtualMachines for BundleType. + */ public static final BundleType VIRTUAL_MACHINES = fromString("VirtualMachines"); - /** Static value CosmosDbs for BundleType. */ + /** + * Static value CosmosDbs for BundleType. + */ public static final BundleType COSMOS_DBS = fromString("CosmosDbs"); /** * Creates a new instance of BundleType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -48,7 +68,7 @@ public BundleType() { /** * Creates or finds a BundleType from its string representation. - * + * * @param name a name to look for. * @return the corresponding BundleType. */ @@ -59,7 +79,7 @@ public static BundleType fromString(String name) { /** * Gets known BundleType values. - * + * * @return known BundleType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Categories.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Categories.java index deadc8605745..0f3ad301c78d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Categories.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Categories.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The categories of resource that is at risk when the assessment is unhealthy. */ +/** + * The categories of resource that is at risk when the assessment is unhealthy. + */ public final class Categories extends ExpandableStringEnum { - /** Static value Compute for Categories. */ + /** + * Static value Compute for Categories. + */ public static final Categories COMPUTE = fromString("Compute"); - /** Static value Networking for Categories. */ + /** + * Static value Networking for Categories. + */ public static final Categories NETWORKING = fromString("Networking"); - /** Static value Data for Categories. */ + /** + * Static value Data for Categories. + */ public static final Categories DATA = fromString("Data"); - /** Static value IdentityAndAccess for Categories. */ + /** + * Static value IdentityAndAccess for Categories. + */ public static final Categories IDENTITY_AND_ACCESS = fromString("IdentityAndAccess"); - /** Static value IoT for Categories. */ + /** + * Static value IoT for Categories. + */ public static final Categories IOT = fromString("IoT"); /** * Creates a new instance of Categories value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public Categories() { /** * Creates or finds a Categories from its string representation. - * + * * @param name a name to look for. * @return the corresponding Categories. */ @@ -47,7 +59,7 @@ public static Categories fromString(String name) { /** * Gets known Categories values. - * + * * @return known Categories values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CategoryConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CategoryConfiguration.java new file mode 100644 index 000000000000..337cfc02f7ae --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CategoryConfiguration.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Severity level per category configuration for PR Annotations. + */ +@Fluent +public final class CategoryConfiguration { + /* + * Gets or sets minimum severity level for a given category. + */ + @JsonProperty(value = "minimumSeverityLevel") + private String minimumSeverityLevel; + + /* + * Rule categories. + * Code - code scanning results. + * Artifact scanning results. + * Dependencies scanning results. + * IaC results. + * Secrets scanning results. + * Container scanning results. + */ + @JsonProperty(value = "category") + private RuleCategory category; + + /** + * Creates an instance of CategoryConfiguration class. + */ + public CategoryConfiguration() { + } + + /** + * Get the minimumSeverityLevel property: Gets or sets minimum severity level for a given category. + * + * @return the minimumSeverityLevel value. + */ + public String minimumSeverityLevel() { + return this.minimumSeverityLevel; + } + + /** + * Set the minimumSeverityLevel property: Gets or sets minimum severity level for a given category. + * + * @param minimumSeverityLevel the minimumSeverityLevel value to set. + * @return the CategoryConfiguration object itself. + */ + public CategoryConfiguration withMinimumSeverityLevel(String minimumSeverityLevel) { + this.minimumSeverityLevel = minimumSeverityLevel; + return this; + } + + /** + * Get the category property: Rule categories. + * Code - code scanning results. + * Artifact scanning results. + * Dependencies scanning results. + * IaC results. + * Secrets scanning results. + * Container scanning results. + * + * @return the category value. + */ + public RuleCategory category() { + return this.category; + } + + /** + * Set the category property: Rule categories. + * Code - code scanning results. + * Artifact scanning results. + * Dependencies scanning results. + * IaC results. + * Secrets scanning results. + * Container scanning results. + * + * @param category the category value to set. + * @return the CategoryConfiguration object itself. + */ + public CategoryConfiguration withCategory(RuleCategory category) { + this.category = category; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefExternalSecuritySolution.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefExternalSecuritySolution.java index 7fd9efb1e94b..4935e5233d23 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefExternalSecuritySolution.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefExternalSecuritySolution.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Represents a security solution which sends CEF logs to an OMS workspace. */ +/** + * Represents a security solution which sends CEF logs to an OMS workspace. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("CEF") @Fluent @@ -21,13 +23,15 @@ public final class CefExternalSecuritySolution extends ExternalSecuritySolutionI @JsonProperty(value = "properties") private CefSolutionProperties properties; - /** Creates an instance of CefExternalSecuritySolution class. */ + /** + * Creates an instance of CefExternalSecuritySolution class. + */ public CefExternalSecuritySolution() { } /** * Get the properties property: The external security solution properties for CEF solutions. - * + * * @return the properties value. */ public CefSolutionProperties properties() { @@ -36,7 +40,7 @@ public CefSolutionProperties properties() { /** * Set the properties property: The external security solution properties for CEF solutions. - * + * * @param properties the properties value to set. * @return the CefExternalSecuritySolution object itself. */ @@ -47,7 +51,7 @@ public CefExternalSecuritySolution withProperties(CefSolutionProperties properti /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefSolutionProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefSolutionProperties.java index aa7d3c3e7e1b..bfb05b218fdf 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefSolutionProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CefSolutionProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The external security solution properties for CEF solutions. */ +/** + * The external security solution properties for CEF solutions. + */ @Fluent public final class CefSolutionProperties extends ExternalSecuritySolutionProperties { /* @@ -28,13 +30,15 @@ public final class CefSolutionProperties extends ExternalSecuritySolutionPropert @JsonProperty(value = "lastEventReceived") private String lastEventReceived; - /** Creates an instance of CefSolutionProperties class. */ + /** + * Creates an instance of CefSolutionProperties class. + */ public CefSolutionProperties() { } /** * Get the hostname property: The hostname property. - * + * * @return the hostname value. */ public String hostname() { @@ -43,7 +47,7 @@ public String hostname() { /** * Set the hostname property: The hostname property. - * + * * @param hostname the hostname value to set. * @return the CefSolutionProperties object itself. */ @@ -54,7 +58,7 @@ public CefSolutionProperties withHostname(String hostname) { /** * Get the agent property: The agent property. - * + * * @return the agent value. */ public String agent() { @@ -63,7 +67,7 @@ public String agent() { /** * Set the agent property: The agent property. - * + * * @param agent the agent value to set. * @return the CefSolutionProperties object itself. */ @@ -74,7 +78,7 @@ public CefSolutionProperties withAgent(String agent) { /** * Get the lastEventReceived property: The lastEventReceived property. - * + * * @return the lastEventReceived value. */ public String lastEventReceived() { @@ -83,7 +87,7 @@ public String lastEventReceived() { /** * Set the lastEventReceived property: The lastEventReceived property. - * + * * @param lastEventReceived the lastEventReceived value to set. * @return the CefSolutionProperties object itself. */ @@ -92,21 +96,27 @@ public CefSolutionProperties withLastEventReceived(String lastEventReceived) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CefSolutionProperties withDeviceVendor(String deviceVendor) { super.withDeviceVendor(deviceVendor); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CefSolutionProperties withDeviceType(String deviceType) { super.withDeviceType(deviceType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CefSolutionProperties withWorkspace(ConnectedWorkspace workspace) { super.withWorkspace(workspace); @@ -115,7 +125,7 @@ public CefSolutionProperties withWorkspace(ConnectedWorkspace workspace) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java index 667eb58402de..7ea279843cc9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The multi cloud resource's cloud name. */ +/** + * The multi cloud resource's cloud name. + */ public final class CloudName extends ExpandableStringEnum { - /** Static value Azure for CloudName. */ + /** + * Static value Azure for CloudName. + */ public static final CloudName AZURE = fromString("Azure"); - /** Static value AWS for CloudName. */ + /** + * Static value AWS for CloudName. + */ public static final CloudName AWS = fromString("AWS"); - /** Static value GCP for CloudName. */ + /** + * Static value GCP for CloudName. + */ public static final CloudName GCP = fromString("GCP"); - /** Static value Github for CloudName. */ + /** + * Static value Github for CloudName. + */ public static final CloudName GITHUB = fromString("Github"); - /** Static value AzureDevOps for CloudName. */ + /** + * Static value AzureDevOps for CloudName. + */ public static final CloudName AZURE_DEV_OPS = fromString("AzureDevOps"); - /** Static value GitLab for CloudName. */ + /** + * Static value GitLab for CloudName. + */ public static final CloudName GIT_LAB = fromString("GitLab"); /** * Creates a new instance of CloudName value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public CloudName() { /** * Creates or finds a CloudName from its string representation. - * + * * @param name a name to look for. * @return the corresponding CloudName. */ @@ -50,7 +64,7 @@ public static CloudName fromString(String name) { /** * Gets known CloudName values. - * + * * @return known CloudName values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java index d1a7b48b8634..c72e9254799a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The security offering details. */ +/** + * The security offering details. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -34,8 +36,7 @@ @JsonSubTypes.Type(name = "DefenderForDevOpsGithub", value = DefenderForDevOpsGithubOffering.class), @JsonSubTypes.Type(name = "DefenderForDevOpsAzureDevOps", value = DefenderForDevOpsAzureDevOpsOffering.class), @JsonSubTypes.Type(name = "CspmMonitorGitLab", value = CspmMonitorGitLabOffering.class), - @JsonSubTypes.Type(name = "DefenderForDevOpsGitLab", value = DefenderForDevOpsGitLabOffering.class) -}) + @JsonSubTypes.Type(name = "DefenderForDevOpsGitLab", value = DefenderForDevOpsGitLabOffering.class) }) @Immutable public class CloudOffering { /* @@ -44,13 +45,15 @@ public class CloudOffering { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of CloudOffering class. */ + /** + * Creates an instance of CloudOffering class. + */ public CloudOffering() { } /** * Get the description property: The offering description. - * + * * @return the description value. */ public String description() { @@ -59,7 +62,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Code.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Code.java index 487d31012408..03946dd3e0c9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Code.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Code.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The operation status code. */ +/** + * The operation status code. + */ public final class Code extends ExpandableStringEnum { - /** Static value Succeeded for Code. */ + /** + * Static value Succeeded for Code. + */ public static final Code SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for Code. */ + /** + * Static value Failed for Code. + */ public static final Code FAILED = fromString("Failed"); /** * Creates a new instance of Code value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Code() { /** * Creates or finds a Code from its string representation. - * + * * @param name a name to look for. * @return the corresponding Code. */ @@ -38,7 +44,7 @@ public static Code fromString(String name) { /** * Gets known Code values. - * + * * @return known Code values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliance.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliance.java index 7d14f9285a72..01358544b4d4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliance.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliance.java @@ -8,32 +8,34 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of Compliance. */ +/** + * An immutable client-side representation of Compliance. + */ public interface Compliance { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the assessmentTimestampUtcDate property: The timestamp when the Compliance calculation was conducted. - * + * * @return the assessmentTimestampUtcDate value. */ OffsetDateTime assessmentTimestampUtcDate(); @@ -41,21 +43,21 @@ public interface Compliance { /** * Gets the resourceCount property: The resource count of the given subscription for which the Compliance * calculation was conducted (needed for Management Group Compliance calculation). - * + * * @return the resourceCount value. */ Integer resourceCount(); /** * Gets the assessmentResult property: An array of segment, which is the actually the compliance assessment. - * + * * @return the assessmentResult value. */ List assessmentResult(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.ComplianceInner object. - * + * * @return the inner object. */ ComplianceInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceList.java index c325572625cc..cdb5d3c4b33b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of Compliance objects response. */ +/** + * List of Compliance objects response. + */ @Fluent public final class ComplianceList { /* @@ -24,13 +26,15 @@ public final class ComplianceList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ComplianceList class. */ + /** + * Creates an instance of ComplianceList class. + */ public ComplianceList() { } /** * Get the value property: List of Compliance objects. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of Compliance objects. - * + * * @param value the value value to set. * @return the ComplianceList object itself. */ @@ -50,7 +54,7 @@ public ComplianceList withValue(List value) { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResult.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResult.java index a762e476d259..bfb4965af144 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResult.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResult.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.security.fluent.models.ComplianceResultInner; -/** An immutable client-side representation of ComplianceResult. */ +/** + * An immutable client-side representation of ComplianceResult. + */ public interface ComplianceResult { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the resourceStatus property: The status of the resource regarding a single assessment. - * + * * @return the resourceStatus value. */ ResourceStatus resourceStatus(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.ComplianceResultInner object. - * + * * @return the inner object. */ ComplianceResultInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResultList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResultList.java index 53df27fd8499..2e0a1a18bdec 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResultList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResultList.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of compliance results response. */ +/** + * List of compliance results response. + */ @Fluent public final class ComplianceResultList { /* @@ -25,13 +27,15 @@ public final class ComplianceResultList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ComplianceResultList class. */ + /** + * Creates an instance of ComplianceResultList class. + */ public ComplianceResultList() { } /** * Get the value property: List of compliance results. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of compliance results. - * + * * @param value the value value to set. * @return the ComplianceResultList object itself. */ @@ -51,7 +55,7 @@ public ComplianceResultList withValue(List value) { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ComplianceResultList")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ComplianceResultList")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResults.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResults.java index dfea3d053811..5b32e6ad8632 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResults.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceResults.java @@ -8,13 +8,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ComplianceResults. */ +/** + * Resource collection API of ComplianceResults. + */ public interface ComplianceResults { /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -24,9 +26,9 @@ public interface ComplianceResults { /** * Security compliance results in the subscription. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,7 +39,7 @@ public interface ComplianceResults { /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @param context The context to associate with this operation. @@ -50,7 +52,7 @@ public interface ComplianceResults { /** * Security Compliance Result. - * + * * @param resourceId The identifier of the resource. * @param complianceResultName name of the desired assessment compliance result. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceSegment.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceSegment.java index 92424ee5d4b5..8f4728c35f83 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceSegment.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ComplianceSegment.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** A segment of a compliance assessment. */ +/** + * A segment of a compliance assessment. + */ @Immutable public final class ComplianceSegment { /* @@ -22,13 +24,15 @@ public final class ComplianceSegment { @JsonProperty(value = "percentage", access = JsonProperty.Access.WRITE_ONLY) private Double percentage; - /** Creates an instance of ComplianceSegment class. */ + /** + * Creates an instance of ComplianceSegment class. + */ public ComplianceSegment() { } /** * Get the segmentType property: The segment type, e.g. compliant, non-compliance, insufficient coverage, N/A, etc. - * + * * @return the segmentType value. */ public String segmentType() { @@ -37,7 +41,7 @@ public String segmentType() { /** * Get the percentage property: The size (%) of the segment. - * + * * @return the percentage value. */ public Double percentage() { @@ -46,7 +50,7 @@ public Double percentage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliances.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliances.java index 3aed2c4ad78b..9bc6c3f347e1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliances.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Compliances.java @@ -8,13 +8,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Compliances. */ +/** + * Resource collection API of Compliances. + */ public interface Compliances { /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -24,9 +26,9 @@ public interface Compliances { /** * The Compliance scores of the specific management group. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +39,9 @@ public interface Compliances { /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -51,9 +53,9 @@ public interface Compliances { /** * Details of a specific Compliance. - * + * * @param scope Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or - * management group (/providers/Microsoft.Management/managementGroups/mgName). + * management group (/providers/Microsoft.Management/managementGroups/mgName). * @param complianceName name of the Compliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConfigurationStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConfigurationStatus.java index ca570c91256d..d5ef61efa78d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConfigurationStatus.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConfigurationStatus.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The configuration status of the machines group or machine or rule. */ +/** + * The configuration status of the machines group or machine or rule. + */ public final class ConfigurationStatus extends ExpandableStringEnum { - /** Static value Configured for ConfigurationStatus. */ + /** + * Static value Configured for ConfigurationStatus. + */ public static final ConfigurationStatus CONFIGURED = fromString("Configured"); - /** Static value NotConfigured for ConfigurationStatus. */ + /** + * Static value NotConfigured for ConfigurationStatus. + */ public static final ConfigurationStatus NOT_CONFIGURED = fromString("NotConfigured"); - /** Static value InProgress for ConfigurationStatus. */ + /** + * Static value InProgress for ConfigurationStatus. + */ public static final ConfigurationStatus IN_PROGRESS = fromString("InProgress"); - /** Static value Failed for ConfigurationStatus. */ + /** + * Static value Failed for ConfigurationStatus. + */ public static final ConfigurationStatus FAILED = fromString("Failed"); - /** Static value NoStatus for ConfigurationStatus. */ + /** + * Static value NoStatus for ConfigurationStatus. + */ public static final ConfigurationStatus NO_STATUS = fromString("NoStatus"); /** * Creates a new instance of ConfigurationStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public ConfigurationStatus() { /** * Creates or finds a ConfigurationStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ConfigurationStatus. */ @@ -47,7 +59,7 @@ public static ConfigurationStatus fromString(String name) { /** * Gets known ConfigurationStatus values. - * + * * @return known ConfigurationStatus values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectableResource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectableResource.java index 19acfd395a63..2c6fd74ee58e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectableResource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectableResource.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the allowed inbound and outbound traffic of an Azure resource. */ +/** + * Describes the allowed inbound and outbound traffic of an Azure resource. + */ @Immutable public final class ConnectableResource { /* @@ -29,13 +31,15 @@ public final class ConnectableResource { @JsonProperty(value = "outboundConnectedResources", access = JsonProperty.Access.WRITE_ONLY) private List outboundConnectedResources; - /** Creates an instance of ConnectableResource class. */ + /** + * Creates an instance of ConnectableResource class. + */ public ConnectableResource() { } /** * Get the id property: The Azure resource id. - * + * * @return the id value. */ public String id() { @@ -45,7 +49,7 @@ public String id() { /** * Get the inboundConnectedResources property: The list of Azure resources that the resource has inbound allowed * connection from. - * + * * @return the inboundConnectedResources value. */ public List inboundConnectedResources() { @@ -55,7 +59,7 @@ public List inboundConnectedResources() { /** * Get the outboundConnectedResources property: The list of Azure resources that the resource has outbound allowed * connection to. - * + * * @return the outboundConnectedResources value. */ public List outboundConnectedResources() { @@ -64,7 +68,7 @@ public List outboundConnectedResources() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedResource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedResource.java index 222924164abd..c2f50d81704c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedResource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedResource.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes properties of a connected resource. */ +/** + * Describes properties of a connected resource. + */ @Immutable public final class ConnectedResource { /* @@ -28,13 +30,15 @@ public final class ConnectedResource { @JsonProperty(value = "udpPorts", access = JsonProperty.Access.WRITE_ONLY) private String udpPorts; - /** Creates an instance of ConnectedResource class. */ + /** + * Creates an instance of ConnectedResource class. + */ public ConnectedResource() { } /** * Get the connectedResourceId property: The Azure resource id of the connected resource. - * + * * @return the connectedResourceId value. */ public String connectedResourceId() { @@ -43,7 +47,7 @@ public String connectedResourceId() { /** * Get the tcpPorts property: The allowed tcp ports. - * + * * @return the tcpPorts value. */ public String tcpPorts() { @@ -52,7 +56,7 @@ public String tcpPorts() { /** * Get the udpPorts property: The allowed udp ports. - * + * * @return the udpPorts value. */ public String udpPorts() { @@ -61,7 +65,7 @@ public String udpPorts() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedWorkspace.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedWorkspace.java index 34a0ad3b5ccf..22bb02e956c3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedWorkspace.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectedWorkspace.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents an OMS workspace to which the solution is connected. */ +/** + * Represents an OMS workspace to which the solution is connected. + */ @Fluent public final class ConnectedWorkspace { /* @@ -16,13 +18,15 @@ public final class ConnectedWorkspace { @JsonProperty(value = "id") private String id; - /** Creates an instance of ConnectedWorkspace class. */ + /** + * Creates an instance of ConnectedWorkspace class. + */ public ConnectedWorkspace() { } /** * Get the id property: Azure resource ID of the connected OMS workspace. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: Azure resource ID of the connected OMS workspace. - * + * * @param id the id value to set. * @return the ConnectedWorkspace object itself. */ @@ -42,7 +46,7 @@ public ConnectedWorkspace withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionFromIpNotAllowed.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionFromIpNotAllowed.java index 09db2166904f..70e8dee8aea3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionFromIpNotAllowed.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionFromIpNotAllowed.java @@ -9,23 +9,31 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Inbound connection from an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation. */ +/** + * Inbound connection from an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("ConnectionFromIpNotAllowed") @Fluent public final class ConnectionFromIpNotAllowed extends AllowlistCustomAlertRule { - /** Creates an instance of ConnectionFromIpNotAllowed class. */ + /** + * Creates an instance of ConnectionFromIpNotAllowed class. + */ public ConnectionFromIpNotAllowed() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ConnectionFromIpNotAllowed withAllowlistValues(List allowlistValues) { super.withAllowlistValues(allowlistValues); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ConnectionFromIpNotAllowed withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -34,7 +42,7 @@ public ConnectionFromIpNotAllowed withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionStrings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionStrings.java deleted file mode 100644 index c5da6b30ddaf..000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionStrings.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.ConnectionStringsInner; -import java.util.List; - -/** An immutable client-side representation of ConnectionStrings. */ -public interface ConnectionStrings { - /** - * Gets the value property: Connection strings. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.ConnectionStringsInner object. - * - * @return the inner object. - */ - ConnectionStringsInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionToIpNotAllowed.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionToIpNotAllowed.java index 59841c97d2d0..44efda923dae 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionToIpNotAllowed.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionToIpNotAllowed.java @@ -9,23 +9,31 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Outbound connection to an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation. */ +/** + * Outbound connection to an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("ConnectionToIpNotAllowed") @Fluent public final class ConnectionToIpNotAllowed extends AllowlistCustomAlertRule { - /** Creates an instance of ConnectionToIpNotAllowed class. */ + /** + * Creates an instance of ConnectionToIpNotAllowed class. + */ public ConnectionToIpNotAllowed() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ConnectionToIpNotAllowed withAllowlistValues(List allowlistValues) { super.withAllowlistValues(allowlistValues); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ConnectionToIpNotAllowed withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -34,7 +42,7 @@ public ConnectionToIpNotAllowed withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionType.java index f26f0c83f24b..5277fab3b303 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectionType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ConnectionType. */ +/** + * Defines values for ConnectionType. + */ public final class ConnectionType extends ExpandableStringEnum { - /** Static value Internal for ConnectionType. */ + /** + * Static value Internal for ConnectionType. + */ public static final ConnectionType INTERNAL = fromString("Internal"); - /** Static value External for ConnectionType. */ + /** + * Static value External for ConnectionType. + */ public static final ConnectionType EXTERNAL = fromString("External"); /** * Creates a new instance of ConnectionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ConnectionType() { /** * Creates or finds a ConnectionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ConnectionType. */ @@ -38,7 +44,7 @@ public static ConnectionType fromString(String name) { /** * Gets known ConnectionType values. - * + * * @return known ConnectionType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSetting.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSetting.java index 5a13750d1686..0542d4b9ef65 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSetting.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSetting.java @@ -7,25 +7,27 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.ConnectorSettingInner; -/** An immutable client-side representation of ConnectorSetting. */ +/** + * An immutable client-side representation of ConnectorSetting. + */ public interface ConnectorSetting { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); @@ -33,7 +35,7 @@ public interface ConnectorSetting { /** * Gets the hybridComputeSettings property: Settings for hybrid compute management. These settings are relevant only * for Arc autoProvision (Hybrid Compute). - * + * * @return the hybridComputeSettings value. */ HybridComputeSettingsProperties hybridComputeSettings(); @@ -41,26 +43,34 @@ public interface ConnectorSetting { /** * Gets the authenticationDetails property: Settings for authentication management, these settings are relevant only * for the cloud connector. - * + * * @return the authenticationDetails value. */ AuthenticationDetailsProperties authenticationDetails(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.ConnectorSettingInner object. - * + * * @return the inner object. */ ConnectorSettingInner innerModel(); - /** The entirety of the ConnectorSetting definition. */ + /** + * The entirety of the ConnectorSetting definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate { } - /** The ConnectorSetting definition stages. */ + + /** + * The ConnectorSetting definition stages. + */ interface DefinitionStages { - /** The first stage of the ConnectorSetting definition. */ + /** + * The first stage of the ConnectorSetting definition. + */ interface Blank extends WithCreate { } + /** * The stage of the ConnectorSetting definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -69,105 +79,123 @@ interface WithCreate extends DefinitionStages.WithHybridComputeSettings, DefinitionStages.WithAuthenticationDetails { /** * Executes the create request. - * + * * @return the created resource. */ ConnectorSetting create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ConnectorSetting create(Context context); } - /** The stage of the ConnectorSetting definition allowing to specify hybridComputeSettings. */ + + /** + * The stage of the ConnectorSetting definition allowing to specify hybridComputeSettings. + */ interface WithHybridComputeSettings { /** * Specifies the hybridComputeSettings property: Settings for hybrid compute management. These settings are * relevant only for Arc autoProvision (Hybrid Compute).. - * + * * @param hybridComputeSettings Settings for hybrid compute management. These settings are relevant only for - * Arc autoProvision (Hybrid Compute). + * Arc autoProvision (Hybrid Compute). * @return the next definition stage. */ WithCreate withHybridComputeSettings(HybridComputeSettingsProperties hybridComputeSettings); } - /** The stage of the ConnectorSetting definition allowing to specify authenticationDetails. */ + + /** + * The stage of the ConnectorSetting definition allowing to specify authenticationDetails. + */ interface WithAuthenticationDetails { /** * Specifies the authenticationDetails property: Settings for authentication management, these settings are * relevant only for the cloud connector.. - * + * * @param authenticationDetails Settings for authentication management, these settings are relevant only for - * the cloud connector. + * the cloud connector. * @return the next definition stage. */ WithCreate withAuthenticationDetails(AuthenticationDetailsProperties authenticationDetails); } } + /** * Begins update for the ConnectorSetting resource. - * + * * @return the stage of resource update. */ ConnectorSetting.Update update(); - /** The template for ConnectorSetting update. */ + /** + * The template for ConnectorSetting update. + */ interface Update extends UpdateStages.WithHybridComputeSettings, UpdateStages.WithAuthenticationDetails { /** * Executes the update request. - * + * * @return the updated resource. */ ConnectorSetting apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ConnectorSetting apply(Context context); } - /** The ConnectorSetting update stages. */ + + /** + * The ConnectorSetting update stages. + */ interface UpdateStages { - /** The stage of the ConnectorSetting update allowing to specify hybridComputeSettings. */ + /** + * The stage of the ConnectorSetting update allowing to specify hybridComputeSettings. + */ interface WithHybridComputeSettings { /** * Specifies the hybridComputeSettings property: Settings for hybrid compute management. These settings are * relevant only for Arc autoProvision (Hybrid Compute).. - * + * * @param hybridComputeSettings Settings for hybrid compute management. These settings are relevant only for - * Arc autoProvision (Hybrid Compute). + * Arc autoProvision (Hybrid Compute). * @return the next definition stage. */ Update withHybridComputeSettings(HybridComputeSettingsProperties hybridComputeSettings); } - /** The stage of the ConnectorSetting update allowing to specify authenticationDetails. */ + + /** + * The stage of the ConnectorSetting update allowing to specify authenticationDetails. + */ interface WithAuthenticationDetails { /** * Specifies the authenticationDetails property: Settings for authentication management, these settings are * relevant only for the cloud connector.. - * + * * @param authenticationDetails Settings for authentication management, these settings are relevant only for - * the cloud connector. + * the cloud connector. * @return the next definition stage. */ Update withAuthenticationDetails(AuthenticationDetailsProperties authenticationDetails); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ConnectorSetting refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSettingList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSettingList.java index f593b5739380..cb7207bf37d9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSettingList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ConnectorSettingList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** For a subscription, list of all cloud account connectors and their settings. */ +/** + * For a subscription, list of all cloud account connectors and their settings. + */ @Fluent public final class ConnectorSettingList { /* @@ -24,13 +26,15 @@ public final class ConnectorSettingList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ConnectorSettingList class. */ + /** + * Creates an instance of ConnectorSettingList class. + */ public ConnectorSettingList() { } /** * Get the value property: List of all the cloud account connector settings. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of all the cloud account connector settings. - * + * * @param value the value value to set. * @return the ConnectorSettingList object itself. */ @@ -50,7 +54,7 @@ public ConnectorSettingList withValue(List value) { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Connectors.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Connectors.java index 0fbe5c0e8ca4..1d72270a40bd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Connectors.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Connectors.java @@ -8,33 +8,35 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Connectors. */ +/** + * Resource collection API of Connectors. + */ public interface Connectors { /** * Cloud accounts connectors of a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(); /** * Cloud accounts connectors of a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return for a subscription, list of all cloud account connectors and their settings as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -46,7 +48,7 @@ public interface Connectors { /** * Details of a specific cloud account connector. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,7 +59,7 @@ public interface Connectors { /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,7 +71,7 @@ public interface Connectors { /** * Delete a cloud account connector from a subscription. - * + * * @param connectorName Name of the cloud account connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -79,7 +81,7 @@ public interface Connectors { /** * Details of a specific cloud account connector. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -90,7 +92,7 @@ public interface Connectors { /** * Details of a specific cloud account connector. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -102,7 +104,7 @@ public interface Connectors { /** * Delete a cloud account connector from a subscription. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,7 +114,7 @@ public interface Connectors { /** * Delete a cloud account connector from a subscription. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +126,7 @@ public interface Connectors { /** * Begins definition for a new ConnectorSetting resource. - * + * * @param name resource name. * @return the first stage of the new ConnectorSetting definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java index 490b6e85e689..bf2651b15095 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java @@ -13,7 +13,9 @@ import java.util.List; import java.util.Map; -/** Additional context fields for container registry Vulnerability assessment. */ +/** + * Additional context fields for container registry Vulnerability assessment. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "assessedResourceType") @JsonTypeName("ContainerRegistryVulnerability") @Immutable @@ -67,14 +69,16 @@ public final class ContainerRegistryVulnerabilityProperties extends AdditionalDa @JsonProperty(value = "imageDigest", access = JsonProperty.Access.WRITE_ONLY) private String imageDigest; - /** Creates an instance of ContainerRegistryVulnerabilityProperties class. */ + /** + * Creates an instance of ContainerRegistryVulnerabilityProperties class. + */ public ContainerRegistryVulnerabilityProperties() { } /** * Get the type property: Vulnerability Type. e.g: Vulnerability, Potential Vulnerability, Information Gathered, * Vulnerability. - * + * * @return the type value. */ public String type() { @@ -83,7 +87,7 @@ public String type() { /** * Get the cvss property: Dictionary from cvss version to cvss details object. - * + * * @return the cvss value. */ public Map cvss() { @@ -92,7 +96,7 @@ public Map cvss() { /** * Get the patchable property: Indicates whether a patch is available or not. - * + * * @return the patchable value. */ public Boolean patchable() { @@ -101,7 +105,7 @@ public Boolean patchable() { /** * Get the cve property: List of CVEs. - * + * * @return the cve value. */ public List cve() { @@ -110,7 +114,7 @@ public List cve() { /** * Get the publishedTime property: Published time. - * + * * @return the publishedTime value. */ public OffsetDateTime publishedTime() { @@ -119,7 +123,7 @@ public OffsetDateTime publishedTime() { /** * Get the vendorReferences property: The vendorReferences property. - * + * * @return the vendorReferences value. */ public List vendorReferences() { @@ -128,7 +132,7 @@ public List vendorReferences() { /** * Get the repositoryName property: Name of the repository which the vulnerable image belongs to. - * + * * @return the repositoryName value. */ public String repositoryName() { @@ -137,7 +141,7 @@ public String repositoryName() { /** * Get the imageDigest property: Digest of the vulnerable image. - * + * * @return the imageDigest value. */ public String imageDigest() { @@ -146,21 +150,18 @@ public String imageDigest() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (cvss() != null) { - cvss() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + cvss().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } if (cve() != null) { cve().forEach(e -> e.validate()); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ControlType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ControlType.java index b2502b132198..db3d2ac06d2a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ControlType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ControlType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of security control (for example, BuiltIn). */ +/** + * The type of security control (for example, BuiltIn). + */ public final class ControlType extends ExpandableStringEnum { - /** Static value BuiltIn for ControlType. */ + /** + * Static value BuiltIn for ControlType. + */ public static final ControlType BUILT_IN = fromString("BuiltIn"); - /** Static value Custom for ControlType. */ + /** + * Static value Custom for ControlType. + */ public static final ControlType CUSTOM = fromString("Custom"); /** * Creates a new instance of ControlType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ControlType() { /** * Creates or finds a ControlType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ControlType. */ @@ -38,7 +44,7 @@ public static ControlType fromString(String name) { /** * Gets known ControlType values. - * + * * @return known ControlType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOffering.java index 3ead5e6e1dca..bcb1d32469a1 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CSPM monitoring for AWS offering. */ +/** + * The CSPM monitoring for AWS offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("CspmMonitorAws") @Fluent @@ -20,13 +22,15 @@ public final class CspmMonitorAwsOffering extends CloudOffering { @JsonProperty(value = "nativeCloudConnection") private CspmMonitorAwsOfferingNativeCloudConnection nativeCloudConnection; - /** Creates an instance of CspmMonitorAwsOffering class. */ + /** + * Creates an instance of CspmMonitorAwsOffering class. + */ public CspmMonitorAwsOffering() { } /** * Get the nativeCloudConnection property: The native cloud connection configuration. - * + * * @return the nativeCloudConnection value. */ public CspmMonitorAwsOfferingNativeCloudConnection nativeCloudConnection() { @@ -35,19 +39,19 @@ public CspmMonitorAwsOfferingNativeCloudConnection nativeCloudConnection() { /** * Set the nativeCloudConnection property: The native cloud connection configuration. - * + * * @param nativeCloudConnection the nativeCloudConnection value to set. * @return the CspmMonitorAwsOffering object itself. */ - public CspmMonitorAwsOffering withNativeCloudConnection( - CspmMonitorAwsOfferingNativeCloudConnection nativeCloudConnection) { + public CspmMonitorAwsOffering + withNativeCloudConnection(CspmMonitorAwsOfferingNativeCloudConnection nativeCloudConnection) { this.nativeCloudConnection = nativeCloudConnection; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOfferingNativeCloudConnection.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOfferingNativeCloudConnection.java index 0c58266fdcb8..53368e794c00 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOfferingNativeCloudConnection.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAwsOfferingNativeCloudConnection.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The native cloud connection configuration. */ +/** + * The native cloud connection configuration. + */ @Fluent public final class CspmMonitorAwsOfferingNativeCloudConnection { /* @@ -16,13 +18,15 @@ public final class CspmMonitorAwsOfferingNativeCloudConnection { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of CspmMonitorAwsOfferingNativeCloudConnection class. */ + /** + * Creates an instance of CspmMonitorAwsOfferingNativeCloudConnection class. + */ public CspmMonitorAwsOfferingNativeCloudConnection() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the CspmMonitorAwsOfferingNativeCloudConnection object itself. */ @@ -42,7 +46,7 @@ public CspmMonitorAwsOfferingNativeCloudConnection withCloudRoleArn(String cloud /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAzureDevOpsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAzureDevOpsOffering.java index 37effcc24def..97dc15f77abe 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAzureDevOpsOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorAzureDevOpsOffering.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CSPM monitoring for AzureDevOps offering. */ +/** + * The CSPM monitoring for AzureDevOps offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("CspmMonitorAzureDevOps") @Immutable public final class CspmMonitorAzureDevOpsOffering extends CloudOffering { - /** Creates an instance of CspmMonitorAzureDevOpsOffering class. */ + /** + * Creates an instance of CspmMonitorAzureDevOpsOffering class. + */ public CspmMonitorAzureDevOpsOffering() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOffering.java index 48f5c5f63a00..eda75d55d126 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CSPM monitoring for GCP offering. */ +/** + * The CSPM monitoring for GCP offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("CspmMonitorGcp") @Fluent @@ -20,13 +22,15 @@ public final class CspmMonitorGcpOffering extends CloudOffering { @JsonProperty(value = "nativeCloudConnection") private CspmMonitorGcpOfferingNativeCloudConnection nativeCloudConnection; - /** Creates an instance of CspmMonitorGcpOffering class. */ + /** + * Creates an instance of CspmMonitorGcpOffering class. + */ public CspmMonitorGcpOffering() { } /** * Get the nativeCloudConnection property: The native cloud connection configuration. - * + * * @return the nativeCloudConnection value. */ public CspmMonitorGcpOfferingNativeCloudConnection nativeCloudConnection() { @@ -35,19 +39,19 @@ public CspmMonitorGcpOfferingNativeCloudConnection nativeCloudConnection() { /** * Set the nativeCloudConnection property: The native cloud connection configuration. - * + * * @param nativeCloudConnection the nativeCloudConnection value to set. * @return the CspmMonitorGcpOffering object itself. */ - public CspmMonitorGcpOffering withNativeCloudConnection( - CspmMonitorGcpOfferingNativeCloudConnection nativeCloudConnection) { + public CspmMonitorGcpOffering + withNativeCloudConnection(CspmMonitorGcpOfferingNativeCloudConnection nativeCloudConnection) { this.nativeCloudConnection = nativeCloudConnection; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOfferingNativeCloudConnection.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOfferingNativeCloudConnection.java index 3b653d78726c..7b461f588950 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOfferingNativeCloudConnection.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGcpOfferingNativeCloudConnection.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The native cloud connection configuration. */ +/** + * The native cloud connection configuration. + */ @Fluent public final class CspmMonitorGcpOfferingNativeCloudConnection { /* @@ -22,13 +24,15 @@ public final class CspmMonitorGcpOfferingNativeCloudConnection { @JsonProperty(value = "serviceAccountEmailAddress") private String serviceAccountEmailAddress; - /** Creates an instance of CspmMonitorGcpOfferingNativeCloudConnection class. */ + /** + * Creates an instance of CspmMonitorGcpOfferingNativeCloudConnection class. + */ public CspmMonitorGcpOfferingNativeCloudConnection() { } /** * Get the workloadIdentityProviderId property: The GCP workload identity provider id for the offering. - * + * * @return the workloadIdentityProviderId value. */ public String workloadIdentityProviderId() { @@ -37,19 +41,19 @@ public String workloadIdentityProviderId() { /** * Set the workloadIdentityProviderId property: The GCP workload identity provider id for the offering. - * + * * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. * @return the CspmMonitorGcpOfferingNativeCloudConnection object itself. */ - public CspmMonitorGcpOfferingNativeCloudConnection withWorkloadIdentityProviderId( - String workloadIdentityProviderId) { + public CspmMonitorGcpOfferingNativeCloudConnection + withWorkloadIdentityProviderId(String workloadIdentityProviderId) { this.workloadIdentityProviderId = workloadIdentityProviderId; return this; } /** * Get the serviceAccountEmailAddress property: The service account email address in GCP for this offering. - * + * * @return the serviceAccountEmailAddress value. */ public String serviceAccountEmailAddress() { @@ -58,19 +62,19 @@ public String serviceAccountEmailAddress() { /** * Set the serviceAccountEmailAddress property: The service account email address in GCP for this offering. - * + * * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. * @return the CspmMonitorGcpOfferingNativeCloudConnection object itself. */ - public CspmMonitorGcpOfferingNativeCloudConnection withServiceAccountEmailAddress( - String serviceAccountEmailAddress) { + public CspmMonitorGcpOfferingNativeCloudConnection + withServiceAccountEmailAddress(String serviceAccountEmailAddress) { this.serviceAccountEmailAddress = serviceAccountEmailAddress; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGitLabOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGitLabOffering.java index c4968ba49cf1..be0f785b499e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGitLabOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGitLabOffering.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CSPM (Cloud security posture management) monitoring for gitlab offering. */ +/** + * The CSPM (Cloud security posture management) monitoring for gitlab offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("CspmMonitorGitLab") @Immutable public final class CspmMonitorGitLabOffering extends CloudOffering { - /** Creates an instance of CspmMonitorGitLabOffering class. */ + /** + * Creates an instance of CspmMonitorGitLabOffering class. + */ public CspmMonitorGitLabOffering() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGithubOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGithubOffering.java index 1039d0c712fd..5612245c734e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGithubOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGithubOffering.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CSPM monitoring for github offering. */ +/** + * The CSPM monitoring for github offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("CspmMonitorGithub") @Immutable public final class CspmMonitorGithubOffering extends CloudOffering { - /** Creates an instance of CspmMonitorGithubOffering class. */ + /** + * Creates an instance of CspmMonitorGithubOffering class. + */ public CspmMonitorGithubOffering() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAlertRule.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAlertRule.java index 6b17e8b182ee..e65668c0394d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAlertRule.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAlertRule.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A custom alert rule. */ +/** + * A custom alert rule. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,8 +21,7 @@ @JsonTypeName("CustomAlertRule") @JsonSubTypes({ @JsonSubTypes.Type(name = "ThresholdCustomAlertRule", value = ThresholdCustomAlertRule.class), - @JsonSubTypes.Type(name = "ListCustomAlertRule", value = ListCustomAlertRule.class) -}) + @JsonSubTypes.Type(name = "ListCustomAlertRule", value = ListCustomAlertRule.class) }) @Fluent public class CustomAlertRule { /* @@ -41,13 +42,15 @@ public class CustomAlertRule { @JsonProperty(value = "isEnabled", required = true) private boolean isEnabled; - /** Creates an instance of CustomAlertRule class. */ + /** + * Creates an instance of CustomAlertRule class. + */ public CustomAlertRule() { } /** * Get the displayName property: The display name of the custom alert. - * + * * @return the displayName value. */ public String displayName() { @@ -56,7 +59,7 @@ public String displayName() { /** * Get the description property: The description of the custom alert. - * + * * @return the description value. */ public String description() { @@ -65,7 +68,7 @@ public String description() { /** * Get the isEnabled property: Status of the custom alert. - * + * * @return the isEnabled value. */ public boolean isEnabled() { @@ -74,7 +77,7 @@ public boolean isEnabled() { /** * Set the isEnabled property: Status of the custom alert. - * + * * @param isEnabled the isEnabled value to set. * @return the CustomAlertRule object itself. */ @@ -85,7 +88,7 @@ public CustomAlertRule withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomation.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomation.java index 59ff105ba2b4..31e7cbdf895b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomation.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomation.java @@ -8,32 +8,34 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.CustomAssessmentAutomationInner; -/** An immutable client-side representation of CustomAssessmentAutomation. */ +/** + * An immutable client-side representation of CustomAssessmentAutomation. + */ public interface CustomAssessmentAutomation { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); @@ -41,28 +43,28 @@ public interface CustomAssessmentAutomation { /** * Gets the compressedQuery property: GZip encoded KQL query representing the assessment automation results * required. - * + * * @return the compressedQuery value. */ String compressedQuery(); /** * Gets the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @return the supportedCloud value. */ SupportedCloudEnum supportedCloud(); /** * Gets the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @return the severity value. */ SeverityEnum severity(); /** * Gets the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @return the displayName value. */ String displayName(); @@ -70,7 +72,7 @@ public interface CustomAssessmentAutomation { /** * Gets the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @return the description value. */ String description(); @@ -78,7 +80,7 @@ public interface CustomAssessmentAutomation { /** * Gets the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @return the remediationDescription value. */ String remediationDescription(); @@ -86,141 +88,167 @@ public interface CustomAssessmentAutomation { /** * Gets the assessmentKey property: The assessment metadata key used when an assessment is generated for this * assessment automation. - * + * * @return the assessmentKey value. */ String assessmentKey(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.CustomAssessmentAutomationInner object. - * + * * @return the inner object. */ CustomAssessmentAutomationInner innerModel(); - /** The entirety of the CustomAssessmentAutomation definition. */ + /** + * The entirety of the CustomAssessmentAutomation definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The CustomAssessmentAutomation definition stages. */ + + /** + * The CustomAssessmentAutomation definition stages. + */ interface DefinitionStages { - /** The first stage of the CustomAssessmentAutomation definition. */ + /** + * The first stage of the CustomAssessmentAutomation definition. + */ interface Blank extends WithResourceGroup { } - /** The stage of the CustomAssessmentAutomation definition allowing to specify parent resource. */ + + /** + * The stage of the CustomAssessmentAutomation definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the CustomAssessmentAutomation definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithCompressedQuery, - DefinitionStages.WithSupportedCloud, - DefinitionStages.WithSeverity, - DefinitionStages.WithDisplayName, - DefinitionStages.WithDescription, - DefinitionStages.WithRemediationDescription { + interface WithCreate extends DefinitionStages.WithCompressedQuery, DefinitionStages.WithSupportedCloud, + DefinitionStages.WithSeverity, DefinitionStages.WithDisplayName, DefinitionStages.WithDescription, + DefinitionStages.WithRemediationDescription { /** * Executes the create request. - * + * * @return the created resource. */ CustomAssessmentAutomation create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CustomAssessmentAutomation create(Context context); } - /** The stage of the CustomAssessmentAutomation definition allowing to specify compressedQuery. */ + + /** + * The stage of the CustomAssessmentAutomation definition allowing to specify compressedQuery. + */ interface WithCompressedQuery { /** * Specifies the compressedQuery property: Base 64 encoded KQL query representing the assessment automation * results required.. - * + * * @param compressedQuery Base 64 encoded KQL query representing the assessment automation results required. * @return the next definition stage. */ WithCreate withCompressedQuery(String compressedQuery); } - /** The stage of the CustomAssessmentAutomation definition allowing to specify supportedCloud. */ + + /** + * The stage of the CustomAssessmentAutomation definition allowing to specify supportedCloud. + */ interface WithSupportedCloud { /** * Specifies the supportedCloud property: Relevant cloud for the custom assessment automation.. - * + * * @param supportedCloud Relevant cloud for the custom assessment automation. * @return the next definition stage. */ WithCreate withSupportedCloud(SupportedCloudEnum supportedCloud); } - /** The stage of the CustomAssessmentAutomation definition allowing to specify severity. */ + + /** + * The stage of the CustomAssessmentAutomation definition allowing to specify severity. + */ interface WithSeverity { /** * Specifies the severity property: The severity to relate to the assessments generated by this assessment * automation.. - * + * * @param severity The severity to relate to the assessments generated by this assessment automation. * @return the next definition stage. */ WithCreate withSeverity(SeverityEnum severity); } - /** The stage of the CustomAssessmentAutomation definition allowing to specify displayName. */ + + /** + * The stage of the CustomAssessmentAutomation definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: The display name of the assessments generated by this assessment * automation.. - * + * * @param displayName The display name of the assessments generated by this assessment automation. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the CustomAssessmentAutomation definition allowing to specify description. */ + + /** + * The stage of the CustomAssessmentAutomation definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: The description to relate to the assessments generated by this * assessment automation.. - * + * * @param description The description to relate to the assessments generated by this assessment automation. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the CustomAssessmentAutomation definition allowing to specify remediationDescription. */ + + /** + * The stage of the CustomAssessmentAutomation definition allowing to specify remediationDescription. + */ interface WithRemediationDescription { /** * Specifies the remediationDescription property: The remediation description to relate to the assessments * generated by this assessment automation.. - * + * * @param remediationDescription The remediation description to relate to the assessments generated by this - * assessment automation. + * assessment automation. * @return the next definition stage. */ WithCreate withRemediationDescription(String remediationDescription); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CustomAssessmentAutomation refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationRequest.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationRequest.java index 0c48f14f9c28..a8eac3b82095 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationRequest.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationRequest.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.security.fluent.models.CustomAssessmentAutomationRequestProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Custom Assessment Automation request. */ +/** + * Custom Assessment Automation request. + */ @Fluent public final class CustomAssessmentAutomationRequest extends ProxyResource { /* @@ -18,13 +20,15 @@ public final class CustomAssessmentAutomationRequest extends ProxyResource { @JsonProperty(value = "properties") private CustomAssessmentAutomationRequestProperties innerProperties; - /** Creates an instance of CustomAssessmentAutomationRequest class. */ + /** + * Creates an instance of CustomAssessmentAutomationRequest class. + */ public CustomAssessmentAutomationRequest() { } /** * Get the innerProperties property: describes Custom Assessment Automation request properties. - * + * * @return the innerProperties value. */ private CustomAssessmentAutomationRequestProperties innerProperties() { @@ -34,7 +38,7 @@ private CustomAssessmentAutomationRequestProperties innerProperties() { /** * Get the compressedQuery property: Base 64 encoded KQL query representing the assessment automation results * required. - * + * * @return the compressedQuery value. */ public String compressedQuery() { @@ -44,7 +48,7 @@ public String compressedQuery() { /** * Set the compressedQuery property: Base 64 encoded KQL query representing the assessment automation results * required. - * + * * @param compressedQuery the compressedQuery value to set. * @return the CustomAssessmentAutomationRequest object itself. */ @@ -58,7 +62,7 @@ public CustomAssessmentAutomationRequest withCompressedQuery(String compressedQu /** * Get the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @return the supportedCloud value. */ public SupportedCloudEnum supportedCloud() { @@ -67,7 +71,7 @@ public SupportedCloudEnum supportedCloud() { /** * Set the supportedCloud property: Relevant cloud for the custom assessment automation. - * + * * @param supportedCloud the supportedCloud value to set. * @return the CustomAssessmentAutomationRequest object itself. */ @@ -81,7 +85,7 @@ public CustomAssessmentAutomationRequest withSupportedCloud(SupportedCloudEnum s /** * Get the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @return the severity value. */ public SeverityEnum severity() { @@ -90,7 +94,7 @@ public SeverityEnum severity() { /** * Set the severity property: The severity to relate to the assessments generated by this assessment automation. - * + * * @param severity the severity value to set. * @return the CustomAssessmentAutomationRequest object itself. */ @@ -104,7 +108,7 @@ public CustomAssessmentAutomationRequest withSeverity(SeverityEnum severity) { /** * Get the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @return the displayName value. */ public String displayName() { @@ -113,7 +117,7 @@ public String displayName() { /** * Set the displayName property: The display name of the assessments generated by this assessment automation. - * + * * @param displayName the displayName value to set. * @return the CustomAssessmentAutomationRequest object itself. */ @@ -128,7 +132,7 @@ public CustomAssessmentAutomationRequest withDisplayName(String displayName) { /** * Get the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @return the description value. */ public String description() { @@ -138,7 +142,7 @@ public String description() { /** * Set the description property: The description to relate to the assessments generated by this assessment * automation. - * + * * @param description the description value to set. * @return the CustomAssessmentAutomationRequest object itself. */ @@ -153,7 +157,7 @@ public CustomAssessmentAutomationRequest withDescription(String description) { /** * Get the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @return the remediationDescription value. */ public String remediationDescription() { @@ -163,7 +167,7 @@ public String remediationDescription() { /** * Set the remediationDescription property: The remediation description to relate to the assessments generated by * this assessment automation. - * + * * @param remediationDescription the remediationDescription value to set. * @return the CustomAssessmentAutomationRequest object itself. */ @@ -177,7 +181,7 @@ public CustomAssessmentAutomationRequest withRemediationDescription(String remed /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomations.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomations.java index 5a3c288c946f..664d26aeac33 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomations.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomations.java @@ -8,33 +8,35 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of CustomAssessmentAutomations. */ +/** + * Resource collection API of CustomAssessmentAutomations. + */ public interface CustomAssessmentAutomations { /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group along with - * {@link Response}. + * {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String customAssessmentAutomationName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String customAssessmentAutomationName, Context context); /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,11 +47,11 @@ Response getByResourceGroupWithResponse( /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,16 +59,16 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse( - String resourceGroupName, String customAssessmentAutomationName, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String customAssessmentAutomationName, + Context context); /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customAssessmentAutomationName Name of the Custom Assessment Automation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -76,11 +78,11 @@ Response deleteByResourceGroupWithResponse( /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -90,11 +92,11 @@ Response deleteByResourceGroupWithResponse( /** * List custom assessment automations in a subscription and a resource group - * - *

List custom assessment automations by provided subscription and resource group. - * + * + * List custom assessment automations by provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -105,9 +107,9 @@ Response deleteByResourceGroupWithResponse( /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Custom Assessment Automations as paginated response with {@link PagedIterable}. @@ -116,9 +118,9 @@ Response deleteByResourceGroupWithResponse( /** * List custom assessment automations in a subscription - * - *

List custom assessment automations by provided subscription. - * + * + * List custom assessment automations by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -129,38 +131,38 @@ Response deleteByResourceGroupWithResponse( /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group along with - * {@link Response}. + * {@link Response}. */ CustomAssessmentAutomation getById(String id); /** * Gets a custom assessment automation - * - *

Gets a single custom assessment automation by name for the provided subscription and resource group. - * + * + * Gets a single custom assessment automation by name for the provided subscription and resource group. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom assessment automation by name for the provided subscription and resource group along with - * {@link Response}. + * {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -170,9 +172,9 @@ Response deleteByResourceGroupWithResponse( /** * Deletes a custom assessment automation - * - *

Deletes a custom assessment automation by name for a provided subscription. - * + * + * Deletes a custom assessment automation by name for a provided subscription. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +186,7 @@ Response deleteByResourceGroupWithResponse( /** * Begins definition for a new CustomAssessmentAutomation resource. - * + * * @param name resource name. * @return the first stage of the new CustomAssessmentAutomation definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationsListResult.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationsListResult.java index 12e9233976c1..f2817eb84c43 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationsListResult.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomAssessmentAutomationsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of Custom Assessment Automations. */ +/** + * A list of Custom Assessment Automations. + */ @Fluent public final class CustomAssessmentAutomationsListResult { /* @@ -24,13 +26,15 @@ public final class CustomAssessmentAutomationsListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CustomAssessmentAutomationsListResult class. */ + /** + * Creates an instance of CustomAssessmentAutomationsListResult class. + */ public CustomAssessmentAutomationsListResult() { } /** * Get the value property: Collection of Custom Assessment Automations. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The link used to get the next page of operations. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Set the nextLink property: The link used to get the next page of operations. - * + * * @param nextLink the nextLink value to set. * @return the CustomAssessmentAutomationsListResult object itself. */ @@ -59,7 +63,7 @@ public CustomAssessmentAutomationsListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignment.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignment.java index fcdf9e4547fe..0ddee9631222 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignment.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignment.java @@ -8,32 +8,34 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.CustomEntityStoreAssignmentInner; -/** An immutable client-side representation of CustomEntityStoreAssignment. */ +/** + * An immutable client-side representation of CustomEntityStoreAssignment. + */ public interface CustomEntityStoreAssignment { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); @@ -41,45 +43,56 @@ public interface CustomEntityStoreAssignment { /** * Gets the principal property: The principal assigned with entity store. Format of principal is: [AAD * type]=[PrincipalObjectId];[TenantId]. - * + * * @return the principal value. */ String principal(); /** * Gets the entityStoreDatabaseLink property: The link to entity store database. - * + * * @return the entityStoreDatabaseLink value. */ String entityStoreDatabaseLink(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.CustomEntityStoreAssignmentInner object. - * + * * @return the inner object. */ CustomEntityStoreAssignmentInner innerModel(); - /** The entirety of the CustomEntityStoreAssignment definition. */ + /** + * The entirety of the CustomEntityStoreAssignment definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The CustomEntityStoreAssignment definition stages. */ + + /** + * The CustomEntityStoreAssignment definition stages. + */ interface DefinitionStages { - /** The first stage of the CustomEntityStoreAssignment definition. */ + /** + * The first stage of the CustomEntityStoreAssignment definition. + */ interface Blank extends WithResourceGroup { } - /** The stage of the CustomEntityStoreAssignment definition allowing to specify parent resource. */ + + /** + * The stage of the CustomEntityStoreAssignment definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the CustomEntityStoreAssignment definition which contains all the minimum required properties * for the resource to be created, but also allows for any other optional properties to be specified. @@ -87,42 +100,46 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithPrincipal { /** * Executes the create request. - * + * * @return the created resource. */ CustomEntityStoreAssignment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CustomEntityStoreAssignment create(Context context); } - /** The stage of the CustomEntityStoreAssignment definition allowing to specify principal. */ + + /** + * The stage of the CustomEntityStoreAssignment definition allowing to specify principal. + */ interface WithPrincipal { /** * Specifies the principal property: The principal assigned with entity store. If not provided, will use * caller principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - * + * * @param principal The principal assigned with entity store. If not provided, will use caller principal. - * Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. + * Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. * @return the next definition stage. */ WithCreate withPrincipal(String principal); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CustomEntityStoreAssignment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentRequest.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentRequest.java index 915238a0ec4a..29b7242af989 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentRequest.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentRequest.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.security.fluent.models.CustomEntityStoreAssignmentRequestProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** describes the custom entity store assignment request. */ +/** + * describes the custom entity store assignment request. + */ @Fluent public final class CustomEntityStoreAssignmentRequest { /* @@ -17,13 +19,15 @@ public final class CustomEntityStoreAssignmentRequest { @JsonProperty(value = "properties") private CustomEntityStoreAssignmentRequestProperties innerProperties; - /** Creates an instance of CustomEntityStoreAssignmentRequest class. */ + /** + * Creates an instance of CustomEntityStoreAssignmentRequest class. + */ public CustomEntityStoreAssignmentRequest() { } /** * Get the innerProperties property: describes properties of custom entity store assignment request. - * + * * @return the innerProperties value. */ private CustomEntityStoreAssignmentRequestProperties innerProperties() { @@ -31,9 +35,9 @@ private CustomEntityStoreAssignmentRequestProperties innerProperties() { } /** - * Get the principal property: The principal assigned with entity store. If not provided, will use caller principal. - * Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - * + * Get the principal property: The principal assigned with entity store. If not provided, will use caller + * principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. + * * @return the principal value. */ public String principal() { @@ -41,9 +45,9 @@ public String principal() { } /** - * Set the principal property: The principal assigned with entity store. If not provided, will use caller principal. - * Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - * + * Set the principal property: The principal assigned with entity store. If not provided, will use caller + * principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. + * * @param principal the principal value to set. * @return the CustomEntityStoreAssignmentRequest object itself. */ @@ -57,7 +61,7 @@ public CustomEntityStoreAssignmentRequest withPrincipal(String principal) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignments.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignments.java index 6267ac669e8e..5293562f0dda 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignments.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignments.java @@ -8,33 +8,35 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of CustomEntityStoreAssignments. */ +/** + * Resource collection API of CustomEntityStoreAssignments. + */ public interface CustomEntityStoreAssignments { /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group along - * with {@link Response}. + * with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String customEntityStoreAssignmentName, Context context); /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,11 +47,11 @@ Response getByResourceGroupWithResponse( /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,16 +59,16 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse( - String resourceGroupName, String customEntityStoreAssignmentName, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String customEntityStoreAssignmentName, + Context context); /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param customEntityStoreAssignmentName Name of the custom entity store assignment. Generated name is GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -76,11 +78,11 @@ Response deleteByResourceGroupWithResponse( /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -90,11 +92,11 @@ Response deleteByResourceGroupWithResponse( /** * List custom entity store assignments in a subscription and a resource group - * - *

List custom entity store assignments by a provided subscription and resource group. - * + * + * List custom entity store assignments by a provided subscription and resource group. + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -105,9 +107,9 @@ Response deleteByResourceGroupWithResponse( /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of custom entity store assignments as paginated response with {@link PagedIterable}. @@ -116,9 +118,9 @@ Response deleteByResourceGroupWithResponse( /** * List custom entity store assignments in a subscription - * - *

List custom entity store assignments by provided subscription. - * + * + * List custom entity store assignments by provided subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -129,38 +131,38 @@ Response deleteByResourceGroupWithResponse( /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group along - * with {@link Response}. + * with {@link Response}. */ CustomEntityStoreAssignment getById(String id); /** * Gets a custom entity store assignment - * - *

Gets a single custom entity store assignment by name for the provided subscription and resource group. - * + * + * Gets a single custom entity store assignment by name for the provided subscription and resource group. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single custom entity store assignment by name for the provided subscription and resource group along - * with {@link Response}. + * with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -170,9 +172,9 @@ Response deleteByResourceGroupWithResponse( /** * Deleted a custom entity store assignment - * - *

Delete a custom entity store assignment by name for a provided subscription. - * + * + * Delete a custom entity store assignment by name for a provided subscription. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +186,7 @@ Response deleteByResourceGroupWithResponse( /** * Begins definition for a new CustomEntityStoreAssignment resource. - * + * * @param name resource name. * @return the first stage of the new CustomEntityStoreAssignment definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentsListResult.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentsListResult.java index 72fd9d924f5f..6f78441d7b68 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentsListResult.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CustomEntityStoreAssignmentsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of custom entity store assignments. */ +/** + * A list of custom entity store assignments. + */ @Fluent public final class CustomEntityStoreAssignmentsListResult { /* @@ -24,13 +26,15 @@ public final class CustomEntityStoreAssignmentsListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CustomEntityStoreAssignmentsListResult class. */ + /** + * Creates an instance of CustomEntityStoreAssignmentsListResult class. + */ public CustomEntityStoreAssignmentsListResult() { } /** * Get the value property: Collection of custom entity store assignments. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The link used to get the next page of operations. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Set the nextLink property: The link used to get the next page of operations. - * + * * @param nextLink the nextLink value to set. * @return the CustomEntityStoreAssignmentsListResult object itself. */ @@ -59,7 +63,7 @@ public CustomEntityStoreAssignmentsListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cve.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cve.java index d7ce9a9681b1..b3b119b353b8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cve.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cve.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** CVE details. */ +/** + * CVE details. + */ @Immutable public final class Cve { /* @@ -22,13 +24,15 @@ public final class Cve { @JsonProperty(value = "link", access = JsonProperty.Access.WRITE_ONLY) private String link; - /** Creates an instance of Cve class. */ + /** + * Creates an instance of Cve class. + */ public Cve() { } /** * Get the title property: CVE title. - * + * * @return the title value. */ public String title() { @@ -37,7 +41,7 @@ public String title() { /** * Get the link property: Link url. - * + * * @return the link value. */ public String link() { @@ -46,7 +50,7 @@ public String link() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cvss.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cvss.java index 2e1f3a22d534..585b172d61a7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cvss.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Cvss.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** CVSS details. */ +/** + * CVSS details. + */ @Immutable public final class Cvss { /* @@ -16,13 +18,15 @@ public final class Cvss { @JsonProperty(value = "base", access = JsonProperty.Access.WRITE_ONLY) private Float base; - /** Creates an instance of Cvss class. */ + /** + * Creates an instance of Cvss class. + */ public Cvss() { } /** * Get the base property: CVSS base. - * + * * @return the base value. */ public Float base() { @@ -31,7 +35,7 @@ public Float base() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataExportSettings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataExportSettings.java index ed4306d48879..45e905b3f236 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataExportSettings.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataExportSettings.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Represents a data export setting. */ +/** + * Represents a data export setting. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("DataExportSettings") @Fluent @@ -22,13 +24,15 @@ public final class DataExportSettings extends SettingInner { @JsonProperty(value = "properties") private DataExportSettingProperties innerProperties; - /** Creates an instance of DataExportSettings class. */ + /** + * Creates an instance of DataExportSettings class. + */ public DataExportSettings() { } /** * Get the innerProperties property: Data export setting data. - * + * * @return the innerProperties value. */ private DataExportSettingProperties innerProperties() { @@ -37,7 +41,7 @@ private DataExportSettingProperties innerProperties() { /** * Get the enabled property: Is the data export setting enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -46,7 +50,7 @@ public Boolean enabled() { /** * Set the enabled property: Is the data export setting enabled. - * + * * @param enabled the enabled value to set. * @return the DataExportSettings object itself. */ @@ -60,7 +64,7 @@ public DataExportSettings withEnabled(Boolean enabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataSource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataSource.java index 8327adbc4f49..bb31fb4acbcb 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataSource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DataSource.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataSource. */ +/** + * Defines values for DataSource. + */ public final class DataSource extends ExpandableStringEnum { - /** Static value TwinData for DataSource. */ + /** + * Static value TwinData for DataSource. + */ public static final DataSource TWIN_DATA = fromString("TwinData"); /** * Creates a new instance of DataSource value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public DataSource() { /** * Creates or finds a DataSource from its string representation. - * + * * @param name a name to look for. * @return the corresponding DataSource. */ @@ -35,7 +39,7 @@ public static DataSource fromString(String name) { /** * Gets known DataSource values. - * + * * @return known DataSource values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java index 0d4bb91cd0c7..431d129663d9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CSPM P1 for AWS offering. */ +/** + * The CSPM P1 for AWS offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderCspmAws") @Fluent @@ -32,13 +34,33 @@ public final class DefenderCspmAwsOffering extends CloudOffering { @JsonProperty(value = "databasesDspm") private DefenderCspmAwsOfferingDatabasesDspm databasesDspm; - /** Creates an instance of DefenderCspmAwsOffering class. */ + /* + * Defenders CSPM Cloud infrastructure entitlement management (CIEM) offering configurations + */ + @JsonProperty(value = "ciem") + private DefenderCspmAwsOfferingCiem ciem; + + /* + * The Microsoft Defender container image assessment configuration + */ + @JsonProperty(value = "mdcContainersImageAssessment") + private DefenderCspmAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment; + + /* + * The Microsoft Defender container agentless discovery K8s configuration + */ + @JsonProperty(value = "mdcContainersAgentlessDiscoveryK8s") + private DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S; + + /** + * Creates an instance of DefenderCspmAwsOffering class. + */ public DefenderCspmAwsOffering() { } /** * Get the vmScanners property: The Microsoft Defender for Server VM scanning configuration. - * + * * @return the vmScanners value. */ public DefenderCspmAwsOfferingVmScanners vmScanners() { @@ -47,7 +69,7 @@ public DefenderCspmAwsOfferingVmScanners vmScanners() { /** * Set the vmScanners property: The Microsoft Defender for Server VM scanning configuration. - * + * * @param vmScanners the vmScanners value to set. * @return the DefenderCspmAwsOffering object itself. */ @@ -58,7 +80,7 @@ public DefenderCspmAwsOffering withVmScanners(DefenderCspmAwsOfferingVmScanners /** * Get the dataSensitivityDiscovery property: The Microsoft Defender Data Sensitivity discovery configuration. - * + * * @return the dataSensitivityDiscovery value. */ public DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery() { @@ -67,19 +89,19 @@ public DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery( /** * Set the dataSensitivityDiscovery property: The Microsoft Defender Data Sensitivity discovery configuration. - * + * * @param dataSensitivityDiscovery the dataSensitivityDiscovery value to set. * @return the DefenderCspmAwsOffering object itself. */ - public DefenderCspmAwsOffering withDataSensitivityDiscovery( - DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery) { + public DefenderCspmAwsOffering + withDataSensitivityDiscovery(DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery) { this.dataSensitivityDiscovery = dataSensitivityDiscovery; return this; } /** * Get the databasesDspm property: The databases DSPM configuration. - * + * * @return the databasesDspm value. */ public DefenderCspmAwsOfferingDatabasesDspm databasesDspm() { @@ -88,7 +110,7 @@ public DefenderCspmAwsOfferingDatabasesDspm databasesDspm() { /** * Set the databasesDspm property: The databases DSPM configuration. - * + * * @param databasesDspm the databasesDspm value to set. * @return the DefenderCspmAwsOffering object itself. */ @@ -97,9 +119,75 @@ public DefenderCspmAwsOffering withDatabasesDspm(DefenderCspmAwsOfferingDatabase return this; } + /** + * Get the ciem property: Defenders CSPM Cloud infrastructure entitlement management (CIEM) offering + * configurations. + * + * @return the ciem value. + */ + public DefenderCspmAwsOfferingCiem ciem() { + return this.ciem; + } + + /** + * Set the ciem property: Defenders CSPM Cloud infrastructure entitlement management (CIEM) offering + * configurations. + * + * @param ciem the ciem value to set. + * @return the DefenderCspmAwsOffering object itself. + */ + public DefenderCspmAwsOffering withCiem(DefenderCspmAwsOfferingCiem ciem) { + this.ciem = ciem; + return this; + } + + /** + * Get the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration. + * + * @return the mdcContainersImageAssessment value. + */ + public DefenderCspmAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment() { + return this.mdcContainersImageAssessment; + } + + /** + * Set the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration. + * + * @param mdcContainersImageAssessment the mdcContainersImageAssessment value to set. + * @return the DefenderCspmAwsOffering object itself. + */ + public DefenderCspmAwsOffering withMdcContainersImageAssessment( + DefenderCspmAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment) { + this.mdcContainersImageAssessment = mdcContainersImageAssessment; + return this; + } + + /** + * Get the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s + * configuration. + * + * @return the mdcContainersAgentlessDiscoveryK8S value. + */ + public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S() { + return this.mdcContainersAgentlessDiscoveryK8S; + } + + /** + * Set the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s + * configuration. + * + * @param mdcContainersAgentlessDiscoveryK8S the mdcContainersAgentlessDiscoveryK8S value to set. + * @return the DefenderCspmAwsOffering object itself. + */ + public DefenderCspmAwsOffering withMdcContainersAgentlessDiscoveryK8S( + DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S) { + this.mdcContainersAgentlessDiscoveryK8S = mdcContainersAgentlessDiscoveryK8S; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -114,5 +202,14 @@ public void validate() { if (databasesDspm() != null) { databasesDspm().validate(); } + if (ciem() != null) { + ciem().validate(); + } + if (mdcContainersImageAssessment() != null) { + mdcContainersImageAssessment().validate(); + } + if (mdcContainersAgentlessDiscoveryK8S() != null) { + mdcContainersAgentlessDiscoveryK8S().validate(); + } } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiem.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiem.java new file mode 100644 index 000000000000..faad3cf06049 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiem.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defenders CSPM Cloud infrastructure entitlement management (CIEM) offering configurations. + */ +@Fluent +public final class DefenderCspmAwsOfferingCiem { + /* + * Defender CSPM CIEM discovery configuration + */ + @JsonProperty(value = "ciemDiscovery") + private DefenderCspmAwsOfferingCiemDiscovery ciemDiscovery; + + /* + * Defender CSPM CIEM AWS OIDC (open id connect) configuration + */ + @JsonProperty(value = "ciemOidc") + private DefenderCspmAwsOfferingCiemOidc ciemOidc; + + /** + * Creates an instance of DefenderCspmAwsOfferingCiem class. + */ + public DefenderCspmAwsOfferingCiem() { + } + + /** + * Get the ciemDiscovery property: Defender CSPM CIEM discovery configuration. + * + * @return the ciemDiscovery value. + */ + public DefenderCspmAwsOfferingCiemDiscovery ciemDiscovery() { + return this.ciemDiscovery; + } + + /** + * Set the ciemDiscovery property: Defender CSPM CIEM discovery configuration. + * + * @param ciemDiscovery the ciemDiscovery value to set. + * @return the DefenderCspmAwsOfferingCiem object itself. + */ + public DefenderCspmAwsOfferingCiem withCiemDiscovery(DefenderCspmAwsOfferingCiemDiscovery ciemDiscovery) { + this.ciemDiscovery = ciemDiscovery; + return this; + } + + /** + * Get the ciemOidc property: Defender CSPM CIEM AWS OIDC (open id connect) configuration. + * + * @return the ciemOidc value. + */ + public DefenderCspmAwsOfferingCiemOidc ciemOidc() { + return this.ciemOidc; + } + + /** + * Set the ciemOidc property: Defender CSPM CIEM AWS OIDC (open id connect) configuration. + * + * @param ciemOidc the ciemOidc value to set. + * @return the DefenderCspmAwsOfferingCiem object itself. + */ + public DefenderCspmAwsOfferingCiem withCiemOidc(DefenderCspmAwsOfferingCiemOidc ciemOidc) { + this.ciemOidc = ciemOidc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ciemDiscovery() != null) { + ciemDiscovery().validate(); + } + if (ciemOidc() != null) { + ciemOidc().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemDiscovery.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemDiscovery.java new file mode 100644 index 000000000000..f7a6f2eee5cb --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemDiscovery.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defender CSPM CIEM discovery configuration. + */ +@Fluent +public final class DefenderCspmAwsOfferingCiemDiscovery { + /* + * The cloud role ARN in AWS for CIEM discovery + */ + @JsonProperty(value = "cloudRoleArn") + private String cloudRoleArn; + + /** + * Creates an instance of DefenderCspmAwsOfferingCiemDiscovery class. + */ + public DefenderCspmAwsOfferingCiemDiscovery() { + } + + /** + * Get the cloudRoleArn property: The cloud role ARN in AWS for CIEM discovery. + * + * @return the cloudRoleArn value. + */ + public String cloudRoleArn() { + return this.cloudRoleArn; + } + + /** + * Set the cloudRoleArn property: The cloud role ARN in AWS for CIEM discovery. + * + * @param cloudRoleArn the cloudRoleArn value to set. + * @return the DefenderCspmAwsOfferingCiemDiscovery object itself. + */ + public DefenderCspmAwsOfferingCiemDiscovery withCloudRoleArn(String cloudRoleArn) { + this.cloudRoleArn = cloudRoleArn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemOidc.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemOidc.java new file mode 100644 index 000000000000..7d4577dbbb03 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingCiemOidc.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defender CSPM CIEM AWS OIDC (open id connect) configuration. + */ +@Fluent +public final class DefenderCspmAwsOfferingCiemOidc { + /* + * The cloud role ARN in AWS for CIEM oidc connection + */ + @JsonProperty(value = "cloudRoleArn") + private String cloudRoleArn; + + /* + * the azure active directory app name used of authenticating against AWS + */ + @JsonProperty(value = "azureActiveDirectoryAppName") + private String azureActiveDirectoryAppName; + + /** + * Creates an instance of DefenderCspmAwsOfferingCiemOidc class. + */ + public DefenderCspmAwsOfferingCiemOidc() { + } + + /** + * Get the cloudRoleArn property: The cloud role ARN in AWS for CIEM oidc connection. + * + * @return the cloudRoleArn value. + */ + public String cloudRoleArn() { + return this.cloudRoleArn; + } + + /** + * Set the cloudRoleArn property: The cloud role ARN in AWS for CIEM oidc connection. + * + * @param cloudRoleArn the cloudRoleArn value to set. + * @return the DefenderCspmAwsOfferingCiemOidc object itself. + */ + public DefenderCspmAwsOfferingCiemOidc withCloudRoleArn(String cloudRoleArn) { + this.cloudRoleArn = cloudRoleArn; + return this; + } + + /** + * Get the azureActiveDirectoryAppName property: the azure active directory app name used of authenticating against + * AWS. + * + * @return the azureActiveDirectoryAppName value. + */ + public String azureActiveDirectoryAppName() { + return this.azureActiveDirectoryAppName; + } + + /** + * Set the azureActiveDirectoryAppName property: the azure active directory app name used of authenticating against + * AWS. + * + * @param azureActiveDirectoryAppName the azureActiveDirectoryAppName value to set. + * @return the DefenderCspmAwsOfferingCiemOidc object itself. + */ + public DefenderCspmAwsOfferingCiemOidc withAzureActiveDirectoryAppName(String azureActiveDirectoryAppName) { + this.azureActiveDirectoryAppName = azureActiveDirectoryAppName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDataSensitivityDiscovery.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDataSensitivityDiscovery.java index 4db399753ec8..45b882cdb39c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDataSensitivityDiscovery.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDataSensitivityDiscovery.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Microsoft Defender Data Sensitivity discovery configuration. */ +/** + * The Microsoft Defender Data Sensitivity discovery configuration. + */ @Fluent public final class DefenderCspmAwsOfferingDataSensitivityDiscovery { /* @@ -22,13 +24,15 @@ public final class DefenderCspmAwsOfferingDataSensitivityDiscovery { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderCspmAwsOfferingDataSensitivityDiscovery class. */ + /** + * Creates an instance of DefenderCspmAwsOfferingDataSensitivityDiscovery class. + */ public DefenderCspmAwsOfferingDataSensitivityDiscovery() { } /** * Get the enabled property: Is Microsoft Defender Data Sensitivity discovery enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Microsoft Defender Data Sensitivity discovery enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderCspmAwsOfferingDataSensitivityDiscovery object itself. */ @@ -48,7 +52,7 @@ public DefenderCspmAwsOfferingDataSensitivityDiscovery withEnabled(Boolean enabl /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -57,7 +61,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderCspmAwsOfferingDataSensitivityDiscovery object itself. */ @@ -68,7 +72,7 @@ public DefenderCspmAwsOfferingDataSensitivityDiscovery withCloudRoleArn(String c /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDatabasesDspm.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDatabasesDspm.java index 15821e5d425b..c202ed2c0d92 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDatabasesDspm.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDatabasesDspm.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The databases DSPM configuration. */ +/** + * The databases DSPM configuration. + */ @Fluent public final class DefenderCspmAwsOfferingDatabasesDspm { /* @@ -22,13 +24,15 @@ public final class DefenderCspmAwsOfferingDatabasesDspm { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderCspmAwsOfferingDatabasesDspm class. */ + /** + * Creates an instance of DefenderCspmAwsOfferingDatabasesDspm class. + */ public DefenderCspmAwsOfferingDatabasesDspm() { } /** * Get the enabled property: Is databases DSPM protection enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is databases DSPM protection enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderCspmAwsOfferingDatabasesDspm object itself. */ @@ -48,7 +52,7 @@ public DefenderCspmAwsOfferingDatabasesDspm withEnabled(Boolean enabled) { /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -57,7 +61,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderCspmAwsOfferingDatabasesDspm object itself. */ @@ -68,7 +72,7 @@ public DefenderCspmAwsOfferingDatabasesDspm withCloudRoleArn(String cloudRoleArn /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.java new file mode 100644 index 000000000000..52fc063bf334 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Microsoft Defender container agentless discovery K8s configuration. + */ +@Fluent +public final class DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S { + /* + * Is Microsoft Defender container agentless discovery K8s enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The cloud role ARN in AWS for this feature + */ + @JsonProperty(value = "cloudRoleArn") + private String cloudRoleArn; + + /** + * Creates an instance of DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S class. + */ + public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S() { + } + + /** + * Get the enabled property: Is Microsoft Defender container agentless discovery K8s enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Is Microsoft Defender container agentless discovery K8s enabled. + * + * @param enabled the enabled value to set. + * @return the DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S object itself. + */ + public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @return the cloudRoleArn value. + */ + public String cloudRoleArn() { + return this.cloudRoleArn; + } + + /** + * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @param cloudRoleArn the cloudRoleArn value to set. + * @return the DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S object itself. + */ + public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S withCloudRoleArn(String cloudRoleArn) { + this.cloudRoleArn = cloudRoleArn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersImageAssessment.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersImageAssessment.java new file mode 100644 index 000000000000..cfa11595913f --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingMdcContainersImageAssessment.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Microsoft Defender container image assessment configuration. + */ +@Fluent +public final class DefenderCspmAwsOfferingMdcContainersImageAssessment { + /* + * Is Microsoft Defender container image assessment enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The cloud role ARN in AWS for this feature + */ + @JsonProperty(value = "cloudRoleArn") + private String cloudRoleArn; + + /** + * Creates an instance of DefenderCspmAwsOfferingMdcContainersImageAssessment class. + */ + public DefenderCspmAwsOfferingMdcContainersImageAssessment() { + } + + /** + * Get the enabled property: Is Microsoft Defender container image assessment enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Is Microsoft Defender container image assessment enabled. + * + * @param enabled the enabled value to set. + * @return the DefenderCspmAwsOfferingMdcContainersImageAssessment object itself. + */ + public DefenderCspmAwsOfferingMdcContainersImageAssessment withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @return the cloudRoleArn value. + */ + public String cloudRoleArn() { + return this.cloudRoleArn; + } + + /** + * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @param cloudRoleArn the cloudRoleArn value to set. + * @return the DefenderCspmAwsOfferingMdcContainersImageAssessment object itself. + */ + public DefenderCspmAwsOfferingMdcContainersImageAssessment withCloudRoleArn(String cloudRoleArn) { + this.cloudRoleArn = cloudRoleArn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScanners.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScanners.java index 8854c0967acf..d0b1864ad5ee 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScanners.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScanners.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Microsoft Defender for Server VM scanning configuration. */ +/** + * The Microsoft Defender for Server VM scanning configuration. + */ @Fluent public final class DefenderCspmAwsOfferingVmScanners { /* @@ -22,13 +24,15 @@ public final class DefenderCspmAwsOfferingVmScanners { @JsonProperty(value = "configuration") private DefenderCspmAwsOfferingVmScannersConfiguration configuration; - /** Creates an instance of DefenderCspmAwsOfferingVmScanners class. */ + /** + * Creates an instance of DefenderCspmAwsOfferingVmScanners class. + */ public DefenderCspmAwsOfferingVmScanners() { } /** * Get the enabled property: Is Microsoft Defender for Server VM scanning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Microsoft Defender for Server VM scanning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderCspmAwsOfferingVmScanners object itself. */ @@ -48,7 +52,7 @@ public DefenderCspmAwsOfferingVmScanners withEnabled(Boolean enabled) { /** * Get the configuration property: configuration for Microsoft Defender for Server VM scanning. - * + * * @return the configuration value. */ public DefenderCspmAwsOfferingVmScannersConfiguration configuration() { @@ -57,19 +61,19 @@ public DefenderCspmAwsOfferingVmScannersConfiguration configuration() { /** * Set the configuration property: configuration for Microsoft Defender for Server VM scanning. - * + * * @param configuration the configuration value to set. * @return the DefenderCspmAwsOfferingVmScanners object itself. */ - public DefenderCspmAwsOfferingVmScanners withConfiguration( - DefenderCspmAwsOfferingVmScannersConfiguration configuration) { + public DefenderCspmAwsOfferingVmScanners + withConfiguration(DefenderCspmAwsOfferingVmScannersConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java index e70b7f13e8c2..181e39d30344 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** configuration for Microsoft Defender for Server VM scanning. */ +/** + * configuration for Microsoft Defender for Server VM scanning. + */ @Fluent public final class DefenderCspmAwsOfferingVmScannersConfiguration { /* @@ -31,13 +33,15 @@ public final class DefenderCspmAwsOfferingVmScannersConfiguration { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map exclusionTags; - /** Creates an instance of DefenderCspmAwsOfferingVmScannersConfiguration class. */ + /** + * Creates an instance of DefenderCspmAwsOfferingVmScannersConfiguration class. + */ public DefenderCspmAwsOfferingVmScannersConfiguration() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -46,7 +50,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderCspmAwsOfferingVmScannersConfiguration object itself. */ @@ -57,7 +61,7 @@ public DefenderCspmAwsOfferingVmScannersConfiguration withCloudRoleArn(String cl /** * Get the scanningMode property: The scanning mode for the VM scan. - * + * * @return the scanningMode value. */ public ScanningMode scanningMode() { @@ -66,7 +70,7 @@ public ScanningMode scanningMode() { /** * Set the scanningMode property: The scanning mode for the VM scan. - * + * * @param scanningMode the scanningMode value to set. * @return the DefenderCspmAwsOfferingVmScannersConfiguration object itself. */ @@ -77,7 +81,7 @@ public DefenderCspmAwsOfferingVmScannersConfiguration withScanningMode(ScanningM /** * Get the exclusionTags property: VM tags that indicates that VM should not be scanned. - * + * * @return the exclusionTags value. */ public Map exclusionTags() { @@ -86,7 +90,7 @@ public Map exclusionTags() { /** * Set the exclusionTags property: VM tags that indicates that VM should not be scanned. - * + * * @param exclusionTags the exclusionTags value to set. * @return the DefenderCspmAwsOfferingVmScannersConfiguration object itself. */ @@ -97,7 +101,7 @@ public DefenderCspmAwsOfferingVmScannersConfiguration withExclusionTags(Map exclusionTags; + + /** + * Creates an instance of DefenderCspmGcpOfferingVmScannersConfiguration class. + */ + public DefenderCspmGcpOfferingVmScannersConfiguration() { + } + + /** + * Get the scanningMode property: The scanning mode for the VM scan. + * + * @return the scanningMode value. + */ + public ScanningMode scanningMode() { + return this.scanningMode; + } + + /** + * Set the scanningMode property: The scanning mode for the VM scan. + * + * @param scanningMode the scanningMode value to set. + * @return the DefenderCspmGcpOfferingVmScannersConfiguration object itself. + */ + public DefenderCspmGcpOfferingVmScannersConfiguration withScanningMode(ScanningMode scanningMode) { + this.scanningMode = scanningMode; + return this; + } + + /** + * Get the exclusionTags property: VM tags that indicates that VM should not be scanned. + * + * @return the exclusionTags value. + */ + public Map exclusionTags() { + return this.exclusionTags; + } + + /** + * Set the exclusionTags property: VM tags that indicates that VM should not be scanned. + * + * @param exclusionTags the exclusionTags value to set. + * @return the DefenderCspmGcpOfferingVmScannersConfiguration object itself. + */ + public DefenderCspmGcpOfferingVmScannersConfiguration withExclusionTags(Map exclusionTags) { + this.exclusionTags = exclusionTags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java index d95d5ca67fb6..d17ff6a867ba 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for Databases AWS offering. */ +/** + * The Defender for Databases AWS offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForDatabasesAws") @Fluent @@ -32,13 +34,15 @@ public final class DefenderFoDatabasesAwsOffering extends CloudOffering { @JsonProperty(value = "databasesDspm") private DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm; - /** Creates an instance of DefenderFoDatabasesAwsOffering class. */ + /** + * Creates an instance of DefenderFoDatabasesAwsOffering class. + */ public DefenderFoDatabasesAwsOffering() { } /** * Get the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @return the arcAutoProvisioning value. */ public DefenderFoDatabasesAwsOfferingArcAutoProvisioning arcAutoProvisioning() { @@ -47,19 +51,19 @@ public DefenderFoDatabasesAwsOfferingArcAutoProvisioning arcAutoProvisioning() { /** * Set the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @param arcAutoProvisioning the arcAutoProvisioning value to set. * @return the DefenderFoDatabasesAwsOffering object itself. */ - public DefenderFoDatabasesAwsOffering withArcAutoProvisioning( - DefenderFoDatabasesAwsOfferingArcAutoProvisioning arcAutoProvisioning) { + public DefenderFoDatabasesAwsOffering + withArcAutoProvisioning(DefenderFoDatabasesAwsOfferingArcAutoProvisioning arcAutoProvisioning) { this.arcAutoProvisioning = arcAutoProvisioning; return this; } /** * Get the rds property: The RDS configuration. - * + * * @return the rds value. */ public DefenderFoDatabasesAwsOfferingRds rds() { @@ -68,7 +72,7 @@ public DefenderFoDatabasesAwsOfferingRds rds() { /** * Set the rds property: The RDS configuration. - * + * * @param rds the rds value to set. * @return the DefenderFoDatabasesAwsOffering object itself. */ @@ -79,7 +83,7 @@ public DefenderFoDatabasesAwsOffering withRds(DefenderFoDatabasesAwsOfferingRds /** * Get the databasesDspm property: The databases data security posture management (DSPM) configuration. - * + * * @return the databasesDspm value. */ public DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm() { @@ -88,7 +92,7 @@ public DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm() { /** * Set the databasesDspm property: The databases data security posture management (DSPM) configuration. - * + * * @param databasesDspm the databasesDspm value to set. * @return the DefenderFoDatabasesAwsOffering object itself. */ @@ -99,7 +103,7 @@ public DefenderFoDatabasesAwsOffering withDatabasesDspm(DefenderFoDatabasesAwsOf /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java index b08183d5e9f3..be528f28a6e6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ARC autoprovisioning configuration. */ +/** + * The ARC autoprovisioning configuration. + */ @Fluent public final class DefenderFoDatabasesAwsOfferingArcAutoProvisioning { /* @@ -28,13 +30,15 @@ public final class DefenderFoDatabasesAwsOfferingArcAutoProvisioning { @JsonProperty(value = "configuration") private DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configuration; - /** Creates an instance of DefenderFoDatabasesAwsOfferingArcAutoProvisioning class. */ + /** + * Creates an instance of DefenderFoDatabasesAwsOfferingArcAutoProvisioning class. + */ public DefenderFoDatabasesAwsOfferingArcAutoProvisioning() { } /** * Get the enabled property: Is arc auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -43,7 +47,7 @@ public Boolean enabled() { /** * Set the enabled property: Is arc auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioning object itself. */ @@ -54,7 +58,7 @@ public DefenderFoDatabasesAwsOfferingArcAutoProvisioning withEnabled(Boolean ena /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -63,7 +67,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioning object itself. */ @@ -74,7 +78,7 @@ public DefenderFoDatabasesAwsOfferingArcAutoProvisioning withCloudRoleArn(String /** * Get the configuration property: Configuration for servers Arc auto provisioning. - * + * * @return the configuration value. */ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configuration() { @@ -83,19 +87,19 @@ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configurat /** * Set the configuration property: Configuration for servers Arc auto provisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioning object itself. */ - public DefenderFoDatabasesAwsOfferingArcAutoProvisioning withConfiguration( - DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configuration) { + public DefenderFoDatabasesAwsOfferingArcAutoProvisioning + withConfiguration(DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.java index a4796bf24775..6e7ca9c54548 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration for servers Arc auto provisioning. */ +/** + * Configuration for servers Arc auto provisioning. + */ @Fluent public final class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration { /* @@ -22,13 +24,15 @@ public final class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguratio @JsonProperty(value = "privateLinkScope") private String privateLinkScope; - /** Creates an instance of DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration class. */ + /** + * Creates an instance of DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration class. + */ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration() { } /** * Get the proxy property: Optional http proxy endpoint to use for the Arc agent. - * + * * @return the proxy value. */ public String proxy() { @@ -37,7 +41,7 @@ public String proxy() { /** * Set the proxy property: Optional http proxy endpoint to use for the Arc agent. - * + * * @param proxy the proxy value to set. * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration object itself. */ @@ -48,7 +52,7 @@ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration withProxy( /** * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @return the privateLinkScope value. */ public String privateLinkScope() { @@ -57,19 +61,19 @@ public String privateLinkScope() { /** * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @param privateLinkScope the privateLinkScope value to set. * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration object itself. */ - public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration withPrivateLinkScope( - String privateLinkScope) { + public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration + withPrivateLinkScope(String privateLinkScope) { this.privateLinkScope = privateLinkScope; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingDatabasesDspm.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingDatabasesDspm.java index f4e4b88c8735..e6fe9024911e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingDatabasesDspm.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingDatabasesDspm.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The databases data security posture management (DSPM) configuration. */ +/** + * The databases data security posture management (DSPM) configuration. + */ @Fluent public final class DefenderFoDatabasesAwsOfferingDatabasesDspm { /* @@ -22,13 +24,15 @@ public final class DefenderFoDatabasesAwsOfferingDatabasesDspm { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderFoDatabasesAwsOfferingDatabasesDspm class. */ + /** + * Creates an instance of DefenderFoDatabasesAwsOfferingDatabasesDspm class. + */ public DefenderFoDatabasesAwsOfferingDatabasesDspm() { } /** * Get the enabled property: Is databases data security posture management (DSPM) protection enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is databases data security posture management (DSPM) protection enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderFoDatabasesAwsOfferingDatabasesDspm object itself. */ @@ -48,7 +52,7 @@ public DefenderFoDatabasesAwsOfferingDatabasesDspm withEnabled(Boolean enabled) /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -57,7 +61,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderFoDatabasesAwsOfferingDatabasesDspm object itself. */ @@ -68,7 +72,7 @@ public DefenderFoDatabasesAwsOfferingDatabasesDspm withCloudRoleArn(String cloud /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingRds.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingRds.java index 73c9f6277ef5..ac0c430af824 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingRds.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingRds.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The RDS configuration. */ +/** + * The RDS configuration. + */ @Fluent public final class DefenderFoDatabasesAwsOfferingRds { /* @@ -22,13 +24,15 @@ public final class DefenderFoDatabasesAwsOfferingRds { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderFoDatabasesAwsOfferingRds class. */ + /** + * Creates an instance of DefenderFoDatabasesAwsOfferingRds class. + */ public DefenderFoDatabasesAwsOfferingRds() { } /** * Get the enabled property: Is RDS protection enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is RDS protection enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderFoDatabasesAwsOfferingRds object itself. */ @@ -48,7 +52,7 @@ public DefenderFoDatabasesAwsOfferingRds withEnabled(Boolean enabled) { /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -57,7 +61,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderFoDatabasesAwsOfferingRds object itself. */ @@ -68,7 +72,7 @@ public DefenderFoDatabasesAwsOfferingRds withCloudRoleArn(String cloudRoleArn) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOffering.java index 9877dfd1b938..e94faaf094a5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for Containers AWS offering. */ +/** + * The Defender for Containers AWS offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForContainersAws") @Fluent @@ -74,13 +76,27 @@ public final class DefenderForContainersAwsOffering extends CloudOffering { @JsonProperty(value = "scubaExternalId") private String scubaExternalId; - /** Creates an instance of DefenderForContainersAwsOffering class. */ + /* + * The Microsoft Defender container image assessment configuration + */ + @JsonProperty(value = "mdcContainersImageAssessment") + private DefenderForContainersAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment; + + /* + * The Microsoft Defender container agentless discovery K8s configuration + */ + @JsonProperty(value = "mdcContainersAgentlessDiscoveryK8s") + private DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S; + + /** + * Creates an instance of DefenderForContainersAwsOffering class. + */ public DefenderForContainersAwsOffering() { } /** * Get the kubernetesService property: The kubernetes service connection configuration. - * + * * @return the kubernetesService value. */ public DefenderForContainersAwsOfferingKubernetesService kubernetesService() { @@ -89,19 +105,19 @@ public DefenderForContainersAwsOfferingKubernetesService kubernetesService() { /** * Set the kubernetesService property: The kubernetes service connection configuration. - * + * * @param kubernetesService the kubernetesService value to set. * @return the DefenderForContainersAwsOffering object itself. */ - public DefenderForContainersAwsOffering withKubernetesService( - DefenderForContainersAwsOfferingKubernetesService kubernetesService) { + public DefenderForContainersAwsOffering + withKubernetesService(DefenderForContainersAwsOfferingKubernetesService kubernetesService) { this.kubernetesService = kubernetesService; return this; } /** * Get the kubernetesScubaReader property: The kubernetes to scuba connection configuration. - * + * * @return the kubernetesScubaReader value. */ public DefenderForContainersAwsOfferingKubernetesScubaReader kubernetesScubaReader() { @@ -110,19 +126,19 @@ public DefenderForContainersAwsOfferingKubernetesScubaReader kubernetesScubaRead /** * Set the kubernetesScubaReader property: The kubernetes to scuba connection configuration. - * + * * @param kubernetesScubaReader the kubernetesScubaReader value to set. * @return the DefenderForContainersAwsOffering object itself. */ - public DefenderForContainersAwsOffering withKubernetesScubaReader( - DefenderForContainersAwsOfferingKubernetesScubaReader kubernetesScubaReader) { + public DefenderForContainersAwsOffering + withKubernetesScubaReader(DefenderForContainersAwsOfferingKubernetesScubaReader kubernetesScubaReader) { this.kubernetesScubaReader = kubernetesScubaReader; return this; } /** * Get the cloudWatchToKinesis property: The cloudwatch to kinesis connection configuration. - * + * * @return the cloudWatchToKinesis value. */ public DefenderForContainersAwsOfferingCloudWatchToKinesis cloudWatchToKinesis() { @@ -131,19 +147,19 @@ public DefenderForContainersAwsOfferingCloudWatchToKinesis cloudWatchToKinesis() /** * Set the cloudWatchToKinesis property: The cloudwatch to kinesis connection configuration. - * + * * @param cloudWatchToKinesis the cloudWatchToKinesis value to set. * @return the DefenderForContainersAwsOffering object itself. */ - public DefenderForContainersAwsOffering withCloudWatchToKinesis( - DefenderForContainersAwsOfferingCloudWatchToKinesis cloudWatchToKinesis) { + public DefenderForContainersAwsOffering + withCloudWatchToKinesis(DefenderForContainersAwsOfferingCloudWatchToKinesis cloudWatchToKinesis) { this.cloudWatchToKinesis = cloudWatchToKinesis; return this; } /** * Get the kinesisToS3 property: The kinesis to s3 connection configuration. - * + * * @return the kinesisToS3 value. */ public DefenderForContainersAwsOfferingKinesisToS3 kinesisToS3() { @@ -152,7 +168,7 @@ public DefenderForContainersAwsOfferingKinesisToS3 kinesisToS3() { /** * Set the kinesisToS3 property: The kinesis to s3 connection configuration. - * + * * @param kinesisToS3 the kinesisToS3 value to set. * @return the DefenderForContainersAwsOffering object itself. */ @@ -163,7 +179,7 @@ public DefenderForContainersAwsOffering withKinesisToS3(DefenderForContainersAws /** * Get the containerVulnerabilityAssessment property: The container vulnerability assessment configuration. - * + * * @return the containerVulnerabilityAssessment value. */ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessment containerVulnerabilityAssessment() { @@ -172,7 +188,7 @@ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessment containe /** * Set the containerVulnerabilityAssessment property: The container vulnerability assessment configuration. - * + * * @param containerVulnerabilityAssessment the containerVulnerabilityAssessment value to set. * @return the DefenderForContainersAwsOffering object itself. */ @@ -183,8 +199,9 @@ public DefenderForContainersAwsOffering withContainerVulnerabilityAssessment( } /** - * Get the containerVulnerabilityAssessmentTask property: The container vulnerability assessment task configuration. - * + * Get the containerVulnerabilityAssessmentTask property: The container vulnerability assessment task + * configuration. + * * @return the containerVulnerabilityAssessmentTask value. */ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask containerVulnerabilityAssessmentTask() { @@ -192,8 +209,9 @@ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask cont } /** - * Set the containerVulnerabilityAssessmentTask property: The container vulnerability assessment task configuration. - * + * Set the containerVulnerabilityAssessmentTask property: The container vulnerability assessment task + * configuration. + * * @param containerVulnerabilityAssessmentTask the containerVulnerabilityAssessmentTask value to set. * @return the DefenderForContainersAwsOffering object itself. */ @@ -205,7 +223,7 @@ public DefenderForContainersAwsOffering withContainerVulnerabilityAssessmentTask /** * Get the enableContainerVulnerabilityAssessment property: Enable container vulnerability assessment feature. - * + * * @return the enableContainerVulnerabilityAssessment value. */ public Boolean enableContainerVulnerabilityAssessment() { @@ -214,19 +232,19 @@ public Boolean enableContainerVulnerabilityAssessment() { /** * Set the enableContainerVulnerabilityAssessment property: Enable container vulnerability assessment feature. - * + * * @param enableContainerVulnerabilityAssessment the enableContainerVulnerabilityAssessment value to set. * @return the DefenderForContainersAwsOffering object itself. */ - public DefenderForContainersAwsOffering withEnableContainerVulnerabilityAssessment( - Boolean enableContainerVulnerabilityAssessment) { + public DefenderForContainersAwsOffering + withEnableContainerVulnerabilityAssessment(Boolean enableContainerVulnerabilityAssessment) { this.enableContainerVulnerabilityAssessment = enableContainerVulnerabilityAssessment; return this; } /** * Get the autoProvisioning property: Is audit logs pipeline auto provisioning enabled. - * + * * @return the autoProvisioning value. */ public Boolean autoProvisioning() { @@ -235,7 +253,7 @@ public Boolean autoProvisioning() { /** * Set the autoProvisioning property: Is audit logs pipeline auto provisioning enabled. - * + * * @param autoProvisioning the autoProvisioning value to set. * @return the DefenderForContainersAwsOffering object itself. */ @@ -247,7 +265,7 @@ public DefenderForContainersAwsOffering withAutoProvisioning(Boolean autoProvisi /** * Get the kubeAuditRetentionTime property: The retention time in days of kube audit logs set on the CloudWatch log * group. - * + * * @return the kubeAuditRetentionTime value. */ public Long kubeAuditRetentionTime() { @@ -257,7 +275,7 @@ public Long kubeAuditRetentionTime() { /** * Set the kubeAuditRetentionTime property: The retention time in days of kube audit logs set on the CloudWatch log * group. - * + * * @param kubeAuditRetentionTime the kubeAuditRetentionTime value to set. * @return the DefenderForContainersAwsOffering object itself. */ @@ -268,7 +286,7 @@ public DefenderForContainersAwsOffering withKubeAuditRetentionTime(Long kubeAudi /** * Get the scubaExternalId property: The externalId used by the data reader to prevent the confused deputy attack. - * + * * @return the scubaExternalId value. */ public String scubaExternalId() { @@ -277,7 +295,7 @@ public String scubaExternalId() { /** * Set the scubaExternalId property: The externalId used by the data reader to prevent the confused deputy attack. - * + * * @param scubaExternalId the scubaExternalId value to set. * @return the DefenderForContainersAwsOffering object itself. */ @@ -286,9 +304,53 @@ public DefenderForContainersAwsOffering withScubaExternalId(String scubaExternal return this; } + /** + * Get the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration. + * + * @return the mdcContainersImageAssessment value. + */ + public DefenderForContainersAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment() { + return this.mdcContainersImageAssessment; + } + + /** + * Set the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration. + * + * @param mdcContainersImageAssessment the mdcContainersImageAssessment value to set. + * @return the DefenderForContainersAwsOffering object itself. + */ + public DefenderForContainersAwsOffering withMdcContainersImageAssessment( + DefenderForContainersAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment) { + this.mdcContainersImageAssessment = mdcContainersImageAssessment; + return this; + } + + /** + * Get the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s + * configuration. + * + * @return the mdcContainersAgentlessDiscoveryK8S value. + */ + public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S() { + return this.mdcContainersAgentlessDiscoveryK8S; + } + + /** + * Set the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s + * configuration. + * + * @param mdcContainersAgentlessDiscoveryK8S the mdcContainersAgentlessDiscoveryK8S value to set. + * @return the DefenderForContainersAwsOffering object itself. + */ + public DefenderForContainersAwsOffering withMdcContainersAgentlessDiscoveryK8S( + DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S) { + this.mdcContainersAgentlessDiscoveryK8S = mdcContainersAgentlessDiscoveryK8S; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -312,5 +374,11 @@ public void validate() { if (containerVulnerabilityAssessmentTask() != null) { containerVulnerabilityAssessmentTask().validate(); } + if (mdcContainersImageAssessment() != null) { + mdcContainersImageAssessment().validate(); + } + if (mdcContainersAgentlessDiscoveryK8S() != null) { + mdcContainersAgentlessDiscoveryK8S().validate(); + } } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingCloudWatchToKinesis.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingCloudWatchToKinesis.java index d27c5a0afc7b..59df0dad19dc 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingCloudWatchToKinesis.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingCloudWatchToKinesis.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The cloudwatch to kinesis connection configuration. */ +/** + * The cloudwatch to kinesis connection configuration. + */ @Fluent public final class DefenderForContainersAwsOfferingCloudWatchToKinesis { /* @@ -16,13 +18,15 @@ public final class DefenderForContainersAwsOfferingCloudWatchToKinesis { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderForContainersAwsOfferingCloudWatchToKinesis class. */ + /** + * Creates an instance of DefenderForContainersAwsOfferingCloudWatchToKinesis class. + */ public DefenderForContainersAwsOfferingCloudWatchToKinesis() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS used by CloudWatch to transfer data into Kinesis. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS used by CloudWatch to transfer data into Kinesis. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForContainersAwsOfferingCloudWatchToKinesis object itself. */ @@ -42,7 +46,7 @@ public DefenderForContainersAwsOfferingCloudWatchToKinesis withCloudRoleArn(Stri /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.java index a1348cee8522..4ec0d73678dd 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The container vulnerability assessment configuration. */ +/** + * The container vulnerability assessment configuration. + */ @Fluent public final class DefenderForContainersAwsOfferingContainerVulnerabilityAssessment { /* @@ -16,13 +18,15 @@ public final class DefenderForContainersAwsOfferingContainerVulnerabilityAssessm @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderForContainersAwsOfferingContainerVulnerabilityAssessment class. */ + /** + * Creates an instance of DefenderForContainersAwsOfferingContainerVulnerabilityAssessment class. + */ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessment() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForContainersAwsOfferingContainerVulnerabilityAssessment object itself. */ @@ -42,7 +46,7 @@ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessment withClou /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.java index 711d36db19c0..b1750e8084e0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The container vulnerability assessment task configuration. */ +/** + * The container vulnerability assessment task configuration. + */ @Fluent public final class DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask { /* @@ -16,13 +18,15 @@ public final class DefenderForContainersAwsOfferingContainerVulnerabilityAssessm @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask class. */ + /** + * Creates an instance of DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask class. + */ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask object itself. */ @@ -42,7 +46,7 @@ public DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask with /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKinesisToS3.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKinesisToS3.java index 1dc228f61ddf..23ab2b9a459d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKinesisToS3.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKinesisToS3.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The kinesis to s3 connection configuration. */ +/** + * The kinesis to s3 connection configuration. + */ @Fluent public final class DefenderForContainersAwsOfferingKinesisToS3 { /* @@ -16,13 +18,15 @@ public final class DefenderForContainersAwsOfferingKinesisToS3 { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderForContainersAwsOfferingKinesisToS3 class. */ + /** + * Creates an instance of DefenderForContainersAwsOfferingKinesisToS3 class. + */ public DefenderForContainersAwsOfferingKinesisToS3() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS used by Kinesis to transfer data into S3. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS used by Kinesis to transfer data into S3. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForContainersAwsOfferingKinesisToS3 object itself. */ @@ -42,7 +46,7 @@ public DefenderForContainersAwsOfferingKinesisToS3 withCloudRoleArn(String cloud /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesScubaReader.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesScubaReader.java index 13533efccb8f..669a805c7841 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesScubaReader.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesScubaReader.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The kubernetes to scuba connection configuration. */ +/** + * The kubernetes to scuba connection configuration. + */ @Fluent public final class DefenderForContainersAwsOfferingKubernetesScubaReader { /* @@ -16,13 +18,15 @@ public final class DefenderForContainersAwsOfferingKubernetesScubaReader { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderForContainersAwsOfferingKubernetesScubaReader class. */ + /** + * Creates an instance of DefenderForContainersAwsOfferingKubernetesScubaReader class. + */ public DefenderForContainersAwsOfferingKubernetesScubaReader() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature used for reading data. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature used for reading data. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForContainersAwsOfferingKubernetesScubaReader object itself. */ @@ -42,7 +46,7 @@ public DefenderForContainersAwsOfferingKubernetesScubaReader withCloudRoleArn(St /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesService.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesService.java index 391c18cb98e0..3639cd51c263 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesService.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingKubernetesService.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The kubernetes service connection configuration. */ +/** + * The kubernetes service connection configuration. + */ @Fluent public final class DefenderForContainersAwsOfferingKubernetesService { /* @@ -16,13 +18,15 @@ public final class DefenderForContainersAwsOfferingKubernetesService { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderForContainersAwsOfferingKubernetesService class. */ + /** + * Creates an instance of DefenderForContainersAwsOfferingKubernetesService class. + */ public DefenderForContainersAwsOfferingKubernetesService() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature used for provisioning resources. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature used for provisioning resources. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForContainersAwsOfferingKubernetesService object itself. */ @@ -42,7 +46,7 @@ public DefenderForContainersAwsOfferingKubernetesService withCloudRoleArn(String /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.java new file mode 100644 index 000000000000..e442242e6ea0 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Microsoft Defender container agentless discovery K8s configuration. + */ +@Fluent +public final class DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S { + /* + * Is Microsoft Defender container agentless discovery K8s enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The cloud role ARN in AWS for this feature + */ + @JsonProperty(value = "cloudRoleArn") + private String cloudRoleArn; + + /** + * Creates an instance of DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S class. + */ + public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S() { + } + + /** + * Get the enabled property: Is Microsoft Defender container agentless discovery K8s enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Is Microsoft Defender container agentless discovery K8s enabled. + * + * @param enabled the enabled value to set. + * @return the DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S object itself. + */ + public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @return the cloudRoleArn value. + */ + public String cloudRoleArn() { + return this.cloudRoleArn; + } + + /** + * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @param cloudRoleArn the cloudRoleArn value to set. + * @return the DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S object itself. + */ + public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S withCloudRoleArn(String cloudRoleArn) { + this.cloudRoleArn = cloudRoleArn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.java new file mode 100644 index 000000000000..f1206de4ecf1 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Microsoft Defender container image assessment configuration. + */ +@Fluent +public final class DefenderForContainersAwsOfferingMdcContainersImageAssessment { + /* + * Is Microsoft Defender container image assessment enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The cloud role ARN in AWS for this feature + */ + @JsonProperty(value = "cloudRoleArn") + private String cloudRoleArn; + + /** + * Creates an instance of DefenderForContainersAwsOfferingMdcContainersImageAssessment class. + */ + public DefenderForContainersAwsOfferingMdcContainersImageAssessment() { + } + + /** + * Get the enabled property: Is Microsoft Defender container image assessment enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Is Microsoft Defender container image assessment enabled. + * + * @param enabled the enabled value to set. + * @return the DefenderForContainersAwsOfferingMdcContainersImageAssessment object itself. + */ + public DefenderForContainersAwsOfferingMdcContainersImageAssessment withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @return the cloudRoleArn value. + */ + public String cloudRoleArn() { + return this.cloudRoleArn; + } + + /** + * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. + * + * @param cloudRoleArn the cloudRoleArn value to set. + * @return the DefenderForContainersAwsOfferingMdcContainersImageAssessment object itself. + */ + public DefenderForContainersAwsOfferingMdcContainersImageAssessment withCloudRoleArn(String cloudRoleArn) { + this.cloudRoleArn = cloudRoleArn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOffering.java index 4f6379839b46..efe381e51a0f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The containers GCP offering. */ +/** + * The containers GCP offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForContainersGcp") @Fluent @@ -44,13 +46,27 @@ public final class DefenderForContainersGcpOffering extends CloudOffering { @JsonProperty(value = "policyAgentAutoProvisioningFlag") private Boolean policyAgentAutoProvisioningFlag; - /** Creates an instance of DefenderForContainersGcpOffering class. */ + /* + * The Microsoft Defender Container image assessment configuration + */ + @JsonProperty(value = "mdcContainersImageAssessment") + private DefenderForContainersGcpOfferingMdcContainersImageAssessment mdcContainersImageAssessment; + + /* + * The Microsoft Defender Container agentless discovery configuration + */ + @JsonProperty(value = "mdcContainersAgentlessDiscoveryK8s") + private DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S; + + /** + * Creates an instance of DefenderForContainersGcpOffering class. + */ public DefenderForContainersGcpOffering() { } /** * Get the nativeCloudConnection property: The native cloud connection configuration. - * + * * @return the nativeCloudConnection value. */ public DefenderForContainersGcpOfferingNativeCloudConnection nativeCloudConnection() { @@ -59,19 +75,19 @@ public DefenderForContainersGcpOfferingNativeCloudConnection nativeCloudConnecti /** * Set the nativeCloudConnection property: The native cloud connection configuration. - * + * * @param nativeCloudConnection the nativeCloudConnection value to set. * @return the DefenderForContainersGcpOffering object itself. */ - public DefenderForContainersGcpOffering withNativeCloudConnection( - DefenderForContainersGcpOfferingNativeCloudConnection nativeCloudConnection) { + public DefenderForContainersGcpOffering + withNativeCloudConnection(DefenderForContainersGcpOfferingNativeCloudConnection nativeCloudConnection) { this.nativeCloudConnection = nativeCloudConnection; return this; } /** * Get the dataPipelineNativeCloudConnection property: The native cloud connection configuration. - * + * * @return the dataPipelineNativeCloudConnection value. */ public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection dataPipelineNativeCloudConnection() { @@ -80,7 +96,7 @@ public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection dataPip /** * Set the dataPipelineNativeCloudConnection property: The native cloud connection configuration. - * + * * @param dataPipelineNativeCloudConnection the dataPipelineNativeCloudConnection value to set. * @return the DefenderForContainersGcpOffering object itself. */ @@ -92,7 +108,7 @@ public DefenderForContainersGcpOffering withDataPipelineNativeCloudConnection( /** * Get the auditLogsAutoProvisioningFlag property: Is audit logs data collection enabled. - * + * * @return the auditLogsAutoProvisioningFlag value. */ public Boolean auditLogsAutoProvisioningFlag() { @@ -101,7 +117,7 @@ public Boolean auditLogsAutoProvisioningFlag() { /** * Set the auditLogsAutoProvisioningFlag property: Is audit logs data collection enabled. - * + * * @param auditLogsAutoProvisioningFlag the auditLogsAutoProvisioningFlag value to set. * @return the DefenderForContainersGcpOffering object itself. */ @@ -113,7 +129,7 @@ public DefenderForContainersGcpOffering withAuditLogsAutoProvisioningFlag(Boolea /** * Get the defenderAgentAutoProvisioningFlag property: Is Microsoft Defender for Cloud Kubernetes agent auto * provisioning enabled. - * + * * @return the defenderAgentAutoProvisioningFlag value. */ public Boolean defenderAgentAutoProvisioningFlag() { @@ -123,19 +139,19 @@ public Boolean defenderAgentAutoProvisioningFlag() { /** * Set the defenderAgentAutoProvisioningFlag property: Is Microsoft Defender for Cloud Kubernetes agent auto * provisioning enabled. - * + * * @param defenderAgentAutoProvisioningFlag the defenderAgentAutoProvisioningFlag value to set. * @return the DefenderForContainersGcpOffering object itself. */ - public DefenderForContainersGcpOffering withDefenderAgentAutoProvisioningFlag( - Boolean defenderAgentAutoProvisioningFlag) { + public DefenderForContainersGcpOffering + withDefenderAgentAutoProvisioningFlag(Boolean defenderAgentAutoProvisioningFlag) { this.defenderAgentAutoProvisioningFlag = defenderAgentAutoProvisioningFlag; return this; } /** * Get the policyAgentAutoProvisioningFlag property: Is Policy Kubernetes agent auto provisioning enabled. - * + * * @return the policyAgentAutoProvisioningFlag value. */ public Boolean policyAgentAutoProvisioningFlag() { @@ -144,19 +160,63 @@ public Boolean policyAgentAutoProvisioningFlag() { /** * Set the policyAgentAutoProvisioningFlag property: Is Policy Kubernetes agent auto provisioning enabled. - * + * * @param policyAgentAutoProvisioningFlag the policyAgentAutoProvisioningFlag value to set. * @return the DefenderForContainersGcpOffering object itself. */ - public DefenderForContainersGcpOffering withPolicyAgentAutoProvisioningFlag( - Boolean policyAgentAutoProvisioningFlag) { + public DefenderForContainersGcpOffering + withPolicyAgentAutoProvisioningFlag(Boolean policyAgentAutoProvisioningFlag) { this.policyAgentAutoProvisioningFlag = policyAgentAutoProvisioningFlag; return this; } + /** + * Get the mdcContainersImageAssessment property: The Microsoft Defender Container image assessment configuration. + * + * @return the mdcContainersImageAssessment value. + */ + public DefenderForContainersGcpOfferingMdcContainersImageAssessment mdcContainersImageAssessment() { + return this.mdcContainersImageAssessment; + } + + /** + * Set the mdcContainersImageAssessment property: The Microsoft Defender Container image assessment configuration. + * + * @param mdcContainersImageAssessment the mdcContainersImageAssessment value to set. + * @return the DefenderForContainersGcpOffering object itself. + */ + public DefenderForContainersGcpOffering withMdcContainersImageAssessment( + DefenderForContainersGcpOfferingMdcContainersImageAssessment mdcContainersImageAssessment) { + this.mdcContainersImageAssessment = mdcContainersImageAssessment; + return this; + } + + /** + * Get the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender Container agentless discovery + * configuration. + * + * @return the mdcContainersAgentlessDiscoveryK8S value. + */ + public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S() { + return this.mdcContainersAgentlessDiscoveryK8S; + } + + /** + * Set the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender Container agentless discovery + * configuration. + * + * @param mdcContainersAgentlessDiscoveryK8S the mdcContainersAgentlessDiscoveryK8S value to set. + * @return the DefenderForContainersGcpOffering object itself. + */ + public DefenderForContainersGcpOffering withMdcContainersAgentlessDiscoveryK8S( + DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S) { + this.mdcContainersAgentlessDiscoveryK8S = mdcContainersAgentlessDiscoveryK8S; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -168,5 +228,11 @@ public void validate() { if (dataPipelineNativeCloudConnection() != null) { dataPipelineNativeCloudConnection().validate(); } + if (mdcContainersImageAssessment() != null) { + mdcContainersImageAssessment().validate(); + } + if (mdcContainersAgentlessDiscoveryK8S() != null) { + mdcContainersAgentlessDiscoveryK8S().validate(); + } } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.java index 263ea9aa2cc4..be2aadb8c4e3 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The native cloud connection configuration. */ +/** + * The native cloud connection configuration. + */ @Fluent public final class DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection { /* @@ -22,14 +24,16 @@ public final class DefenderForContainersGcpOfferingDataPipelineNativeCloudConnec @JsonProperty(value = "workloadIdentityProviderId") private String workloadIdentityProviderId; - /** Creates an instance of DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection class. */ + /** + * Creates an instance of DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection class. + */ public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection() { } /** * Get the serviceAccountEmailAddress property: The data collection service account email address in GCP for this * offering. - * + * * @return the serviceAccountEmailAddress value. */ public String serviceAccountEmailAddress() { @@ -39,12 +43,12 @@ public String serviceAccountEmailAddress() { /** * Set the serviceAccountEmailAddress property: The data collection service account email address in GCP for this * offering. - * + * * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. * @return the DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection object itself. */ - public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection withServiceAccountEmailAddress( - String serviceAccountEmailAddress) { + public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection + withServiceAccountEmailAddress(String serviceAccountEmailAddress) { this.serviceAccountEmailAddress = serviceAccountEmailAddress; return this; } @@ -52,7 +56,7 @@ public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection withSer /** * Get the workloadIdentityProviderId property: The data collection GCP workload identity provider id for this * offering. - * + * * @return the workloadIdentityProviderId value. */ public String workloadIdentityProviderId() { @@ -62,19 +66,19 @@ public String workloadIdentityProviderId() { /** * Set the workloadIdentityProviderId property: The data collection GCP workload identity provider id for this * offering. - * + * * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. * @return the DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection object itself. */ - public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection withWorkloadIdentityProviderId( - String workloadIdentityProviderId) { + public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection + withWorkloadIdentityProviderId(String workloadIdentityProviderId) { this.workloadIdentityProviderId = workloadIdentityProviderId; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.java new file mode 100644 index 000000000000..826addd4b26e --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Microsoft Defender Container agentless discovery configuration. + */ +@Fluent +public final class DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S { + /* + * Is Microsoft Defender container agentless discovery enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The workload identity provider id in GCP for this feature + */ + @JsonProperty(value = "workloadIdentityProviderId") + private String workloadIdentityProviderId; + + /* + * The service account email address in GCP for this feature + */ + @JsonProperty(value = "serviceAccountEmailAddress") + private String serviceAccountEmailAddress; + + /** + * Creates an instance of DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S class. + */ + public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S() { + } + + /** + * Get the enabled property: Is Microsoft Defender container agentless discovery enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Is Microsoft Defender container agentless discovery enabled. + * + * @param enabled the enabled value to set. + * @return the DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S object itself. + */ + public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the workloadIdentityProviderId property: The workload identity provider id in GCP for this feature. + * + * @return the workloadIdentityProviderId value. + */ + public String workloadIdentityProviderId() { + return this.workloadIdentityProviderId; + } + + /** + * Set the workloadIdentityProviderId property: The workload identity provider id in GCP for this feature. + * + * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. + * @return the DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S object itself. + */ + public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S + withWorkloadIdentityProviderId(String workloadIdentityProviderId) { + this.workloadIdentityProviderId = workloadIdentityProviderId; + return this; + } + + /** + * Get the serviceAccountEmailAddress property: The service account email address in GCP for this feature. + * + * @return the serviceAccountEmailAddress value. + */ + public String serviceAccountEmailAddress() { + return this.serviceAccountEmailAddress; + } + + /** + * Set the serviceAccountEmailAddress property: The service account email address in GCP for this feature. + * + * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. + * @return the DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S object itself. + */ + public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S + withServiceAccountEmailAddress(String serviceAccountEmailAddress) { + this.serviceAccountEmailAddress = serviceAccountEmailAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.java new file mode 100644 index 000000000000..7d4321448bea --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Microsoft Defender Container image assessment configuration. + */ +@Fluent +public final class DefenderForContainersGcpOfferingMdcContainersImageAssessment { + /* + * Is Microsoft Defender container image assessment enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The workload identity provider id in GCP for this feature + */ + @JsonProperty(value = "workloadIdentityProviderId") + private String workloadIdentityProviderId; + + /* + * The service account email address in GCP for this feature + */ + @JsonProperty(value = "serviceAccountEmailAddress") + private String serviceAccountEmailAddress; + + /** + * Creates an instance of DefenderForContainersGcpOfferingMdcContainersImageAssessment class. + */ + public DefenderForContainersGcpOfferingMdcContainersImageAssessment() { + } + + /** + * Get the enabled property: Is Microsoft Defender container image assessment enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Is Microsoft Defender container image assessment enabled. + * + * @param enabled the enabled value to set. + * @return the DefenderForContainersGcpOfferingMdcContainersImageAssessment object itself. + */ + public DefenderForContainersGcpOfferingMdcContainersImageAssessment withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the workloadIdentityProviderId property: The workload identity provider id in GCP for this feature. + * + * @return the workloadIdentityProviderId value. + */ + public String workloadIdentityProviderId() { + return this.workloadIdentityProviderId; + } + + /** + * Set the workloadIdentityProviderId property: The workload identity provider id in GCP for this feature. + * + * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. + * @return the DefenderForContainersGcpOfferingMdcContainersImageAssessment object itself. + */ + public DefenderForContainersGcpOfferingMdcContainersImageAssessment + withWorkloadIdentityProviderId(String workloadIdentityProviderId) { + this.workloadIdentityProviderId = workloadIdentityProviderId; + return this; + } + + /** + * Get the serviceAccountEmailAddress property: The service account email address in GCP for this feature. + * + * @return the serviceAccountEmailAddress value. + */ + public String serviceAccountEmailAddress() { + return this.serviceAccountEmailAddress; + } + + /** + * Set the serviceAccountEmailAddress property: The service account email address in GCP for this feature. + * + * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. + * @return the DefenderForContainersGcpOfferingMdcContainersImageAssessment object itself. + */ + public DefenderForContainersGcpOfferingMdcContainersImageAssessment + withServiceAccountEmailAddress(String serviceAccountEmailAddress) { + this.serviceAccountEmailAddress = serviceAccountEmailAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingNativeCloudConnection.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingNativeCloudConnection.java index bc0088a59a9d..6cdcebcf95b7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingNativeCloudConnection.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForContainersGcpOfferingNativeCloudConnection.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The native cloud connection configuration. */ +/** + * The native cloud connection configuration. + */ @Fluent public final class DefenderForContainersGcpOfferingNativeCloudConnection { /* @@ -22,13 +24,15 @@ public final class DefenderForContainersGcpOfferingNativeCloudConnection { @JsonProperty(value = "workloadIdentityProviderId") private String workloadIdentityProviderId; - /** Creates an instance of DefenderForContainersGcpOfferingNativeCloudConnection class. */ + /** + * Creates an instance of DefenderForContainersGcpOfferingNativeCloudConnection class. + */ public DefenderForContainersGcpOfferingNativeCloudConnection() { } /** * Get the serviceAccountEmailAddress property: The service account email address in GCP for this offering. - * + * * @return the serviceAccountEmailAddress value. */ public String serviceAccountEmailAddress() { @@ -37,19 +41,19 @@ public String serviceAccountEmailAddress() { /** * Set the serviceAccountEmailAddress property: The service account email address in GCP for this offering. - * + * * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. * @return the DefenderForContainersGcpOfferingNativeCloudConnection object itself. */ - public DefenderForContainersGcpOfferingNativeCloudConnection withServiceAccountEmailAddress( - String serviceAccountEmailAddress) { + public DefenderForContainersGcpOfferingNativeCloudConnection + withServiceAccountEmailAddress(String serviceAccountEmailAddress) { this.serviceAccountEmailAddress = serviceAccountEmailAddress; return this; } /** * Get the workloadIdentityProviderId property: The GCP workload identity provider id for this offering. - * + * * @return the workloadIdentityProviderId value. */ public String workloadIdentityProviderId() { @@ -58,19 +62,19 @@ public String workloadIdentityProviderId() { /** * Set the workloadIdentityProviderId property: The GCP workload identity provider id for this offering. - * + * * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. * @return the DefenderForContainersGcpOfferingNativeCloudConnection object itself. */ - public DefenderForContainersGcpOfferingNativeCloudConnection withWorkloadIdentityProviderId( - String workloadIdentityProviderId) { + public DefenderForContainersGcpOfferingNativeCloudConnection + withWorkloadIdentityProviderId(String workloadIdentityProviderId) { this.workloadIdentityProviderId = workloadIdentityProviderId; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOffering.java index 0dc9a2ad7509..516ba4e4b86e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for Databases GCP offering configurations. */ +/** + * The Defender for Databases GCP offering configurations. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForDatabasesGcp") @Fluent @@ -24,16 +26,17 @@ public final class DefenderForDatabasesGcpOffering extends CloudOffering { * The native cloud connection configuration */ @JsonProperty(value = "defenderForDatabasesArcAutoProvisioning") - private DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning - defenderForDatabasesArcAutoProvisioning; + private DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning defenderForDatabasesArcAutoProvisioning; - /** Creates an instance of DefenderForDatabasesGcpOffering class. */ + /** + * Creates an instance of DefenderForDatabasesGcpOffering class. + */ public DefenderForDatabasesGcpOffering() { } /** * Get the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @return the arcAutoProvisioning value. */ public DefenderForDatabasesGcpOfferingArcAutoProvisioning arcAutoProvisioning() { @@ -42,19 +45,19 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioning arcAutoProvisioning() /** * Set the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @param arcAutoProvisioning the arcAutoProvisioning value to set. * @return the DefenderForDatabasesGcpOffering object itself. */ - public DefenderForDatabasesGcpOffering withArcAutoProvisioning( - DefenderForDatabasesGcpOfferingArcAutoProvisioning arcAutoProvisioning) { + public DefenderForDatabasesGcpOffering + withArcAutoProvisioning(DefenderForDatabasesGcpOfferingArcAutoProvisioning arcAutoProvisioning) { this.arcAutoProvisioning = arcAutoProvisioning; return this; } /** * Get the defenderForDatabasesArcAutoProvisioning property: The native cloud connection configuration. - * + * * @return the defenderForDatabasesArcAutoProvisioning value. */ public DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning @@ -64,20 +67,19 @@ public DefenderForDatabasesGcpOffering withArcAutoProvisioning( /** * Set the defenderForDatabasesArcAutoProvisioning property: The native cloud connection configuration. - * + * * @param defenderForDatabasesArcAutoProvisioning the defenderForDatabasesArcAutoProvisioning value to set. * @return the DefenderForDatabasesGcpOffering object itself. */ public DefenderForDatabasesGcpOffering withDefenderForDatabasesArcAutoProvisioning( - DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning - defenderForDatabasesArcAutoProvisioning) { + DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning defenderForDatabasesArcAutoProvisioning) { this.defenderForDatabasesArcAutoProvisioning = defenderForDatabasesArcAutoProvisioning; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java index a1af1380b1b1..a530e306c044 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ARC autoprovisioning configuration. */ +/** + * The ARC autoprovisioning configuration. + */ @Fluent public final class DefenderForDatabasesGcpOfferingArcAutoProvisioning { /* @@ -22,13 +24,15 @@ public final class DefenderForDatabasesGcpOfferingArcAutoProvisioning { @JsonProperty(value = "configuration") private DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configuration; - /** Creates an instance of DefenderForDatabasesGcpOfferingArcAutoProvisioning class. */ + /** + * Creates an instance of DefenderForDatabasesGcpOfferingArcAutoProvisioning class. + */ public DefenderForDatabasesGcpOfferingArcAutoProvisioning() { } /** * Get the enabled property: Is arc auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is arc auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForDatabasesGcpOfferingArcAutoProvisioning object itself. */ @@ -48,7 +52,7 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioning withEnabled(Boolean en /** * Get the configuration property: Configuration for servers Arc auto provisioning. - * + * * @return the configuration value. */ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configuration() { @@ -57,19 +61,19 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configura /** * Set the configuration property: Configuration for servers Arc auto provisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderForDatabasesGcpOfferingArcAutoProvisioning object itself. */ - public DefenderForDatabasesGcpOfferingArcAutoProvisioning withConfiguration( - DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configuration) { + public DefenderForDatabasesGcpOfferingArcAutoProvisioning + withConfiguration(DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.java index e44b9dc662fe..b9ab82a01006 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration for servers Arc auto provisioning. */ +/** + * Configuration for servers Arc auto provisioning. + */ @Fluent public final class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration { /* @@ -22,13 +24,15 @@ public final class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfigurati @JsonProperty(value = "privateLinkScope") private String privateLinkScope; - /** Creates an instance of DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration class. */ + /** + * Creates an instance of DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration class. + */ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() { } /** * Get the proxy property: Optional http proxy endpoint to use for the Arc agent. - * + * * @return the proxy value. */ public String proxy() { @@ -37,7 +41,7 @@ public String proxy() { /** * Set the proxy property: Optional http proxy endpoint to use for the Arc agent. - * + * * @param proxy the proxy value to set. * @return the DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration object itself. */ @@ -48,7 +52,7 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration withProxy /** * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @return the privateLinkScope value. */ public String privateLinkScope() { @@ -57,19 +61,19 @@ public String privateLinkScope() { /** * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @param privateLinkScope the privateLinkScope value to set. * @return the DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration object itself. */ - public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration withPrivateLinkScope( - String privateLinkScope) { + public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration + withPrivateLinkScope(String privateLinkScope) { this.privateLinkScope = privateLinkScope; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.java index 552d3f4dd765..c5b55c56eb26 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The native cloud connection configuration. */ +/** + * The native cloud connection configuration. + */ @Fluent public final class DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning { /* @@ -22,13 +24,15 @@ public final class DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoPro @JsonProperty(value = "workloadIdentityProviderId") private String workloadIdentityProviderId; - /** Creates an instance of DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning class. */ + /** + * Creates an instance of DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning class. + */ public DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning() { } /** * Get the serviceAccountEmailAddress property: The service account email address in GCP for this offering. - * + * * @return the serviceAccountEmailAddress value. */ public String serviceAccountEmailAddress() { @@ -37,19 +41,19 @@ public String serviceAccountEmailAddress() { /** * Set the serviceAccountEmailAddress property: The service account email address in GCP for this offering. - * + * * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. * @return the DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning object itself. */ - public DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning withServiceAccountEmailAddress( - String serviceAccountEmailAddress) { + public DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning + withServiceAccountEmailAddress(String serviceAccountEmailAddress) { this.serviceAccountEmailAddress = serviceAccountEmailAddress; return this; } /** * Get the workloadIdentityProviderId property: The GCP workload identity provider id for this offering. - * + * * @return the workloadIdentityProviderId value. */ public String workloadIdentityProviderId() { @@ -58,19 +62,19 @@ public String workloadIdentityProviderId() { /** * Set the workloadIdentityProviderId property: The GCP workload identity provider id for this offering. - * + * * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. * @return the DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning object itself. */ - public DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning withWorkloadIdentityProviderId( - String workloadIdentityProviderId) { + public DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning + withWorkloadIdentityProviderId(String workloadIdentityProviderId) { this.workloadIdentityProviderId = workloadIdentityProviderId; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsAzureDevOpsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsAzureDevOpsOffering.java index 841f54763380..baa72bbb6262 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsAzureDevOpsOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsAzureDevOpsOffering.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for DevOps for Azure DevOps offering. */ +/** + * The Defender for DevOps for Azure DevOps offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForDevOpsAzureDevOps") @Immutable public final class DefenderForDevOpsAzureDevOpsOffering extends CloudOffering { - /** Creates an instance of DefenderForDevOpsAzureDevOpsOffering class. */ + /** + * Creates an instance of DefenderForDevOpsAzureDevOpsOffering class. + */ public DefenderForDevOpsAzureDevOpsOffering() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGitLabOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGitLabOffering.java index e194b6df990b..a513bd44073e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGitLabOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGitLabOffering.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for DevOps for Gitlab offering. */ +/** + * The Defender for DevOps for Gitlab offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForDevOpsGitLab") @Immutable public final class DefenderForDevOpsGitLabOffering extends CloudOffering { - /** Creates an instance of DefenderForDevOpsGitLabOffering class. */ + /** + * Creates an instance of DefenderForDevOpsGitLabOffering class. + */ public DefenderForDevOpsGitLabOffering() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGithubOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGithubOffering.java index 22df7340c130..5c3790fd9d91 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGithubOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGithubOffering.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for DevOps for Github offering. */ +/** + * The Defender for DevOps for Github offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForDevOpsGithub") @Immutable public final class DefenderForDevOpsGithubOffering extends CloudOffering { - /** Creates an instance of DefenderForDevOpsGithubOffering class. */ + /** + * Creates an instance of DefenderForDevOpsGithubOffering class. + */ public DefenderForDevOpsGithubOffering() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOffering.java index e261069b5d20..5006235df374 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for Servers AWS offering. */ +/** + * The Defender for Servers AWS offering. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForServersAws") @Fluent @@ -50,13 +52,15 @@ public final class DefenderForServersAwsOffering extends CloudOffering { @JsonProperty(value = "vmScanners") private DefenderForServersAwsOfferingVmScanners vmScanners; - /** Creates an instance of DefenderForServersAwsOffering class. */ + /** + * Creates an instance of DefenderForServersAwsOffering class. + */ public DefenderForServersAwsOffering() { } /** * Get the defenderForServers property: The Defender for servers connection configuration. - * + * * @return the defenderForServers value. */ public DefenderForServersAwsOfferingDefenderForServers defenderForServers() { @@ -65,19 +69,19 @@ public DefenderForServersAwsOfferingDefenderForServers defenderForServers() { /** * Set the defenderForServers property: The Defender for servers connection configuration. - * + * * @param defenderForServers the defenderForServers value to set. * @return the DefenderForServersAwsOffering object itself. */ - public DefenderForServersAwsOffering withDefenderForServers( - DefenderForServersAwsOfferingDefenderForServers defenderForServers) { + public DefenderForServersAwsOffering + withDefenderForServers(DefenderForServersAwsOfferingDefenderForServers defenderForServers) { this.defenderForServers = defenderForServers; return this; } /** * Get the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @return the arcAutoProvisioning value. */ public DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning() { @@ -86,19 +90,19 @@ public DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning() { /** * Set the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @param arcAutoProvisioning the arcAutoProvisioning value to set. * @return the DefenderForServersAwsOffering object itself. */ - public DefenderForServersAwsOffering withArcAutoProvisioning( - DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning) { + public DefenderForServersAwsOffering + withArcAutoProvisioning(DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning) { this.arcAutoProvisioning = arcAutoProvisioning; return this; } /** * Get the vaAutoProvisioning property: The Vulnerability Assessment autoprovisioning configuration. - * + * * @return the vaAutoProvisioning value. */ public DefenderForServersAwsOfferingVaAutoProvisioning vaAutoProvisioning() { @@ -107,19 +111,19 @@ public DefenderForServersAwsOfferingVaAutoProvisioning vaAutoProvisioning() { /** * Set the vaAutoProvisioning property: The Vulnerability Assessment autoprovisioning configuration. - * + * * @param vaAutoProvisioning the vaAutoProvisioning value to set. * @return the DefenderForServersAwsOffering object itself. */ - public DefenderForServersAwsOffering withVaAutoProvisioning( - DefenderForServersAwsOfferingVaAutoProvisioning vaAutoProvisioning) { + public DefenderForServersAwsOffering + withVaAutoProvisioning(DefenderForServersAwsOfferingVaAutoProvisioning vaAutoProvisioning) { this.vaAutoProvisioning = vaAutoProvisioning; return this; } /** * Get the mdeAutoProvisioning property: The Microsoft Defender for Endpoint autoprovisioning configuration. - * + * * @return the mdeAutoProvisioning value. */ public DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning() { @@ -128,19 +132,19 @@ public DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning() { /** * Set the mdeAutoProvisioning property: The Microsoft Defender for Endpoint autoprovisioning configuration. - * + * * @param mdeAutoProvisioning the mdeAutoProvisioning value to set. * @return the DefenderForServersAwsOffering object itself. */ - public DefenderForServersAwsOffering withMdeAutoProvisioning( - DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning) { + public DefenderForServersAwsOffering + withMdeAutoProvisioning(DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning) { this.mdeAutoProvisioning = mdeAutoProvisioning; return this; } /** * Get the subPlan property: configuration for the servers offering subPlan. - * + * * @return the subPlan value. */ public DefenderForServersAwsOfferingSubPlan subPlan() { @@ -149,7 +153,7 @@ public DefenderForServersAwsOfferingSubPlan subPlan() { /** * Set the subPlan property: configuration for the servers offering subPlan. - * + * * @param subPlan the subPlan value to set. * @return the DefenderForServersAwsOffering object itself. */ @@ -160,7 +164,7 @@ public DefenderForServersAwsOffering withSubPlan(DefenderForServersAwsOfferingSu /** * Get the vmScanners property: The Microsoft Defender for Server VM scanning configuration. - * + * * @return the vmScanners value. */ public DefenderForServersAwsOfferingVmScanners vmScanners() { @@ -169,7 +173,7 @@ public DefenderForServersAwsOfferingVmScanners vmScanners() { /** * Set the vmScanners property: The Microsoft Defender for Server VM scanning configuration. - * + * * @param vmScanners the vmScanners value to set. * @return the DefenderForServersAwsOffering object itself. */ @@ -180,7 +184,7 @@ public DefenderForServersAwsOffering withVmScanners(DefenderForServersAwsOfferin /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java index 0d1ff8f1543e..b05c9ab0d386 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ARC autoprovisioning configuration. */ +/** + * The ARC autoprovisioning configuration. + */ @Fluent public final class DefenderForServersAwsOfferingArcAutoProvisioning { /* @@ -28,13 +30,15 @@ public final class DefenderForServersAwsOfferingArcAutoProvisioning { @JsonProperty(value = "configuration") private DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configuration; - /** Creates an instance of DefenderForServersAwsOfferingArcAutoProvisioning class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingArcAutoProvisioning class. + */ public DefenderForServersAwsOfferingArcAutoProvisioning() { } /** * Get the enabled property: Is arc auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -43,7 +47,7 @@ public Boolean enabled() { /** * Set the enabled property: Is arc auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersAwsOfferingArcAutoProvisioning object itself. */ @@ -54,7 +58,7 @@ public DefenderForServersAwsOfferingArcAutoProvisioning withEnabled(Boolean enab /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -63,7 +67,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForServersAwsOfferingArcAutoProvisioning object itself. */ @@ -74,7 +78,7 @@ public DefenderForServersAwsOfferingArcAutoProvisioning withCloudRoleArn(String /** * Get the configuration property: Configuration for servers Arc auto provisioning. - * + * * @return the configuration value. */ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configuration() { @@ -83,19 +87,19 @@ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configurati /** * Set the configuration property: Configuration for servers Arc auto provisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersAwsOfferingArcAutoProvisioning object itself. */ - public DefenderForServersAwsOfferingArcAutoProvisioning withConfiguration( - DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configuration) { + public DefenderForServersAwsOfferingArcAutoProvisioning + withConfiguration(DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.java index 327bf081344c..6f7d1336ac19 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration for servers Arc auto provisioning. */ +/** + * Configuration for servers Arc auto provisioning. + */ @Fluent public final class DefenderForServersAwsOfferingArcAutoProvisioningConfiguration { /* @@ -22,13 +24,15 @@ public final class DefenderForServersAwsOfferingArcAutoProvisioningConfiguration @JsonProperty(value = "privateLinkScope") private String privateLinkScope; - /** Creates an instance of DefenderForServersAwsOfferingArcAutoProvisioningConfiguration class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingArcAutoProvisioningConfiguration class. + */ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration() { } /** * Get the proxy property: Optional HTTP proxy endpoint to use for the Arc agent. - * + * * @return the proxy value. */ public String proxy() { @@ -37,7 +41,7 @@ public String proxy() { /** * Set the proxy property: Optional HTTP proxy endpoint to use for the Arc agent. - * + * * @param proxy the proxy value to set. * @return the DefenderForServersAwsOfferingArcAutoProvisioningConfiguration object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration withProxy(S /** * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @return the privateLinkScope value. */ public String privateLinkScope() { @@ -57,7 +61,7 @@ public String privateLinkScope() { /** * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @param privateLinkScope the privateLinkScope value to set. * @return the DefenderForServersAwsOfferingArcAutoProvisioningConfiguration object itself. */ @@ -68,7 +72,7 @@ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration withPrivate /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingDefenderForServers.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingDefenderForServers.java index aa05784fa66b..98df7fa47fe8 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingDefenderForServers.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingDefenderForServers.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Defender for servers connection configuration. */ +/** + * The Defender for servers connection configuration. + */ @Fluent public final class DefenderForServersAwsOfferingDefenderForServers { /* @@ -16,13 +18,15 @@ public final class DefenderForServersAwsOfferingDefenderForServers { @JsonProperty(value = "cloudRoleArn") private String cloudRoleArn; - /** Creates an instance of DefenderForServersAwsOfferingDefenderForServers class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingDefenderForServers class. + */ public DefenderForServersAwsOfferingDefenderForServers() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -31,7 +35,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForServersAwsOfferingDefenderForServers object itself. */ @@ -42,7 +46,7 @@ public DefenderForServersAwsOfferingDefenderForServers withCloudRoleArn(String c /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingMdeAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingMdeAutoProvisioning.java index 0bef82c51ccb..44d32a6f8ef5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingMdeAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingMdeAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Microsoft Defender for Endpoint autoprovisioning configuration. */ +/** + * The Microsoft Defender for Endpoint autoprovisioning configuration. + */ @Fluent public final class DefenderForServersAwsOfferingMdeAutoProvisioning { /* @@ -22,13 +24,15 @@ public final class DefenderForServersAwsOfferingMdeAutoProvisioning { @JsonProperty(value = "configuration") private Object configuration; - /** Creates an instance of DefenderForServersAwsOfferingMdeAutoProvisioning class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingMdeAutoProvisioning class. + */ public DefenderForServersAwsOfferingMdeAutoProvisioning() { } /** * Get the enabled property: Is Microsoft Defender for Endpoint auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Microsoft Defender for Endpoint auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersAwsOfferingMdeAutoProvisioning object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersAwsOfferingMdeAutoProvisioning withEnabled(Boolean enab /** * Get the configuration property: configuration for Microsoft Defender for Endpoint autoprovisioning. - * + * * @return the configuration value. */ public Object configuration() { @@ -57,7 +61,7 @@ public Object configuration() { /** * Set the configuration property: configuration for Microsoft Defender for Endpoint autoprovisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersAwsOfferingMdeAutoProvisioning object itself. */ @@ -68,7 +72,7 @@ public DefenderForServersAwsOfferingMdeAutoProvisioning withConfiguration(Object /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingSubPlan.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingSubPlan.java index b9f80ce25dca..0c4a52d24226 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingSubPlan.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingSubPlan.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** configuration for the servers offering subPlan. */ +/** + * configuration for the servers offering subPlan. + */ @Fluent public final class DefenderForServersAwsOfferingSubPlan { /* @@ -16,13 +18,15 @@ public final class DefenderForServersAwsOfferingSubPlan { @JsonProperty(value = "type") private SubPlan type; - /** Creates an instance of DefenderForServersAwsOfferingSubPlan class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingSubPlan class. + */ public DefenderForServersAwsOfferingSubPlan() { } /** * Get the type property: The available sub plans. - * + * * @return the type value. */ public SubPlan type() { @@ -31,7 +35,7 @@ public SubPlan type() { /** * Set the type property: The available sub plans. - * + * * @param type the type value to set. * @return the DefenderForServersAwsOfferingSubPlan object itself. */ @@ -42,7 +46,7 @@ public DefenderForServersAwsOfferingSubPlan withType(SubPlan type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioning.java index ec83a52f46eb..f0e803a21b44 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Vulnerability Assessment autoprovisioning configuration. */ +/** + * The Vulnerability Assessment autoprovisioning configuration. + */ @Fluent public final class DefenderForServersAwsOfferingVaAutoProvisioning { /* @@ -22,13 +24,15 @@ public final class DefenderForServersAwsOfferingVaAutoProvisioning { @JsonProperty(value = "configuration") private DefenderForServersAwsOfferingVaAutoProvisioningConfiguration configuration; - /** Creates an instance of DefenderForServersAwsOfferingVaAutoProvisioning class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingVaAutoProvisioning class. + */ public DefenderForServersAwsOfferingVaAutoProvisioning() { } /** * Get the enabled property: Is Vulnerability Assessment auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Vulnerability Assessment auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersAwsOfferingVaAutoProvisioning object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersAwsOfferingVaAutoProvisioning withEnabled(Boolean enabl /** * Get the configuration property: configuration for Vulnerability Assessment autoprovisioning. - * + * * @return the configuration value. */ public DefenderForServersAwsOfferingVaAutoProvisioningConfiguration configuration() { @@ -57,19 +61,19 @@ public DefenderForServersAwsOfferingVaAutoProvisioningConfiguration configuratio /** * Set the configuration property: configuration for Vulnerability Assessment autoprovisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersAwsOfferingVaAutoProvisioning object itself. */ - public DefenderForServersAwsOfferingVaAutoProvisioning withConfiguration( - DefenderForServersAwsOfferingVaAutoProvisioningConfiguration configuration) { + public DefenderForServersAwsOfferingVaAutoProvisioning + withConfiguration(DefenderForServersAwsOfferingVaAutoProvisioningConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.java index 1afa0a454e4c..4f2d54b3101d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** configuration for Vulnerability Assessment autoprovisioning. */ +/** + * configuration for Vulnerability Assessment autoprovisioning. + */ @Fluent public final class DefenderForServersAwsOfferingVaAutoProvisioningConfiguration { /* @@ -16,13 +18,15 @@ public final class DefenderForServersAwsOfferingVaAutoProvisioningConfiguration @JsonProperty(value = "type") private Type type; - /** Creates an instance of DefenderForServersAwsOfferingVaAutoProvisioningConfiguration class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingVaAutoProvisioningConfiguration class. + */ public DefenderForServersAwsOfferingVaAutoProvisioningConfiguration() { } /** * Get the type property: The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'. - * + * * @return the type value. */ public Type type() { @@ -31,7 +35,7 @@ public Type type() { /** * Set the type property: The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'. - * + * * @param type the type value to set. * @return the DefenderForServersAwsOfferingVaAutoProvisioningConfiguration object itself. */ @@ -42,7 +46,7 @@ public DefenderForServersAwsOfferingVaAutoProvisioningConfiguration withType(Typ /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScanners.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScanners.java index bc3612691f4e..29c7e1e4184d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScanners.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScanners.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Microsoft Defender for Server VM scanning configuration. */ +/** + * The Microsoft Defender for Server VM scanning configuration. + */ @Fluent public final class DefenderForServersAwsOfferingVmScanners { /* @@ -22,13 +24,15 @@ public final class DefenderForServersAwsOfferingVmScanners { @JsonProperty(value = "configuration") private DefenderForServersAwsOfferingVmScannersConfiguration configuration; - /** Creates an instance of DefenderForServersAwsOfferingVmScanners class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingVmScanners class. + */ public DefenderForServersAwsOfferingVmScanners() { } /** * Get the enabled property: Is Microsoft Defender for Server VM scanning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Microsoft Defender for Server VM scanning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersAwsOfferingVmScanners object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersAwsOfferingVmScanners withEnabled(Boolean enabled) { /** * Get the configuration property: configuration for Microsoft Defender for Server VM scanning. - * + * * @return the configuration value. */ public DefenderForServersAwsOfferingVmScannersConfiguration configuration() { @@ -57,19 +61,19 @@ public DefenderForServersAwsOfferingVmScannersConfiguration configuration() { /** * Set the configuration property: configuration for Microsoft Defender for Server VM scanning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersAwsOfferingVmScanners object itself. */ - public DefenderForServersAwsOfferingVmScanners withConfiguration( - DefenderForServersAwsOfferingVmScannersConfiguration configuration) { + public DefenderForServersAwsOfferingVmScanners + withConfiguration(DefenderForServersAwsOfferingVmScannersConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java index 0d8b78178250..aded5d5c2c08 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** configuration for Microsoft Defender for Server VM scanning. */ +/** + * configuration for Microsoft Defender for Server VM scanning. + */ @Fluent public final class DefenderForServersAwsOfferingVmScannersConfiguration { /* @@ -31,13 +33,15 @@ public final class DefenderForServersAwsOfferingVmScannersConfiguration { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map exclusionTags; - /** Creates an instance of DefenderForServersAwsOfferingVmScannersConfiguration class. */ + /** + * Creates an instance of DefenderForServersAwsOfferingVmScannersConfiguration class. + */ public DefenderForServersAwsOfferingVmScannersConfiguration() { } /** * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @return the cloudRoleArn value. */ public String cloudRoleArn() { @@ -46,7 +50,7 @@ public String cloudRoleArn() { /** * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature. - * + * * @param cloudRoleArn the cloudRoleArn value to set. * @return the DefenderForServersAwsOfferingVmScannersConfiguration object itself. */ @@ -57,7 +61,7 @@ public DefenderForServersAwsOfferingVmScannersConfiguration withCloudRoleArn(Str /** * Get the scanningMode property: The scanning mode for the VM scan. - * + * * @return the scanningMode value. */ public ScanningMode scanningMode() { @@ -66,7 +70,7 @@ public ScanningMode scanningMode() { /** * Set the scanningMode property: The scanning mode for the VM scan. - * + * * @param scanningMode the scanningMode value to set. * @return the DefenderForServersAwsOfferingVmScannersConfiguration object itself. */ @@ -77,7 +81,7 @@ public DefenderForServersAwsOfferingVmScannersConfiguration withScanningMode(Sca /** * Get the exclusionTags property: VM tags that indicates that VM should not be scanned. - * + * * @return the exclusionTags value. */ public Map exclusionTags() { @@ -86,7 +90,7 @@ public Map exclusionTags() { /** * Set the exclusionTags property: VM tags that indicates that VM should not be scanned. - * + * * @param exclusionTags the exclusionTags value to set. * @return the DefenderForServersAwsOfferingVmScannersConfiguration object itself. */ @@ -97,7 +101,7 @@ public DefenderForServersAwsOfferingVmScannersConfiguration withExclusionTags(Ma /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java index 336fa465a9c9..1c02333bbcde 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Defender for Servers GCP offering configurations. */ +/** + * The Defender for Servers GCP offering configurations. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType") @JsonTypeName("DefenderForServersGcp") @Fluent @@ -50,13 +52,15 @@ public final class DefenderForServersGcpOffering extends CloudOffering { @JsonProperty(value = "vmScanners") private DefenderForServersGcpOfferingVmScanners vmScanners; - /** Creates an instance of DefenderForServersGcpOffering class. */ + /** + * Creates an instance of DefenderForServersGcpOffering class. + */ public DefenderForServersGcpOffering() { } /** * Get the defenderForServers property: The Defender for servers connection configuration. - * + * * @return the defenderForServers value. */ public DefenderForServersGcpOfferingDefenderForServers defenderForServers() { @@ -65,19 +69,19 @@ public DefenderForServersGcpOfferingDefenderForServers defenderForServers() { /** * Set the defenderForServers property: The Defender for servers connection configuration. - * + * * @param defenderForServers the defenderForServers value to set. * @return the DefenderForServersGcpOffering object itself. */ - public DefenderForServersGcpOffering withDefenderForServers( - DefenderForServersGcpOfferingDefenderForServers defenderForServers) { + public DefenderForServersGcpOffering + withDefenderForServers(DefenderForServersGcpOfferingDefenderForServers defenderForServers) { this.defenderForServers = defenderForServers; return this; } /** * Get the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @return the arcAutoProvisioning value. */ public DefenderForServersGcpOfferingArcAutoProvisioning arcAutoProvisioning() { @@ -86,19 +90,19 @@ public DefenderForServersGcpOfferingArcAutoProvisioning arcAutoProvisioning() { /** * Set the arcAutoProvisioning property: The ARC autoprovisioning configuration. - * + * * @param arcAutoProvisioning the arcAutoProvisioning value to set. * @return the DefenderForServersGcpOffering object itself. */ - public DefenderForServersGcpOffering withArcAutoProvisioning( - DefenderForServersGcpOfferingArcAutoProvisioning arcAutoProvisioning) { + public DefenderForServersGcpOffering + withArcAutoProvisioning(DefenderForServersGcpOfferingArcAutoProvisioning arcAutoProvisioning) { this.arcAutoProvisioning = arcAutoProvisioning; return this; } /** * Get the vaAutoProvisioning property: The Vulnerability Assessment autoprovisioning configuration. - * + * * @return the vaAutoProvisioning value. */ public DefenderForServersGcpOfferingVaAutoProvisioning vaAutoProvisioning() { @@ -107,19 +111,19 @@ public DefenderForServersGcpOfferingVaAutoProvisioning vaAutoProvisioning() { /** * Set the vaAutoProvisioning property: The Vulnerability Assessment autoprovisioning configuration. - * + * * @param vaAutoProvisioning the vaAutoProvisioning value to set. * @return the DefenderForServersGcpOffering object itself. */ - public DefenderForServersGcpOffering withVaAutoProvisioning( - DefenderForServersGcpOfferingVaAutoProvisioning vaAutoProvisioning) { + public DefenderForServersGcpOffering + withVaAutoProvisioning(DefenderForServersGcpOfferingVaAutoProvisioning vaAutoProvisioning) { this.vaAutoProvisioning = vaAutoProvisioning; return this; } /** * Get the mdeAutoProvisioning property: The Microsoft Defender for Endpoint autoprovisioning configuration. - * + * * @return the mdeAutoProvisioning value. */ public DefenderForServersGcpOfferingMdeAutoProvisioning mdeAutoProvisioning() { @@ -128,19 +132,19 @@ public DefenderForServersGcpOfferingMdeAutoProvisioning mdeAutoProvisioning() { /** * Set the mdeAutoProvisioning property: The Microsoft Defender for Endpoint autoprovisioning configuration. - * + * * @param mdeAutoProvisioning the mdeAutoProvisioning value to set. * @return the DefenderForServersGcpOffering object itself. */ - public DefenderForServersGcpOffering withMdeAutoProvisioning( - DefenderForServersGcpOfferingMdeAutoProvisioning mdeAutoProvisioning) { + public DefenderForServersGcpOffering + withMdeAutoProvisioning(DefenderForServersGcpOfferingMdeAutoProvisioning mdeAutoProvisioning) { this.mdeAutoProvisioning = mdeAutoProvisioning; return this; } /** * Get the subPlan property: configuration for the servers offering subPlan. - * + * * @return the subPlan value. */ public DefenderForServersGcpOfferingSubPlan subPlan() { @@ -149,7 +153,7 @@ public DefenderForServersGcpOfferingSubPlan subPlan() { /** * Set the subPlan property: configuration for the servers offering subPlan. - * + * * @param subPlan the subPlan value to set. * @return the DefenderForServersGcpOffering object itself. */ @@ -160,7 +164,7 @@ public DefenderForServersGcpOffering withSubPlan(DefenderForServersGcpOfferingSu /** * Get the vmScanners property: The Microsoft Defender for Server VM scanning configuration. - * + * * @return the vmScanners value. */ public DefenderForServersGcpOfferingVmScanners vmScanners() { @@ -169,7 +173,7 @@ public DefenderForServersGcpOfferingVmScanners vmScanners() { /** * Set the vmScanners property: The Microsoft Defender for Server VM scanning configuration. - * + * * @param vmScanners the vmScanners value to set. * @return the DefenderForServersGcpOffering object itself. */ @@ -180,7 +184,7 @@ public DefenderForServersGcpOffering withVmScanners(DefenderForServersGcpOfferin /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java index 62a8766f49c5..0063ee864c6c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ARC autoprovisioning configuration. */ +/** + * The ARC autoprovisioning configuration. + */ @Fluent public final class DefenderForServersGcpOfferingArcAutoProvisioning { /* @@ -22,13 +24,15 @@ public final class DefenderForServersGcpOfferingArcAutoProvisioning { @JsonProperty(value = "configuration") private DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configuration; - /** Creates an instance of DefenderForServersGcpOfferingArcAutoProvisioning class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingArcAutoProvisioning class. + */ public DefenderForServersGcpOfferingArcAutoProvisioning() { } /** * Get the enabled property: Is arc auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is arc auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersGcpOfferingArcAutoProvisioning object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersGcpOfferingArcAutoProvisioning withEnabled(Boolean enab /** * Get the configuration property: Configuration for servers Arc auto provisioning. - * + * * @return the configuration value. */ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configuration() { @@ -57,19 +61,19 @@ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configurati /** * Set the configuration property: Configuration for servers Arc auto provisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersGcpOfferingArcAutoProvisioning object itself. */ - public DefenderForServersGcpOfferingArcAutoProvisioning withConfiguration( - DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configuration) { + public DefenderForServersGcpOfferingArcAutoProvisioning + withConfiguration(DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.java index ff5655dfab0a..bff15ad5ccf7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration for servers Arc auto provisioning. */ +/** + * Configuration for servers Arc auto provisioning. + */ @Fluent public final class DefenderForServersGcpOfferingArcAutoProvisioningConfiguration { /* @@ -22,13 +24,15 @@ public final class DefenderForServersGcpOfferingArcAutoProvisioningConfiguration @JsonProperty(value = "privateLinkScope") private String privateLinkScope; - /** Creates an instance of DefenderForServersGcpOfferingArcAutoProvisioningConfiguration class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingArcAutoProvisioningConfiguration class. + */ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration() { } /** * Get the proxy property: Optional HTTP proxy endpoint to use for the Arc agent. - * + * * @return the proxy value. */ public String proxy() { @@ -37,7 +41,7 @@ public String proxy() { /** * Set the proxy property: Optional HTTP proxy endpoint to use for the Arc agent. - * + * * @param proxy the proxy value to set. * @return the DefenderForServersGcpOfferingArcAutoProvisioningConfiguration object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration withProxy(S /** * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @return the privateLinkScope value. */ public String privateLinkScope() { @@ -57,7 +61,7 @@ public String privateLinkScope() { /** * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent. - * + * * @param privateLinkScope the privateLinkScope value to set. * @return the DefenderForServersGcpOfferingArcAutoProvisioningConfiguration object itself. */ @@ -68,7 +72,7 @@ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration withPrivate /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingDefenderForServers.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingDefenderForServers.java index 1533e9171d67..64fd7880fb15 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingDefenderForServers.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingDefenderForServers.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Defender for servers connection configuration. */ +/** + * The Defender for servers connection configuration. + */ @Fluent public final class DefenderForServersGcpOfferingDefenderForServers { /* @@ -22,13 +24,15 @@ public final class DefenderForServersGcpOfferingDefenderForServers { @JsonProperty(value = "serviceAccountEmailAddress") private String serviceAccountEmailAddress; - /** Creates an instance of DefenderForServersGcpOfferingDefenderForServers class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingDefenderForServers class. + */ public DefenderForServersGcpOfferingDefenderForServers() { } /** * Get the workloadIdentityProviderId property: The workload identity provider id in GCP for this feature. - * + * * @return the workloadIdentityProviderId value. */ public String workloadIdentityProviderId() { @@ -37,19 +41,19 @@ public String workloadIdentityProviderId() { /** * Set the workloadIdentityProviderId property: The workload identity provider id in GCP for this feature. - * + * * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. * @return the DefenderForServersGcpOfferingDefenderForServers object itself. */ - public DefenderForServersGcpOfferingDefenderForServers withWorkloadIdentityProviderId( - String workloadIdentityProviderId) { + public DefenderForServersGcpOfferingDefenderForServers + withWorkloadIdentityProviderId(String workloadIdentityProviderId) { this.workloadIdentityProviderId = workloadIdentityProviderId; return this; } /** * Get the serviceAccountEmailAddress property: The service account email address in GCP for this feature. - * + * * @return the serviceAccountEmailAddress value. */ public String serviceAccountEmailAddress() { @@ -58,19 +62,19 @@ public String serviceAccountEmailAddress() { /** * Set the serviceAccountEmailAddress property: The service account email address in GCP for this feature. - * + * * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. * @return the DefenderForServersGcpOfferingDefenderForServers object itself. */ - public DefenderForServersGcpOfferingDefenderForServers withServiceAccountEmailAddress( - String serviceAccountEmailAddress) { + public DefenderForServersGcpOfferingDefenderForServers + withServiceAccountEmailAddress(String serviceAccountEmailAddress) { this.serviceAccountEmailAddress = serviceAccountEmailAddress; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingMdeAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingMdeAutoProvisioning.java index 51bb24407416..f99c83dc070c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingMdeAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingMdeAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Microsoft Defender for Endpoint autoprovisioning configuration. */ +/** + * The Microsoft Defender for Endpoint autoprovisioning configuration. + */ @Fluent public final class DefenderForServersGcpOfferingMdeAutoProvisioning { /* @@ -22,13 +24,15 @@ public final class DefenderForServersGcpOfferingMdeAutoProvisioning { @JsonProperty(value = "configuration") private Object configuration; - /** Creates an instance of DefenderForServersGcpOfferingMdeAutoProvisioning class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingMdeAutoProvisioning class. + */ public DefenderForServersGcpOfferingMdeAutoProvisioning() { } /** * Get the enabled property: Is Microsoft Defender for Endpoint auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Microsoft Defender for Endpoint auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersGcpOfferingMdeAutoProvisioning object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersGcpOfferingMdeAutoProvisioning withEnabled(Boolean enab /** * Get the configuration property: configuration for Microsoft Defender for Endpoint autoprovisioning. - * + * * @return the configuration value. */ public Object configuration() { @@ -57,7 +61,7 @@ public Object configuration() { /** * Set the configuration property: configuration for Microsoft Defender for Endpoint autoprovisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersGcpOfferingMdeAutoProvisioning object itself. */ @@ -68,7 +72,7 @@ public DefenderForServersGcpOfferingMdeAutoProvisioning withConfiguration(Object /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingSubPlan.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingSubPlan.java index 22ba934ffb52..805e38440176 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingSubPlan.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingSubPlan.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** configuration for the servers offering subPlan. */ +/** + * configuration for the servers offering subPlan. + */ @Fluent public final class DefenderForServersGcpOfferingSubPlan { /* @@ -16,13 +18,15 @@ public final class DefenderForServersGcpOfferingSubPlan { @JsonProperty(value = "type") private SubPlan type; - /** Creates an instance of DefenderForServersGcpOfferingSubPlan class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingSubPlan class. + */ public DefenderForServersGcpOfferingSubPlan() { } /** * Get the type property: The available sub plans. - * + * * @return the type value. */ public SubPlan type() { @@ -31,7 +35,7 @@ public SubPlan type() { /** * Set the type property: The available sub plans. - * + * * @param type the type value to set. * @return the DefenderForServersGcpOfferingSubPlan object itself. */ @@ -42,7 +46,7 @@ public DefenderForServersGcpOfferingSubPlan withType(SubPlan type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioning.java index f6b41f749fd8..add710540f99 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioning.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioning.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Vulnerability Assessment autoprovisioning configuration. */ +/** + * The Vulnerability Assessment autoprovisioning configuration. + */ @Fluent public final class DefenderForServersGcpOfferingVaAutoProvisioning { /* @@ -22,13 +24,15 @@ public final class DefenderForServersGcpOfferingVaAutoProvisioning { @JsonProperty(value = "configuration") private DefenderForServersGcpOfferingVaAutoProvisioningConfiguration configuration; - /** Creates an instance of DefenderForServersGcpOfferingVaAutoProvisioning class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingVaAutoProvisioning class. + */ public DefenderForServersGcpOfferingVaAutoProvisioning() { } /** * Get the enabled property: Is Vulnerability Assessment auto provisioning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Vulnerability Assessment auto provisioning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersGcpOfferingVaAutoProvisioning object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersGcpOfferingVaAutoProvisioning withEnabled(Boolean enabl /** * Get the configuration property: configuration for Vulnerability Assessment autoprovisioning. - * + * * @return the configuration value. */ public DefenderForServersGcpOfferingVaAutoProvisioningConfiguration configuration() { @@ -57,19 +61,19 @@ public DefenderForServersGcpOfferingVaAutoProvisioningConfiguration configuratio /** * Set the configuration property: configuration for Vulnerability Assessment autoprovisioning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersGcpOfferingVaAutoProvisioning object itself. */ - public DefenderForServersGcpOfferingVaAutoProvisioning withConfiguration( - DefenderForServersGcpOfferingVaAutoProvisioningConfiguration configuration) { + public DefenderForServersGcpOfferingVaAutoProvisioning + withConfiguration(DefenderForServersGcpOfferingVaAutoProvisioningConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.java index 4c51b2de7748..afceeffabd35 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** configuration for Vulnerability Assessment autoprovisioning. */ +/** + * configuration for Vulnerability Assessment autoprovisioning. + */ @Fluent public final class DefenderForServersGcpOfferingVaAutoProvisioningConfiguration { /* @@ -16,13 +18,15 @@ public final class DefenderForServersGcpOfferingVaAutoProvisioningConfiguration @JsonProperty(value = "type") private Type type; - /** Creates an instance of DefenderForServersGcpOfferingVaAutoProvisioningConfiguration class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingVaAutoProvisioningConfiguration class. + */ public DefenderForServersGcpOfferingVaAutoProvisioningConfiguration() { } /** * Get the type property: The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'. - * + * * @return the type value. */ public Type type() { @@ -31,7 +35,7 @@ public Type type() { /** * Set the type property: The Vulnerability Assessment solution to be provisioned. Can be either 'TVM' or 'Qualys'. - * + * * @param type the type value to set. * @return the DefenderForServersGcpOfferingVaAutoProvisioningConfiguration object itself. */ @@ -42,7 +46,7 @@ public DefenderForServersGcpOfferingVaAutoProvisioningConfiguration withType(Typ /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScanners.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScanners.java index d530ace03cb6..067d8b5669a2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScanners.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScanners.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Microsoft Defender for Server VM scanning configuration. */ +/** + * The Microsoft Defender for Server VM scanning configuration. + */ @Fluent public final class DefenderForServersGcpOfferingVmScanners { /* @@ -22,13 +24,15 @@ public final class DefenderForServersGcpOfferingVmScanners { @JsonProperty(value = "configuration") private DefenderForServersGcpOfferingVmScannersConfiguration configuration; - /** Creates an instance of DefenderForServersGcpOfferingVmScanners class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingVmScanners class. + */ public DefenderForServersGcpOfferingVmScanners() { } /** * Get the enabled property: Is Microsoft Defender for Server VM scanning enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -37,7 +41,7 @@ public Boolean enabled() { /** * Set the enabled property: Is Microsoft Defender for Server VM scanning enabled. - * + * * @param enabled the enabled value to set. * @return the DefenderForServersGcpOfferingVmScanners object itself. */ @@ -48,7 +52,7 @@ public DefenderForServersGcpOfferingVmScanners withEnabled(Boolean enabled) { /** * Get the configuration property: configuration for Microsoft Defender for Server VM scanning. - * + * * @return the configuration value. */ public DefenderForServersGcpOfferingVmScannersConfiguration configuration() { @@ -57,19 +61,19 @@ public DefenderForServersGcpOfferingVmScannersConfiguration configuration() { /** * Set the configuration property: configuration for Microsoft Defender for Server VM scanning. - * + * * @param configuration the configuration value to set. * @return the DefenderForServersGcpOfferingVmScanners object itself. */ - public DefenderForServersGcpOfferingVmScanners withConfiguration( - DefenderForServersGcpOfferingVmScannersConfiguration configuration) { + public DefenderForServersGcpOfferingVmScanners + withConfiguration(DefenderForServersGcpOfferingVmScannersConfiguration configuration) { this.configuration = configuration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScannersConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScannersConfiguration.java index aedf865b1f86..0dd6d187d698 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScannersConfiguration.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScannersConfiguration.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** configuration for Microsoft Defender for Server VM scanning. */ +/** + * configuration for Microsoft Defender for Server VM scanning. + */ @Fluent public final class DefenderForServersGcpOfferingVmScannersConfiguration { /* @@ -25,13 +27,15 @@ public final class DefenderForServersGcpOfferingVmScannersConfiguration { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map exclusionTags; - /** Creates an instance of DefenderForServersGcpOfferingVmScannersConfiguration class. */ + /** + * Creates an instance of DefenderForServersGcpOfferingVmScannersConfiguration class. + */ public DefenderForServersGcpOfferingVmScannersConfiguration() { } /** * Get the scanningMode property: The scanning mode for the VM scan. - * + * * @return the scanningMode value. */ public ScanningMode scanningMode() { @@ -40,7 +44,7 @@ public ScanningMode scanningMode() { /** * Set the scanningMode property: The scanning mode for the VM scan. - * + * * @param scanningMode the scanningMode value to set. * @return the DefenderForServersGcpOfferingVmScannersConfiguration object itself. */ @@ -51,7 +55,7 @@ public DefenderForServersGcpOfferingVmScannersConfiguration withScanningMode(Sca /** * Get the exclusionTags property: VM tags that indicate that VM should not be scanned. - * + * * @return the exclusionTags value. */ public Map exclusionTags() { @@ -60,7 +64,7 @@ public Map exclusionTags() { /** * Set the exclusionTags property: VM tags that indicate that VM should not be scanned. - * + * * @param exclusionTags the exclusionTags value to set. * @return the DefenderForServersGcpOfferingVmScannersConfiguration object itself. */ @@ -71,7 +75,7 @@ public DefenderForServersGcpOfferingVmScannersConfiguration withExclusionTags(Ma /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorageSetting.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorageSetting.java new file mode 100644 index 000000000000..24ec7a8744bc --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorageSetting.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.DefenderForStorageSettingInner; + +/** + * An immutable client-side representation of DefenderForStorageSetting. + */ +public interface DefenderForStorageSetting { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the isEnabled property: Indicates whether Defender for Storage is enabled on this storage account. + * + * @return the isEnabled value. + */ + Boolean isEnabled(); + + /** + * Gets the overrideSubscriptionLevelSettings property: Indicates whether the settings defined for this storage + * account should override the settings defined for the subscription. + * + * @return the overrideSubscriptionLevelSettings value. + */ + Boolean overrideSubscriptionLevelSettings(); + + /** + * Gets the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic to send scan + * results to. + * + * @return the scanResultsEventGridTopicResourceId value. + */ + String scanResultsEventGridTopicResourceId(); + + /** + * Gets the operationStatus property: Upon failure or partial success. Additional data describing Malware Scanning + * enable/disable operation. + * + * @return the operationStatus value. + */ + OperationStatus operationStatus(); + + /** + * Gets the isEnabledMalwareScanningIsEnabled property: Indicates whether On Upload malware scanning should be + * enabled. + * + * @return the isEnabledMalwareScanningIsEnabled value. + */ + Boolean isEnabledMalwareScanningIsEnabled(); + + /** + * Gets the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * + * @return the capGBPerMonth value. + */ + Integer capGBPerMonth(); + + /** + * Gets the isEnabledSensitiveDataDiscoveryIsEnabled property: Indicates whether Sensitive Data Discovery should be + * enabled. + * + * @return the isEnabledSensitiveDataDiscoveryIsEnabled value. + */ + Boolean isEnabledSensitiveDataDiscoveryIsEnabled(); + + /** + * Gets the operationStatusSensitiveDataDiscoveryOperationStatus property: Upon failure or partial success. + * Additional data describing Sensitive Data Discovery enable/disable operation. + * + * @return the operationStatusSensitiveDataDiscoveryOperationStatus value. + */ + OperationStatus operationStatusSensitiveDataDiscoveryOperationStatus(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.DefenderForStorageSettingInner object. + * + * @return the inner object. + */ + DefenderForStorageSettingInner innerModel(); + + /** + * The entirety of the DefenderForStorageSetting definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate { + } + + /** + * The DefenderForStorageSetting definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DefenderForStorageSetting definition. + */ + interface Blank extends WithScope { + } + + /** + * The stage of the DefenderForStorageSetting definition allowing to specify parent resource. + */ + interface WithScope { + /** + * Specifies resourceId. + * + * @param resourceId The identifier of the resource. + * @return the next definition stage. + */ + WithCreate withExistingResourceId(String resourceId); + } + + /** + * The stage of the DefenderForStorageSetting definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithIsEnabled, DefinitionStages.WithOverrideSubscriptionLevelSettings, + DefinitionStages.WithScanResultsEventGridTopicResourceId, + DefinitionStages.WithIsEnabledMalwareScanningIsEnabled, DefinitionStages.WithCapGBPerMonth, + DefinitionStages.WithIsEnabledSensitiveDataDiscoveryIsEnabled { + /** + * Executes the create request. + * + * @return the created resource. + */ + DefenderForStorageSetting create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DefenderForStorageSetting create(Context context); + } + + /** + * The stage of the DefenderForStorageSetting definition allowing to specify isEnabled. + */ + interface WithIsEnabled { + /** + * Specifies the isEnabled property: Indicates whether Defender for Storage is enabled on this storage + * account.. + * + * @param isEnabled Indicates whether Defender for Storage is enabled on this storage account. + * @return the next definition stage. + */ + WithCreate withIsEnabled(Boolean isEnabled); + } + + /** + * The stage of the DefenderForStorageSetting definition allowing to specify overrideSubscriptionLevelSettings. + */ + interface WithOverrideSubscriptionLevelSettings { + /** + * Specifies the overrideSubscriptionLevelSettings property: Indicates whether the settings defined for this + * storage account should override the settings defined for the subscription.. + * + * @param overrideSubscriptionLevelSettings Indicates whether the settings defined for this storage account + * should override the settings defined for the subscription. + * @return the next definition stage. + */ + WithCreate withOverrideSubscriptionLevelSettings(Boolean overrideSubscriptionLevelSettings); + } + + /** + * The stage of the DefenderForStorageSetting definition allowing to specify + * scanResultsEventGridTopicResourceId. + */ + interface WithScanResultsEventGridTopicResourceId { + /** + * Specifies the scanResultsEventGridTopicResourceId property: Optional. Resource id of an Event Grid Topic + * to send scan results to.. + * + * @param scanResultsEventGridTopicResourceId Optional. Resource id of an Event Grid Topic to send scan + * results to. + * @return the next definition stage. + */ + WithCreate withScanResultsEventGridTopicResourceId(String scanResultsEventGridTopicResourceId); + } + + /** + * The stage of the DefenderForStorageSetting definition allowing to specify isEnabledMalwareScanningIsEnabled. + */ + interface WithIsEnabledMalwareScanningIsEnabled { + /** + * Specifies the isEnabledMalwareScanningIsEnabled property: Indicates whether On Upload malware scanning + * should be enabled.. + * + * @param isEnabledMalwareScanningIsEnabled Indicates whether On Upload malware scanning should be enabled. + * @return the next definition stage. + */ + WithCreate withIsEnabledMalwareScanningIsEnabled(Boolean isEnabledMalwareScanningIsEnabled); + } + + /** + * The stage of the DefenderForStorageSetting definition allowing to specify capGBPerMonth. + */ + interface WithCapGBPerMonth { + /** + * Specifies the capGBPerMonth property: Defines the max GB to be scanned per Month. Set to -1 if no capping + * is needed.. + * + * @param capGBPerMonth Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + * @return the next definition stage. + */ + WithCreate withCapGBPerMonth(Integer capGBPerMonth); + } + + /** + * The stage of the DefenderForStorageSetting definition allowing to specify + * isEnabledSensitiveDataDiscoveryIsEnabled. + */ + interface WithIsEnabledSensitiveDataDiscoveryIsEnabled { + /** + * Specifies the isEnabledSensitiveDataDiscoveryIsEnabled property: Indicates whether Sensitive Data + * Discovery should be enabled.. + * + * @param isEnabledSensitiveDataDiscoveryIsEnabled Indicates whether Sensitive Data Discovery should be + * enabled. + * @return the next definition stage. + */ + WithCreate withIsEnabledSensitiveDataDiscoveryIsEnabled(Boolean isEnabledSensitiveDataDiscoveryIsEnabled); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DefenderForStorageSetting refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DefenderForStorageSetting refresh(Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorages.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorages.java new file mode 100644 index 000000000000..4762c3ebfa31 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForStorages.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DefenderForStorages. + */ +public interface DefenderForStorages { + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account along with {@link Response}. + */ + Response getWithResponse(String resourceId, SettingName settingName, Context context); + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param resourceId The identifier of the resource. + * @param settingName Defender for Storage setting name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account. + */ + DefenderForStorageSetting get(String resourceId, SettingName settingName); + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account along with {@link Response}. + */ + DefenderForStorageSetting getById(String id); + + /** + * Gets the Defender for Storage settings for the specified storage account. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Defender for Storage settings for the specified storage account along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DefenderForStorageSetting resource. + * + * @param name resource name. + * @return the first stage of the new DefenderForStorageSetting definition. + */ + DefenderForStorageSetting.DefinitionStages.Blank define(SettingName name); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DenylistCustomAlertRule.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DenylistCustomAlertRule.java index 184d7b23a1f5..85be1995b28f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DenylistCustomAlertRule.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DenylistCustomAlertRule.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** A custom alert rule that checks if a value (depends on the custom alert type) is denied. */ +/** + * A custom alert rule that checks if a value (depends on the custom alert type) is denied. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("DenylistCustomAlertRule") @Fluent @@ -22,13 +24,15 @@ public final class DenylistCustomAlertRule extends ListCustomAlertRule { @JsonProperty(value = "denylistValues", required = true) private List denylistValues; - /** Creates an instance of DenylistCustomAlertRule class. */ + /** + * Creates an instance of DenylistCustomAlertRule class. + */ public DenylistCustomAlertRule() { } /** * Get the denylistValues property: The values to deny. The format of the values depends on the rule type. - * + * * @return the denylistValues value. */ public List denylistValues() { @@ -37,7 +41,7 @@ public List denylistValues() { /** * Set the denylistValues property: The values to deny. The format of the values depends on the rule type. - * + * * @param denylistValues the denylistValues value to set. * @return the DenylistCustomAlertRule object itself. */ @@ -46,7 +50,9 @@ public DenylistCustomAlertRule withDenylistValues(List denylistValues) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DenylistCustomAlertRule withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -55,17 +61,15 @@ public DenylistCustomAlertRule withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (denylistValues() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property denylistValues in model DenylistCustomAlertRule")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property denylistValues in model DenylistCustomAlertRule")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfiguration.java new file mode 100644 index 000000000000..4b148f082fd3 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfiguration.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; + +/** + * An immutable client-side representation of DevOpsConfiguration. + */ +public interface DevOpsConfiguration { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: DevOps Configuration properties. + * + * @return the properties value. + */ + DevOpsConfigurationProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner object. + * + * @return the inner object. + */ + DevOpsConfigurationInner innerModel(); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationListResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationListResponse.java new file mode 100644 index 000000000000..ac060a5d6efb --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationListResponse.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of RP resources which supports pagination. + */ +@Fluent +public final class DevOpsConfigurationListResponse { + /* + * Gets or sets list of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Gets or sets next link to scroll over the results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of DevOpsConfigurationListResponse class. + */ + public DevOpsConfigurationListResponse() { + } + + /** + * Get the value property: Gets or sets list of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets or sets list of resources. + * + * @param value the value value to set. + * @return the DevOpsConfigurationListResponse object itself. + */ + public DevOpsConfigurationListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Gets or sets next link to scroll over the results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Gets or sets next link to scroll over the results. + * + * @param nextLink the nextLink value to set. + * @return the DevOpsConfigurationListResponse object itself. + */ + public DevOpsConfigurationListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationProperties.java new file mode 100644 index 000000000000..137e8311394d --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurationProperties.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * DevOps Configuration properties. + */ +@Fluent +public final class DevOpsConfigurationProperties { + /* + * Gets or sets resource status message. + */ + @JsonProperty(value = "provisioningStatusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningStatusMessage; + + /* + * Gets or sets time when resource was last checked. + */ + @JsonProperty(value = "provisioningStatusUpdateTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime provisioningStatusUpdateTimeUtc; + + /* + * The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + */ + @JsonProperty(value = "provisioningState") + private DevOpsProvisioningState provisioningState; + + /* + * Authorization payload. + */ + @JsonProperty(value = "authorization") + private Authorization authorization; + + /* + * AutoDiscovery states. + */ + @JsonProperty(value = "autoDiscovery") + private AutoDiscovery autoDiscovery; + + /* + * List of top-level inventory to select when AutoDiscovery is disabled. + * This field is ignored when AutoDiscovery is enabled. + */ + @JsonProperty(value = "topLevelInventoryList") + private List topLevelInventoryList; + + /** + * Creates an instance of DevOpsConfigurationProperties class. + */ + public DevOpsConfigurationProperties() { + } + + /** + * Get the provisioningStatusMessage property: Gets or sets resource status message. + * + * @return the provisioningStatusMessage value. + */ + public String provisioningStatusMessage() { + return this.provisioningStatusMessage; + } + + /** + * Get the provisioningStatusUpdateTimeUtc property: Gets or sets time when resource was last checked. + * + * @return the provisioningStatusUpdateTimeUtc value. + */ + public OffsetDateTime provisioningStatusUpdateTimeUtc() { + return this.provisioningStatusUpdateTimeUtc; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @return the provisioningState value. + */ + public DevOpsProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + * + * @param provisioningState the provisioningState value to set. + * @return the DevOpsConfigurationProperties object itself. + */ + public DevOpsConfigurationProperties withProvisioningState(DevOpsProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the authorization property: Authorization payload. + * + * @return the authorization value. + */ + public Authorization authorization() { + return this.authorization; + } + + /** + * Set the authorization property: Authorization payload. + * + * @param authorization the authorization value to set. + * @return the DevOpsConfigurationProperties object itself. + */ + public DevOpsConfigurationProperties withAuthorization(Authorization authorization) { + this.authorization = authorization; + return this; + } + + /** + * Get the autoDiscovery property: AutoDiscovery states. + * + * @return the autoDiscovery value. + */ + public AutoDiscovery autoDiscovery() { + return this.autoDiscovery; + } + + /** + * Set the autoDiscovery property: AutoDiscovery states. + * + * @param autoDiscovery the autoDiscovery value to set. + * @return the DevOpsConfigurationProperties object itself. + */ + public DevOpsConfigurationProperties withAutoDiscovery(AutoDiscovery autoDiscovery) { + this.autoDiscovery = autoDiscovery; + return this; + } + + /** + * Get the topLevelInventoryList property: List of top-level inventory to select when AutoDiscovery is disabled. + * This field is ignored when AutoDiscovery is enabled. + * + * @return the topLevelInventoryList value. + */ + public List topLevelInventoryList() { + return this.topLevelInventoryList; + } + + /** + * Set the topLevelInventoryList property: List of top-level inventory to select when AutoDiscovery is disabled. + * This field is ignored when AutoDiscovery is enabled. + * + * @param topLevelInventoryList the topLevelInventoryList value to set. + * @return the DevOpsConfigurationProperties object itself. + */ + public DevOpsConfigurationProperties withTopLevelInventoryList(List topLevelInventoryList) { + this.topLevelInventoryList = topLevelInventoryList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (authorization() != null) { + authorization().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurations.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurations.java new file mode 100644 index 000000000000..b1e34bdf9781 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsConfigurations.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.security.fluent.models.DevOpsConfigurationInner; + +/** + * Resource collection API of DevOpsConfigurations. + */ +public interface DevOpsConfigurations { + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName); + + /** + * List DevOps Configurations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RP resources which supports pagination as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String securityConnectorName, Context context); + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String securityConnectorName, + Context context); + + /** + * Gets a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DevOps Configuration. + */ + DevOpsConfiguration get(String resourceGroupName, String securityConnectorName); + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + DevOpsConfiguration createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration); + + /** + * Creates or updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + DevOpsConfiguration createOrUpdate(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context); + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + DevOpsConfiguration update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration); + + /** + * Updates a DevOps Configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param devOpsConfiguration The DevOps configuration resource payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devOps Configuration resource. + */ + DevOpsConfiguration update(String resourceGroupName, String securityConnectorName, + DevOpsConfigurationInner devOpsConfiguration, Context context); + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String securityConnectorName); + + /** + * Deletes a DevOps Connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String securityConnectorName, Context context); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsOperationResults.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsOperationResults.java new file mode 100644 index 000000000000..da45533089d9 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsOperationResults.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DevOpsOperationResults. + */ +public interface DevOpsOperationResults { + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String securityConnectorName, + String operationResultId, Context context); + + /** + * Get devops long running operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param securityConnectorName The security connector name. + * @param operationResultId The operation result Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return devops long running operation result. + */ + OperationStatusResult get(String resourceGroupName, String securityConnectorName, String operationResultId); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsProvisioningState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsProvisioningState.java new file mode 100644 index 000000000000..cf6fecd3e609 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevOpsProvisioningState.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The provisioning state of the resource. + * + * Pending - Provisioning pending. + * Failed - Provisioning failed. + * Succeeded - Successful provisioning. + * Canceled - Provisioning canceled. + * PendingDeletion - Deletion pending. + * DeletionSuccess - Deletion successful. + * DeletionFailure - Deletion failure. + */ +public final class DevOpsProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for DevOpsProvisioningState. + */ + public static final DevOpsProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for DevOpsProvisioningState. + */ + public static final DevOpsProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for DevOpsProvisioningState. + */ + public static final DevOpsProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Pending for DevOpsProvisioningState. + */ + public static final DevOpsProvisioningState PENDING = fromString("Pending"); + + /** + * Static value PendingDeletion for DevOpsProvisioningState. + */ + public static final DevOpsProvisioningState PENDING_DELETION = fromString("PendingDeletion"); + + /** + * Static value DeletionSuccess for DevOpsProvisioningState. + */ + public static final DevOpsProvisioningState DELETION_SUCCESS = fromString("DeletionSuccess"); + + /** + * Static value DeletionFailure for DevOpsProvisioningState. + */ + public static final DevOpsProvisioningState DELETION_FAILURE = fromString("DeletionFailure"); + + /** + * Creates a new instance of DevOpsProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DevOpsProvisioningState() { + } + + /** + * Creates or finds a DevOpsProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DevOpsProvisioningState. + */ + @JsonCreator + public static DevOpsProvisioningState fromString(String name) { + return fromString(name, DevOpsProvisioningState.class); + } + + /** + * Gets known DevOpsProvisioningState values. + * + * @return known DevOpsProvisioningState values. + */ + public static Collection values() { + return values(DevOpsProvisioningState.class); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroup.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroup.java index 8cf36f7d77a0..246f68a1ad58 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroup.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroup.java @@ -8,228 +8,265 @@ import com.azure.resourcemanager.security.fluent.models.DeviceSecurityGroupInner; import java.util.List; -/** An immutable client-side representation of DeviceSecurityGroup. */ +/** + * An immutable client-side representation of DeviceSecurityGroup. + */ public interface DeviceSecurityGroup { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the thresholdRules property: The list of custom alert threshold rules. - * + * * @return the thresholdRules value. */ List thresholdRules(); /** * Gets the timeWindowRules property: The list of custom alert time-window rules. - * + * * @return the timeWindowRules value. */ List timeWindowRules(); /** * Gets the allowlistRules property: The allow-list custom alert rules. - * + * * @return the allowlistRules value. */ List allowlistRules(); /** * Gets the denylistRules property: The deny-list custom alert rules. - * + * * @return the denylistRules value. */ List denylistRules(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.DeviceSecurityGroupInner object. - * + * * @return the inner object. */ DeviceSecurityGroupInner innerModel(); - /** The entirety of the DeviceSecurityGroup definition. */ + /** + * The entirety of the DeviceSecurityGroup definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate { } - /** The DeviceSecurityGroup definition stages. */ + + /** + * The DeviceSecurityGroup definition stages. + */ interface DefinitionStages { - /** The first stage of the DeviceSecurityGroup definition. */ + /** + * The first stage of the DeviceSecurityGroup definition. + */ interface Blank extends WithScope { } - /** The stage of the DeviceSecurityGroup definition allowing to specify parent resource. */ + + /** + * The stage of the DeviceSecurityGroup definition allowing to specify parent resource. + */ interface WithScope { /** * Specifies resourceId. - * + * * @param resourceId The identifier of the resource. * @return the next definition stage. */ WithCreate withExistingResourceId(String resourceId); } + /** * The stage of the DeviceSecurityGroup definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithThresholdRules, - DefinitionStages.WithTimeWindowRules, - DefinitionStages.WithAllowlistRules, - DefinitionStages.WithDenylistRules { + interface WithCreate extends DefinitionStages.WithThresholdRules, DefinitionStages.WithTimeWindowRules, + DefinitionStages.WithAllowlistRules, DefinitionStages.WithDenylistRules { /** * Executes the create request. - * + * * @return the created resource. */ DeviceSecurityGroup create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ DeviceSecurityGroup create(Context context); } - /** The stage of the DeviceSecurityGroup definition allowing to specify thresholdRules. */ + + /** + * The stage of the DeviceSecurityGroup definition allowing to specify thresholdRules. + */ interface WithThresholdRules { /** * Specifies the thresholdRules property: The list of custom alert threshold rules.. - * + * * @param thresholdRules The list of custom alert threshold rules. * @return the next definition stage. */ WithCreate withThresholdRules(List thresholdRules); } - /** The stage of the DeviceSecurityGroup definition allowing to specify timeWindowRules. */ + + /** + * The stage of the DeviceSecurityGroup definition allowing to specify timeWindowRules. + */ interface WithTimeWindowRules { /** * Specifies the timeWindowRules property: The list of custom alert time-window rules.. - * + * * @param timeWindowRules The list of custom alert time-window rules. * @return the next definition stage. */ WithCreate withTimeWindowRules(List timeWindowRules); } - /** The stage of the DeviceSecurityGroup definition allowing to specify allowlistRules. */ + + /** + * The stage of the DeviceSecurityGroup definition allowing to specify allowlistRules. + */ interface WithAllowlistRules { /** * Specifies the allowlistRules property: The allow-list custom alert rules.. - * + * * @param allowlistRules The allow-list custom alert rules. * @return the next definition stage. */ WithCreate withAllowlistRules(List allowlistRules); } - /** The stage of the DeviceSecurityGroup definition allowing to specify denylistRules. */ + + /** + * The stage of the DeviceSecurityGroup definition allowing to specify denylistRules. + */ interface WithDenylistRules { /** * Specifies the denylistRules property: The deny-list custom alert rules.. - * + * * @param denylistRules The deny-list custom alert rules. * @return the next definition stage. */ WithCreate withDenylistRules(List denylistRules); } } + /** * Begins update for the DeviceSecurityGroup resource. - * + * * @return the stage of resource update. */ DeviceSecurityGroup.Update update(); - /** The template for DeviceSecurityGroup update. */ - interface Update - extends UpdateStages.WithThresholdRules, - UpdateStages.WithTimeWindowRules, - UpdateStages.WithAllowlistRules, - UpdateStages.WithDenylistRules { + /** + * The template for DeviceSecurityGroup update. + */ + interface Update extends UpdateStages.WithThresholdRules, UpdateStages.WithTimeWindowRules, + UpdateStages.WithAllowlistRules, UpdateStages.WithDenylistRules { /** * Executes the update request. - * + * * @return the updated resource. */ DeviceSecurityGroup apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ DeviceSecurityGroup apply(Context context); } - /** The DeviceSecurityGroup update stages. */ + + /** + * The DeviceSecurityGroup update stages. + */ interface UpdateStages { - /** The stage of the DeviceSecurityGroup update allowing to specify thresholdRules. */ + /** + * The stage of the DeviceSecurityGroup update allowing to specify thresholdRules. + */ interface WithThresholdRules { /** * Specifies the thresholdRules property: The list of custom alert threshold rules.. - * + * * @param thresholdRules The list of custom alert threshold rules. * @return the next definition stage. */ Update withThresholdRules(List thresholdRules); } - /** The stage of the DeviceSecurityGroup update allowing to specify timeWindowRules. */ + + /** + * The stage of the DeviceSecurityGroup update allowing to specify timeWindowRules. + */ interface WithTimeWindowRules { /** * Specifies the timeWindowRules property: The list of custom alert time-window rules.. - * + * * @param timeWindowRules The list of custom alert time-window rules. * @return the next definition stage. */ Update withTimeWindowRules(List timeWindowRules); } - /** The stage of the DeviceSecurityGroup update allowing to specify allowlistRules. */ + + /** + * The stage of the DeviceSecurityGroup update allowing to specify allowlistRules. + */ interface WithAllowlistRules { /** * Specifies the allowlistRules property: The allow-list custom alert rules.. - * + * * @param allowlistRules The allow-list custom alert rules. * @return the next definition stage. */ Update withAllowlistRules(List allowlistRules); } - /** The stage of the DeviceSecurityGroup update allowing to specify denylistRules. */ + + /** + * The stage of the DeviceSecurityGroup update allowing to specify denylistRules. + */ interface WithDenylistRules { /** * Specifies the denylistRules property: The deny-list custom alert rules.. - * + * * @param denylistRules The deny-list custom alert rules. * @return the next definition stage. */ Update withDenylistRules(List denylistRules); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ DeviceSecurityGroup refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroupList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroupList.java index 037c1991ff6e..fcb9cf9fd1b2 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroupList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroupList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of device security groups. */ +/** + * List of device security groups. + */ @Fluent public final class DeviceSecurityGroupList { /* @@ -24,13 +26,15 @@ public final class DeviceSecurityGroupList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DeviceSecurityGroupList class. */ + /** + * Creates an instance of DeviceSecurityGroupList class. + */ public DeviceSecurityGroupList() { } /** * Get the value property: List of device security group objects. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of device security group objects. - * + * * @param value the value value to set. * @return the DeviceSecurityGroupList object itself. */ @@ -50,7 +54,7 @@ public DeviceSecurityGroupList withValue(List value) { /** * Get the nextLink property: The URI to fetch the next page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroups.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroups.java index 83cc69b063b7..79f7aa53697d 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroups.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceSecurityGroups.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of DeviceSecurityGroups. */ +/** + * Resource collection API of DeviceSecurityGroups. + */ public interface DeviceSecurityGroups { /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -23,7 +25,7 @@ public interface DeviceSecurityGroups { /** * Use this method get the list of device security groups for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,10 +37,10 @@ public interface DeviceSecurityGroups { /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -49,10 +51,10 @@ public interface DeviceSecurityGroups { /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -62,25 +64,25 @@ public interface DeviceSecurityGroups { /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse( - String resourceId, String deviceSecurityGroupName, Context context); + Response deleteByResourceGroupWithResponse(String resourceId, String deviceSecurityGroupName, + Context context); /** * User this method to deletes the device security group. - * + * * @param resourceId The identifier of the resource. * @param deviceSecurityGroupName The name of the device security group. Note that the name of the device security - * group is case insensitive. + * group is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -89,7 +91,7 @@ Response deleteByResourceGroupWithResponse( /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -100,7 +102,7 @@ Response deleteByResourceGroupWithResponse( /** * Use this method to get the device security group for the specified IoT Hub resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -112,7 +114,7 @@ Response deleteByResourceGroupWithResponse( /** * User this method to deletes the device security group. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,7 +124,7 @@ Response deleteByResourceGroupWithResponse( /** * User this method to deletes the device security group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response deleteByResourceGroupWithResponse( /** * Begins definition for a new DeviceSecurityGroup resource. - * + * * @param name resource name. * @return the first stage of the new DeviceSecurityGroup definition. */ diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DirectMethodInvokesNotInAllowedRange.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DirectMethodInvokesNotInAllowedRange.java index 2a932e08c998..c58b67522e47 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DirectMethodInvokesNotInAllowedRange.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DirectMethodInvokesNotInAllowedRange.java @@ -9,37 +9,49 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Number of direct method invokes is not in allowed range. */ +/** + * Number of direct method invokes is not in allowed range. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("DirectMethodInvokesNotInAllowedRange") @Fluent public final class DirectMethodInvokesNotInAllowedRange extends TimeWindowCustomAlertRule { - /** Creates an instance of DirectMethodInvokesNotInAllowedRange class. */ + /** + * Creates an instance of DirectMethodInvokesNotInAllowedRange class. + */ public DirectMethodInvokesNotInAllowedRange() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DirectMethodInvokesNotInAllowedRange withTimeWindowSize(Duration timeWindowSize) { super.withTimeWindowSize(timeWindowSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DirectMethodInvokesNotInAllowedRange withMinThreshold(int minThreshold) { super.withMinThreshold(minThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DirectMethodInvokesNotInAllowedRange withMaxThreshold(int maxThreshold) { super.withMaxThreshold(maxThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DirectMethodInvokesNotInAllowedRange withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -48,7 +60,7 @@ public DirectMethodInvokesNotInAllowedRange withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Direction.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Direction.java index 9042afdbef2e..fa058da533db 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Direction.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Direction.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The rule's direction. */ +/** + * The rule's direction. + */ public final class Direction extends ExpandableStringEnum { - /** Static value Inbound for Direction. */ + /** + * Static value Inbound for Direction. + */ public static final Direction INBOUND = fromString("Inbound"); - /** Static value Outbound for Direction. */ + /** + * Static value Outbound for Direction. + */ public static final Direction OUTBOUND = fromString("Outbound"); /** * Creates a new instance of Direction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Direction() { /** * Creates or finds a Direction from its string representation. - * + * * @param name a name to look for. * @return the corresponding Direction. */ @@ -38,7 +44,7 @@ public static Direction fromString(String name) { /** * Gets known Direction values. - * + * * @return known Direction values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolution.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolution.java index ffb98c4d786d..88a44bda8f14 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolution.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolution.java @@ -6,67 +6,69 @@ import com.azure.resourcemanager.security.fluent.models.DiscoveredSecuritySolutionInner; -/** An immutable client-side representation of DiscoveredSecuritySolution. */ +/** + * An immutable client-side representation of DiscoveredSecuritySolution. + */ public interface DiscoveredSecuritySolution { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: Location where the resource is stored. - * + * * @return the location value. */ String location(); /** * Gets the securityFamily property: The security family of the discovered solution. - * + * * @return the securityFamily value. */ SecurityFamily securityFamily(); /** * Gets the offer property: The security solutions' image offer. - * + * * @return the offer value. */ String offer(); /** * Gets the publisher property: The security solutions' image publisher. - * + * * @return the publisher value. */ String publisher(); /** * Gets the sku property: The security solutions' image sku. - * + * * @return the sku value. */ String sku(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.DiscoveredSecuritySolutionInner object. - * + * * @return the inner object. */ DiscoveredSecuritySolutionInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolutionList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolutionList.java index b20c1a5413ad..bd6bf1354a23 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolutionList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DiscoveredSecuritySolutionList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The DiscoveredSecuritySolutionList model. */ +/** + * The DiscoveredSecuritySolutionList model. + */ @Fluent public final class DiscoveredSecuritySolutionList { /* @@ -24,13 +26,15 @@ public final class DiscoveredSecuritySolutionList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DiscoveredSecuritySolutionList class. */ + /** + * Creates an instance of DiscoveredSecuritySolutionList class. + */ public DiscoveredSecuritySolutionList() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the DiscoveredSecuritySolutionList object itself. */ @@ -50,7 +54,7 @@ public DiscoveredSecuritySolutionList withValue(List list(); /** * Gets a list of discovered Security Solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered Security Solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of discovered Security Solutions for the subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable listByHomeRegion(String ascLocation); /** * Gets a list of discovered Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of discovered Security Solutions for the subscription and location as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable listByHomeRegion(String ascLocation, Context context); /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,16 +75,16 @@ public interface DiscoveredSecuritySolutions { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific discovered Security Solution along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String ascLocation, String discoveredSecuritySolutionName, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + String discoveredSecuritySolutionName, Context context); /** * Gets a specific discovered Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param discoveredSecuritySolutionName Name of a discovered security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EffectiveNetworkSecurityGroups.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EffectiveNetworkSecurityGroups.java index de51e989459e..d9f78c61a349 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EffectiveNetworkSecurityGroups.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EffectiveNetworkSecurityGroups.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the Network Security Groups effective on a network interface. */ +/** + * Describes the Network Security Groups effective on a network interface. + */ @Fluent public final class EffectiveNetworkSecurityGroups { /* @@ -23,13 +25,15 @@ public final class EffectiveNetworkSecurityGroups { @JsonProperty(value = "networkSecurityGroups") private List networkSecurityGroups; - /** Creates an instance of EffectiveNetworkSecurityGroups class. */ + /** + * Creates an instance of EffectiveNetworkSecurityGroups class. + */ public EffectiveNetworkSecurityGroups() { } /** * Get the networkInterface property: The Azure resource ID of the network interface. - * + * * @return the networkInterface value. */ public String networkInterface() { @@ -38,7 +42,7 @@ public String networkInterface() { /** * Set the networkInterface property: The Azure resource ID of the network interface. - * + * * @param networkInterface the networkInterface value to set. * @return the EffectiveNetworkSecurityGroups object itself. */ @@ -49,7 +53,7 @@ public EffectiveNetworkSecurityGroups withNetworkInterface(String networkInterfa /** * Get the networkSecurityGroups property: The Network Security Groups effective on the network interface. - * + * * @return the networkSecurityGroups value. */ public List networkSecurityGroups() { @@ -58,7 +62,7 @@ public List networkSecurityGroups() { /** * Set the networkSecurityGroups property: The Network Security Groups effective on the network interface. - * + * * @param networkSecurityGroups the networkSecurityGroups value to set. * @return the EffectiveNetworkSecurityGroups object itself. */ @@ -69,7 +73,7 @@ public EffectiveNetworkSecurityGroups withNetworkSecurityGroups(List net /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EndOfSupportStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EndOfSupportStatus.java index ffd0f46c7c4f..8d83a3237130 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EndOfSupportStatus.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EndOfSupportStatus.java @@ -8,27 +8,39 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** End of support status. */ +/** + * End of support status. + */ public final class EndOfSupportStatus extends ExpandableStringEnum { - /** Static value None for EndOfSupportStatus. */ + /** + * Static value None for EndOfSupportStatus. + */ public static final EndOfSupportStatus NONE = fromString("None"); - /** Static value noLongerSupported for EndOfSupportStatus. */ + /** + * Static value noLongerSupported for EndOfSupportStatus. + */ public static final EndOfSupportStatus NO_LONGER_SUPPORTED = fromString("noLongerSupported"); - /** Static value versionNoLongerSupported for EndOfSupportStatus. */ + /** + * Static value versionNoLongerSupported for EndOfSupportStatus. + */ public static final EndOfSupportStatus VERSION_NO_LONGER_SUPPORTED = fromString("versionNoLongerSupported"); - /** Static value upcomingNoLongerSupported for EndOfSupportStatus. */ + /** + * Static value upcomingNoLongerSupported for EndOfSupportStatus. + */ public static final EndOfSupportStatus UPCOMING_NO_LONGER_SUPPORTED = fromString("upcomingNoLongerSupported"); - /** Static value upcomingVersionNoLongerSupported for EndOfSupportStatus. */ - public static final EndOfSupportStatus UPCOMING_VERSION_NO_LONGER_SUPPORTED = - fromString("upcomingVersionNoLongerSupported"); + /** + * Static value upcomingVersionNoLongerSupported for EndOfSupportStatus. + */ + public static final EndOfSupportStatus UPCOMING_VERSION_NO_LONGER_SUPPORTED + = fromString("upcomingVersionNoLongerSupported"); /** * Creates a new instance of EndOfSupportStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -37,7 +49,7 @@ public EndOfSupportStatus() { /** * Creates or finds a EndOfSupportStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding EndOfSupportStatus. */ @@ -48,7 +60,7 @@ public static EndOfSupportStatus fromString(String name) { /** * Gets known EndOfSupportStatus values. - * + * * @return known EndOfSupportStatus values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Enforce.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Enforce.java new file mode 100644 index 000000000000..491f1e20353f --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Enforce.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * If set to "False", it allows the descendants of this scope to override the pricing configuration set on this scope + * (allows setting inherited="False"). If set to "True", it prevents overrides and forces this pricing configuration on + * all the descendants of this scope. This field is only available for subscription-level pricing. + */ +public final class Enforce extends ExpandableStringEnum { + /** + * Static value False for Enforce. + */ + public static final Enforce FALSE = fromString("False"); + + /** + * Static value True for Enforce. + */ + public static final Enforce TRUE = fromString("True"); + + /** + * Creates a new instance of Enforce value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Enforce() { + } + + /** + * Creates or finds a Enforce from its string representation. + * + * @param name a name to look for. + * @return the corresponding Enforce. + */ + @JsonCreator + public static Enforce fromString(String name) { + return fromString(name, Enforce.class); + } + + /** + * Gets known Enforce values. + * + * @return known Enforce values. + */ + public static Collection values() { + return values(Enforce.class); + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementMode.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementMode.java index 6235187ef470..85e1cdc5ccc4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementMode.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementMode.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The application control policy enforcement/protection mode of the machine group. */ +/** + * The application control policy enforcement/protection mode of the machine group. + */ public final class EnforcementMode extends ExpandableStringEnum { - /** Static value Audit for EnforcementMode. */ + /** + * Static value Audit for EnforcementMode. + */ public static final EnforcementMode AUDIT = fromString("Audit"); - /** Static value Enforce for EnforcementMode. */ + /** + * Static value Enforce for EnforcementMode. + */ public static final EnforcementMode ENFORCE = fromString("Enforce"); - /** Static value None for EnforcementMode. */ + /** + * Static value None for EnforcementMode. + */ public static final EnforcementMode NONE = fromString("None"); /** * Creates a new instance of EnforcementMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public EnforcementMode() { /** * Creates or finds a EnforcementMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding EnforcementMode. */ @@ -41,7 +49,7 @@ public static EnforcementMode fromString(String name) { /** * Gets known EnforcementMode values. - * + * * @return known EnforcementMode values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementSupport.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementSupport.java index 89f498dd851a..42bd2ade16c9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementSupport.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnforcementSupport.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The machine supportability of Enforce feature. */ +/** + * The machine supportability of Enforce feature. + */ public final class EnforcementSupport extends ExpandableStringEnum { - /** Static value Supported for EnforcementSupport. */ + /** + * Static value Supported for EnforcementSupport. + */ public static final EnforcementSupport SUPPORTED = fromString("Supported"); - /** Static value NotSupported for EnforcementSupport. */ + /** + * Static value NotSupported for EnforcementSupport. + */ public static final EnforcementSupport NOT_SUPPORTED = fromString("NotSupported"); - /** Static value Unknown for EnforcementSupport. */ + /** + * Static value Unknown for EnforcementSupport. + */ public static final EnforcementSupport UNKNOWN = fromString("Unknown"); /** * Creates a new instance of EnforcementSupport value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public EnforcementSupport() { /** * Creates or finds a EnforcementSupport from its string representation. - * + * * @param name a name to look for. * @return the corresponding EnforcementSupport. */ @@ -41,7 +49,7 @@ public static EnforcementSupport fromString(String name) { /** * Gets known EnforcementSupport values. - * + * * @return known EnforcementSupport values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java index 105f62c59a09..02b1a6a87a3b 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The security connector environment data. */ +/** + * The security connector environment data. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -21,17 +23,18 @@ @JsonSubTypes.Type(name = "GcpProject", value = GcpProjectEnvironmentData.class), @JsonSubTypes.Type(name = "GithubScope", value = GithubScopeEnvironmentData.class), @JsonSubTypes.Type(name = "AzureDevOpsScope", value = AzureDevOpsScopeEnvironmentData.class), - @JsonSubTypes.Type(name = "GitlabScope", value = GitlabScopeEnvironmentData.class) -}) + @JsonSubTypes.Type(name = "GitlabScope", value = GitlabScopeEnvironmentData.class) }) @Immutable public class EnvironmentData { - /** Creates an instance of EnvironmentData class. */ + /** + * Creates an instance of EnvironmentData class. + */ public EnvironmentData() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentDetails.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentDetails.java index 4bc4556cbae7..2b66a9a895d5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentDetails.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentDetails.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The environment details of the resource. */ +/** + * The environment details of the resource. + */ @Fluent public final class EnvironmentDetails { /* @@ -42,14 +44,16 @@ public final class EnvironmentDetails { @JsonProperty(value = "tenantId") private String tenantId; - /** Creates an instance of EnvironmentDetails class. */ + /** + * Creates an instance of EnvironmentDetails class. + */ public EnvironmentDetails() { } /** - * Get the nativeResourceId property: The native resource id of the resource (in case of Azure - the resource Id, in - * case of MC - the native resource id). - * + * Get the nativeResourceId property: The native resource id of the resource (in case of Azure - the resource Id, + * in case of MC - the native resource id). + * * @return the nativeResourceId value. */ public String nativeResourceId() { @@ -57,9 +61,9 @@ public String nativeResourceId() { } /** - * Set the nativeResourceId property: The native resource id of the resource (in case of Azure - the resource Id, in - * case of MC - the native resource id). - * + * Set the nativeResourceId property: The native resource id of the resource (in case of Azure - the resource Id, + * in case of MC - the native resource id). + * * @param nativeResourceId the nativeResourceId value to set. * @return the EnvironmentDetails object itself. */ @@ -71,7 +75,7 @@ public EnvironmentDetails withNativeResourceId(String nativeResourceId) { /** * Get the environmentHierarchyId property: The hierarchy id of the connector (in case of Azure - the subscription * Id, in case of MC - the hierarchyId id). - * + * * @return the environmentHierarchyId value. */ public String environmentHierarchyId() { @@ -81,7 +85,7 @@ public String environmentHierarchyId() { /** * Set the environmentHierarchyId property: The hierarchy id of the connector (in case of Azure - the subscription * Id, in case of MC - the hierarchyId id). - * + * * @param environmentHierarchyId the environmentHierarchyId value to set. * @return the EnvironmentDetails object itself. */ @@ -93,7 +97,7 @@ public EnvironmentDetails withEnvironmentHierarchyId(String environmentHierarchy /** * Get the organizationalHierarchyId property: The organizational hierarchy id of the connector (in case of Azure - * the subscription Id, in case of MC - the organizational hierarchyId id). - * + * * @return the organizationalHierarchyId value. */ public String organizationalHierarchyId() { @@ -103,7 +107,7 @@ public String organizationalHierarchyId() { /** * Set the organizationalHierarchyId property: The organizational hierarchy id of the connector (in case of Azure - * the subscription Id, in case of MC - the organizational hierarchyId id). - * + * * @param organizationalHierarchyId the organizationalHierarchyId value to set. * @return the EnvironmentDetails object itself. */ @@ -114,7 +118,7 @@ public EnvironmentDetails withOrganizationalHierarchyId(String organizationalHie /** * Get the subscriptionId property: The subscription Id. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -123,7 +127,7 @@ public String subscriptionId() { /** * Set the subscriptionId property: The subscription Id. - * + * * @param subscriptionId the subscriptionId value to set. * @return the EnvironmentDetails object itself. */ @@ -134,7 +138,7 @@ public EnvironmentDetails withSubscriptionId(String subscriptionId) { /** * Get the tenantId property: The tenant Id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -143,7 +147,7 @@ public String tenantId() { /** * Set the tenantId property: The tenant Id. - * + * * @param tenantId the tenantId value to set. * @return the EnvironmentDetails object itself. */ @@ -154,7 +158,7 @@ public EnvironmentDetails withTenantId(String tenantId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java index c70a011dfa98..406dc205abf5 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of the environment data. */ +/** + * The type of the environment data. + */ public final class EnvironmentType extends ExpandableStringEnum { - /** Static value AwsAccount for EnvironmentType. */ + /** + * Static value AwsAccount for EnvironmentType. + */ public static final EnvironmentType AWS_ACCOUNT = fromString("AwsAccount"); - /** Static value GcpProject for EnvironmentType. */ + /** + * Static value GcpProject for EnvironmentType. + */ public static final EnvironmentType GCP_PROJECT = fromString("GcpProject"); - /** Static value GithubScope for EnvironmentType. */ + /** + * Static value GithubScope for EnvironmentType. + */ public static final EnvironmentType GITHUB_SCOPE = fromString("GithubScope"); - /** Static value AzureDevOpsScope for EnvironmentType. */ + /** + * Static value AzureDevOpsScope for EnvironmentType. + */ public static final EnvironmentType AZURE_DEV_OPS_SCOPE = fromString("AzureDevOpsScope"); - /** Static value GitlabScope for EnvironmentType. */ + /** + * Static value GitlabScope for EnvironmentType. + */ public static final EnvironmentType GITLAB_SCOPE = fromString("GitlabScope"); /** * Creates a new instance of EnvironmentType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public EnvironmentType() { /** * Creates or finds a EnvironmentType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EnvironmentType. */ @@ -47,7 +59,7 @@ public static EnvironmentType fromString(String name) { /** * Gets known EnvironmentType values. - * + * * @return known EnvironmentType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Etag.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Etag.java index 0e0178c4057f..bf6efadba615 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Etag.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Etag.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Entity tag is used for comparing two or more entities from the same requested resource. */ +/** + * Entity tag is used for comparing two or more entities from the same requested resource. + */ @Fluent public class Etag { /* @@ -16,13 +18,15 @@ public class Etag { @JsonProperty(value = "etag") private String etag; - /** Creates an instance of Etag class. */ + /** + * Creates an instance of Etag class. + */ public Etag() { } /** * Get the etag property: Entity tag is used for comparing two or more entities from the same requested resource. - * + * * @return the etag value. */ public String etag() { @@ -31,7 +35,7 @@ public String etag() { /** * Set the etag property: Entity tag is used for comparing two or more entities from the same requested resource. - * + * * @param etag the etag value to set. * @return the Etag object itself. */ @@ -42,7 +46,7 @@ public Etag withEtag(String etag) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EventSource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EventSource.java index 39678faa9907..ac6777138c5e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EventSource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EventSource.java @@ -8,45 +8,79 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** A valid event source type. */ +/** + * A valid event source type. + */ public final class EventSource extends ExpandableStringEnum { - /** Static value Assessments for EventSource. */ + /** + * Static value Assessments for EventSource. + */ public static final EventSource ASSESSMENTS = fromString("Assessments"); - /** Static value AssessmentsSnapshot for EventSource. */ + /** + * Static value AssessmentsSnapshot for EventSource. + */ public static final EventSource ASSESSMENTS_SNAPSHOT = fromString("AssessmentsSnapshot"); - /** Static value SubAssessments for EventSource. */ + /** + * Static value SubAssessments for EventSource. + */ public static final EventSource SUB_ASSESSMENTS = fromString("SubAssessments"); - /** Static value SubAssessmentsSnapshot for EventSource. */ + /** + * Static value SubAssessmentsSnapshot for EventSource. + */ public static final EventSource SUB_ASSESSMENTS_SNAPSHOT = fromString("SubAssessmentsSnapshot"); - /** Static value Alerts for EventSource. */ + /** + * Static value Alerts for EventSource. + */ public static final EventSource ALERTS = fromString("Alerts"); - /** Static value SecureScores for EventSource. */ + /** + * Static value SecureScores for EventSource. + */ public static final EventSource SECURE_SCORES = fromString("SecureScores"); - /** Static value SecureScoresSnapshot for EventSource. */ + /** + * Static value SecureScoresSnapshot for EventSource. + */ public static final EventSource SECURE_SCORES_SNAPSHOT = fromString("SecureScoresSnapshot"); - /** Static value SecureScoreControls for EventSource. */ + /** + * Static value SecureScoreControls for EventSource. + */ public static final EventSource SECURE_SCORE_CONTROLS = fromString("SecureScoreControls"); - /** Static value SecureScoreControlsSnapshot for EventSource. */ + /** + * Static value SecureScoreControlsSnapshot for EventSource. + */ public static final EventSource SECURE_SCORE_CONTROLS_SNAPSHOT = fromString("SecureScoreControlsSnapshot"); - /** Static value RegulatoryComplianceAssessment for EventSource. */ + /** + * Static value RegulatoryComplianceAssessment for EventSource. + */ public static final EventSource REGULATORY_COMPLIANCE_ASSESSMENT = fromString("RegulatoryComplianceAssessment"); - /** Static value RegulatoryComplianceAssessmentSnapshot for EventSource. */ - public static final EventSource REGULATORY_COMPLIANCE_ASSESSMENT_SNAPSHOT = - fromString("RegulatoryComplianceAssessmentSnapshot"); + /** + * Static value RegulatoryComplianceAssessmentSnapshot for EventSource. + */ + public static final EventSource REGULATORY_COMPLIANCE_ASSESSMENT_SNAPSHOT + = fromString("RegulatoryComplianceAssessmentSnapshot"); + + /** + * Static value AttackPaths for EventSource. + */ + public static final EventSource ATTACK_PATHS = fromString("AttackPaths"); + + /** + * Static value AttackPathsSnapshot for EventSource. + */ + public static final EventSource ATTACK_PATHS_SNAPSHOT = fromString("AttackPathsSnapshot"); /** * Creates a new instance of EventSource value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -55,7 +89,7 @@ public EventSource() { /** * Creates or finds a EventSource from its string representation. - * + * * @param name a name to look for. * @return the corresponding EventSource. */ @@ -66,7 +100,7 @@ public static EventSource fromString(String name) { /** * Gets known EventSource values. - * + * * @return known EventSource values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExecuteGovernanceRuleParams.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExecuteGovernanceRuleParams.java index 985f61f94758..3d62749f52d4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExecuteGovernanceRuleParams.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExecuteGovernanceRuleParams.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Governance rule execution parameters. */ +/** + * Governance rule execution parameters. + */ @Fluent public final class ExecuteGovernanceRuleParams { /* @@ -16,13 +18,15 @@ public final class ExecuteGovernanceRuleParams { @JsonProperty(value = "override") private Boolean override; - /** Creates an instance of ExecuteGovernanceRuleParams class. */ + /** + * Creates an instance of ExecuteGovernanceRuleParams class. + */ public ExecuteGovernanceRuleParams() { } /** * Get the override property: Describe if governance rule should be override. - * + * * @return the override value. */ public Boolean override() { @@ -31,7 +35,7 @@ public Boolean override() { /** * Set the override property: Describe if governance rule should be override. - * + * * @param override the override value to set. * @return the ExecuteGovernanceRuleParams object itself. */ @@ -42,7 +46,7 @@ public ExecuteGovernanceRuleParams withOverride(Boolean override) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandControlsEnum.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandControlsEnum.java index 05be0c5ea44f..346c4c40f240 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandControlsEnum.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandControlsEnum.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ExpandControlsEnum. */ +/** + * Defines values for ExpandControlsEnum. + */ public final class ExpandControlsEnum extends ExpandableStringEnum { - /** Static value definition for ExpandControlsEnum. */ + /** + * Static value definition for ExpandControlsEnum. + */ public static final ExpandControlsEnum DEFINITION = fromString("definition"); /** * Creates a new instance of ExpandControlsEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ExpandControlsEnum() { /** * Creates or finds a ExpandControlsEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExpandControlsEnum. */ @@ -35,7 +39,7 @@ public static ExpandControlsEnum fromString(String name) { /** * Gets known ExpandControlsEnum values. - * + * * @return known ExpandControlsEnum values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandEnum.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandEnum.java index 2a5584e0fb55..e47ff3a294e6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandEnum.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExpandEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ExpandEnum. */ +/** + * Defines values for ExpandEnum. + */ public final class ExpandEnum extends ExpandableStringEnum { - /** Static value links for ExpandEnum. */ + /** + * Static value links for ExpandEnum. + */ public static final ExpandEnum LINKS = fromString("links"); - /** Static value metadata for ExpandEnum. */ + /** + * Static value metadata for ExpandEnum. + */ public static final ExpandEnum METADATA = fromString("metadata"); /** * Creates a new instance of ExpandEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ExpandEnum() { /** * Creates or finds a ExpandEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExpandEnum. */ @@ -38,7 +44,7 @@ public static ExpandEnum fromString(String name) { /** * Gets known ExpandEnum values. - * + * * @return known ExpandEnum values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExportData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExportData.java index d24f2e1271f8..b44944af9bef 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExportData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExportData.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ExportData. */ +/** + * Defines values for ExportData. + */ public final class ExportData extends ExpandableStringEnum { - /** Static value RawEvents for ExportData. */ + /** + * Static value RawEvents for ExportData. + */ public static final ExportData RAW_EVENTS = fromString("RawEvents"); /** * Creates a new instance of ExportData value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ExportData() { /** * Creates or finds a ExportData from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExportData. */ @@ -35,7 +39,7 @@ public static ExportData fromString(String name) { /** * Gets known ExportData values. - * + * * @return known ExportData values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Extension.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Extension.java index 08661bf27476..0e35dfc2e31c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Extension.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Extension.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** A plan's extension properties. */ +/** + * A plan's extension properties. + */ @Fluent public final class Extension { /* @@ -48,9 +50,11 @@ public final class Extension { * Optional. A status describing the success/failure of the extension's enablement/disablement operation. */ @JsonProperty(value = "operationStatus", access = JsonProperty.Access.WRITE_ONLY) - private OperationStatus operationStatus; + private OperationStatusAutoGenerated operationStatus; - /** Creates an instance of Extension class. */ + /** + * Creates an instance of Extension class. + */ public Extension() { } @@ -58,16 +62,18 @@ public Extension() { * Get the name property: The extension name. Supported values are: * <br><br>**AgentlessDiscoveryForKubernetes** - API-based discovery of information about Kubernetes * cluster architecture, workload objects, and setup. Required for Kubernetes inventory, identity and network - * exposure detection, attack path analysis and risk hunting as part of the cloud security explorer. Available for - * CloudPosture plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be scanned per month for - * each storage account within the subscription. Once this limit reached on a given storage account, Blobs won't be - * scanned during current calendar month. Available for StorageAccounts - * plan.<br><br>**SensitiveDataDiscovery** - Sensitive data discovery identifies Blob storage container - * with sensitive data such as credentials, credit cards, and more, to help prioritize and investigate security - * events. Available for StorageAccounts and CloudPosture - * plans.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability management for - * images stored in your container registries. Available for CloudPosture and Containers plans. - * + * exposure detection, attack path analysis and risk hunting as part of the cloud security explorer. + * Available for CloudPosture plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be scanned + * per month for each storage account within the subscription. Once this limit reached on a given storage account, + * Blobs won't be scanned during current calendar month. + * Available for StorageAccounts plan.<br><br>**SensitiveDataDiscovery** - Sensitive data discovery + * identifies Blob storage container with sensitive data such as credentials, credit cards, and more, to help + * prioritize and investigate security events. + * Available for StorageAccounts and CloudPosture + * plans.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability management + * for images stored in your container registries. + * Available for CloudPosture and Containers plans. + * * @return the name value. */ public String name() { @@ -78,16 +84,18 @@ public String name() { * Set the name property: The extension name. Supported values are: * <br><br>**AgentlessDiscoveryForKubernetes** - API-based discovery of information about Kubernetes * cluster architecture, workload objects, and setup. Required for Kubernetes inventory, identity and network - * exposure detection, attack path analysis and risk hunting as part of the cloud security explorer. Available for - * CloudPosture plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be scanned per month for - * each storage account within the subscription. Once this limit reached on a given storage account, Blobs won't be - * scanned during current calendar month. Available for StorageAccounts - * plan.<br><br>**SensitiveDataDiscovery** - Sensitive data discovery identifies Blob storage container - * with sensitive data such as credentials, credit cards, and more, to help prioritize and investigate security - * events. Available for StorageAccounts and CloudPosture - * plans.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability management for - * images stored in your container registries. Available for CloudPosture and Containers plans. - * + * exposure detection, attack path analysis and risk hunting as part of the cloud security explorer. + * Available for CloudPosture plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be scanned + * per month for each storage account within the subscription. Once this limit reached on a given storage account, + * Blobs won't be scanned during current calendar month. + * Available for StorageAccounts plan.<br><br>**SensitiveDataDiscovery** - Sensitive data discovery + * identifies Blob storage container with sensitive data such as credentials, credit cards, and more, to help + * prioritize and investigate security events. + * Available for StorageAccounts and CloudPosture + * plans.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability management + * for images stored in your container registries. + * Available for CloudPosture and Containers plans. + * * @param name the name value to set. * @return the Extension object itself. */ @@ -98,7 +106,7 @@ public Extension withName(String name) { /** * Get the isEnabled property: Indicates whether the extension is enabled. - * + * * @return the isEnabled value. */ public IsEnabled isEnabled() { @@ -107,7 +115,7 @@ public IsEnabled isEnabled() { /** * Set the isEnabled property: Indicates whether the extension is enabled. - * + * * @param isEnabled the isEnabled value to set. * @return the Extension object itself. */ @@ -118,7 +126,7 @@ public Extension withIsEnabled(IsEnabled isEnabled) { /** * Get the additionalExtensionProperties property: Property values associated with the extension. - * + * * @return the additionalExtensionProperties value. */ public Map additionalExtensionProperties() { @@ -127,7 +135,7 @@ public Map additionalExtensionProperties() { /** * Set the additionalExtensionProperties property: Property values associated with the extension. - * + * * @param additionalExtensionProperties the additionalExtensionProperties value to set. * @return the Extension object itself. */ @@ -139,16 +147,16 @@ public Extension withAdditionalExtensionProperties(Map additiona /** * Get the operationStatus property: Optional. A status describing the success/failure of the extension's * enablement/disablement operation. - * + * * @return the operationStatus value. */ - public OperationStatus operationStatus() { + public OperationStatusAutoGenerated operationStatus() { return this.operationStatus; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -157,9 +165,8 @@ public void validate() { .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Extension")); } if (isEnabled() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property isEnabled in model Extension")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property isEnabled in model Extension")); } if (operationStatus() != null) { operationStatus().validate(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolution.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolution.java index 59722076e72b..87dfa11c8268 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolution.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolution.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.security.fluent.models.ExternalSecuritySolutionInner; -/** An immutable client-side representation of ExternalSecuritySolution. */ +/** + * An immutable client-side representation of ExternalSecuritySolution. + */ public interface ExternalSecuritySolution { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: Location where the resource is stored. - * + * * @return the location value. */ String location(); /** * Gets the inner com.azure.resourcemanager.security.fluent.models.ExternalSecuritySolutionInner object. - * + * * @return the inner object. */ ExternalSecuritySolutionInner innerModel(); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionKind.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionKind.java index cbbc0b7acb37..974e187fc666 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionKind.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionKind.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The kind of the external solution. */ +/** + * The kind of the external solution. + */ public final class ExternalSecuritySolutionKind extends ExpandableStringEnum { - /** Static value CEF for ExternalSecuritySolutionKind. */ + /** + * Static value CEF for ExternalSecuritySolutionKind. + */ public static final ExternalSecuritySolutionKind CEF = fromString("CEF"); - /** Static value ATA for ExternalSecuritySolutionKind. */ + /** + * Static value ATA for ExternalSecuritySolutionKind. + */ public static final ExternalSecuritySolutionKind ATA = fromString("ATA"); - /** Static value AAD for ExternalSecuritySolutionKind. */ + /** + * Static value AAD for ExternalSecuritySolutionKind. + */ public static final ExternalSecuritySolutionKind AAD = fromString("AAD"); /** * Creates a new instance of ExternalSecuritySolutionKind value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ExternalSecuritySolutionKind() { /** * Creates or finds a ExternalSecuritySolutionKind from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExternalSecuritySolutionKind. */ @@ -41,7 +49,7 @@ public static ExternalSecuritySolutionKind fromString(String name) { /** * Gets known ExternalSecuritySolutionKind values. - * + * * @return known ExternalSecuritySolutionKind values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionList.java index 8afc46f34ad0..0a2ddc31fdc7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionList.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutionList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ExternalSecuritySolutionList model. */ +/** + * The ExternalSecuritySolutionList model. + */ @Fluent public final class ExternalSecuritySolutionList { /* @@ -24,13 +26,15 @@ public final class ExternalSecuritySolutionList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ExternalSecuritySolutionList class. */ + /** + * Creates an instance of ExternalSecuritySolutionList class. + */ public ExternalSecuritySolutionList() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the ExternalSecuritySolutionList object itself. */ @@ -50,7 +54,7 @@ public ExternalSecuritySolutionList withValue(List additionalProperties; + @JsonIgnore + private Map additionalProperties; - /** Creates an instance of ExternalSecuritySolutionProperties class. */ + /** + * Creates an instance of ExternalSecuritySolutionProperties class. + */ public ExternalSecuritySolutionProperties() { } /** * Get the deviceVendor property: The deviceVendor property. - * + * * @return the deviceVendor value. */ public String deviceVendor() { @@ -53,7 +58,7 @@ public String deviceVendor() { /** * Set the deviceVendor property: The deviceVendor property. - * + * * @param deviceVendor the deviceVendor value to set. * @return the ExternalSecuritySolutionProperties object itself. */ @@ -64,7 +69,7 @@ public ExternalSecuritySolutionProperties withDeviceVendor(String deviceVendor) /** * Get the deviceType property: The deviceType property. - * + * * @return the deviceType value. */ public String deviceType() { @@ -73,7 +78,7 @@ public String deviceType() { /** * Set the deviceType property: The deviceType property. - * + * * @param deviceType the deviceType value to set. * @return the ExternalSecuritySolutionProperties object itself. */ @@ -84,7 +89,7 @@ public ExternalSecuritySolutionProperties withDeviceType(String deviceType) { /** * Get the workspace property: Represents an OMS workspace to which the solution is connected. - * + * * @return the workspace value. */ public ConnectedWorkspace workspace() { @@ -93,7 +98,7 @@ public ConnectedWorkspace workspace() { /** * Set the workspace property: Represents an OMS workspace to which the solution is connected. - * + * * @param workspace the workspace value to set. * @return the ExternalSecuritySolutionProperties object itself. */ @@ -104,7 +109,7 @@ public ExternalSecuritySolutionProperties withWorkspace(ConnectedWorkspace works /** * Get the additionalProperties property: The solution properties (correspond to the solution kind). - * + * * @return the additionalProperties value. */ @JsonAnyGetter @@ -114,7 +119,7 @@ public Map additionalProperties() { /** * Set the additionalProperties property: The solution properties (correspond to the solution kind). - * + * * @param additionalProperties the additionalProperties value to set. * @return the ExternalSecuritySolutionProperties object itself. */ @@ -133,7 +138,7 @@ void withAdditionalProperties(String key, Object value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutions.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutions.java index 60dc430b9b7f..5eb50a8611f4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutions.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ExternalSecuritySolutions.java @@ -8,64 +8,66 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ExternalSecuritySolutions. */ +/** + * Resource collection API of ExternalSecuritySolutions. + */ public interface ExternalSecuritySolutions { /** * Gets a list of external security solutions for the subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external security solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of external security solutions for the subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Gets a list of external security solutions for the subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external security solutions for the subscription as paginated response with {@link - * PagedIterable}. + * @return a list of external security solutions for the subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedIterable}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedIterable}. */ PagedIterable listByHomeRegion(String ascLocation); /** * Gets a list of external Security Solutions for the subscription and location. - * + * * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of external Security Solutions for the subscription and location as paginated response with {@link - * PagedIterable}. + * @return a list of external Security Solutions for the subscription and location as paginated response with + * {@link PagedIterable}. */ PagedIterable listByHomeRegion(String ascLocation, Context context); /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,16 +75,16 @@ public interface ExternalSecuritySolutions { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a specific external Security Solution along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String ascLocation, String externalSecuritySolutionsName, Context context); + Response getWithResponse(String resourceGroupName, String ascLocation, + String externalSecuritySolutionsName, Context context); /** * Gets a specific external Security Solution. - * + * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case - * insensitive. + * insensitive. * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from Get - * locations. + * locations. * @param externalSecuritySolutionsName Name of an external security solution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FailedLocalLoginsNotInAllowedRange.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FailedLocalLoginsNotInAllowedRange.java index 47e420007902..9e9243734c01 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FailedLocalLoginsNotInAllowedRange.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FailedLocalLoginsNotInAllowedRange.java @@ -9,37 +9,49 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Number of failed local logins is not in allowed range. */ +/** + * Number of failed local logins is not in allowed range. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("FailedLocalLoginsNotInAllowedRange") @Fluent public final class FailedLocalLoginsNotInAllowedRange extends TimeWindowCustomAlertRule { - /** Creates an instance of FailedLocalLoginsNotInAllowedRange class. */ + /** + * Creates an instance of FailedLocalLoginsNotInAllowedRange class. + */ public FailedLocalLoginsNotInAllowedRange() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FailedLocalLoginsNotInAllowedRange withTimeWindowSize(Duration timeWindowSize) { super.withTimeWindowSize(timeWindowSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FailedLocalLoginsNotInAllowedRange withMinThreshold(int minThreshold) { super.withMinThreshold(minThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FailedLocalLoginsNotInAllowedRange withMaxThreshold(int maxThreshold) { super.withMaxThreshold(maxThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FailedLocalLoginsNotInAllowedRange withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -48,7 +60,7 @@ public FailedLocalLoginsNotInAllowedRange withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileType.java index f6830ab5e804..3873d1fd88c4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileType.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileType.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of the file (for Linux files - Executable is used). */ +/** + * The type of the file (for Linux files - Executable is used). + */ public final class FileType extends ExpandableStringEnum { - /** Static value Exe for FileType. */ + /** + * Static value Exe for FileType. + */ public static final FileType EXE = fromString("Exe"); - /** Static value Dll for FileType. */ + /** + * Static value Dll for FileType. + */ public static final FileType DLL = fromString("Dll"); - /** Static value Msi for FileType. */ + /** + * Static value Msi for FileType. + */ public static final FileType MSI = fromString("Msi"); - /** Static value Script for FileType. */ + /** + * Static value Script for FileType. + */ public static final FileType SCRIPT = fromString("Script"); - /** Static value Executable for FileType. */ + /** + * Static value Executable for FileType. + */ public static final FileType EXECUTABLE = fromString("Executable"); - /** Static value Unknown for FileType. */ + /** + * Static value Unknown for FileType. + */ public static final FileType UNKNOWN = fromString("Unknown"); /** * Creates a new instance of FileType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public FileType() { /** * Creates or finds a FileType from its string representation. - * + * * @param name a name to look for. * @return the corresponding FileType. */ @@ -50,7 +64,7 @@ public static FileType fromString(String name) { /** * Gets known FileType values. - * + * * @return known FileType values. */ public static Collection values() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileUploadsNotInAllowedRange.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileUploadsNotInAllowedRange.java index 69f8cf762e20..df16679e6723 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileUploadsNotInAllowedRange.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/FileUploadsNotInAllowedRange.java @@ -9,37 +9,49 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Number of file uploads is not in allowed range. */ +/** + * Number of file uploads is not in allowed range. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "ruleType") @JsonTypeName("FileUploadsNotInAllowedRange") @Fluent public final class FileUploadsNotInAllowedRange extends TimeWindowCustomAlertRule { - /** Creates an instance of FileUploadsNotInAllowedRange class. */ + /** + * Creates an instance of FileUploadsNotInAllowedRange class. + */ public FileUploadsNotInAllowedRange() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FileUploadsNotInAllowedRange withTimeWindowSize(Duration timeWindowSize) { super.withTimeWindowSize(timeWindowSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FileUploadsNotInAllowedRange withMinThreshold(int minThreshold) { super.withMinThreshold(minThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FileUploadsNotInAllowedRange withMaxThreshold(int maxThreshold) { super.withMaxThreshold(maxThreshold); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FileUploadsNotInAllowedRange withIsEnabled(boolean isEnabled) { super.withIsEnabled(isEnabled); @@ -48,7 +60,7 @@ public FileUploadsNotInAllowedRange withIsEnabled(boolean isEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpCredentialsDetailsProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpCredentialsDetailsProperties.java index ee933d133b16..d49551c2b70e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpCredentialsDetailsProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpCredentialsDetailsProperties.java @@ -11,8 +11,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * GCP cloud account connector based service to service credentials, the credentials are composed of the organization ID - * and a JSON API key (write only). + * GCP cloud account connector based service to service credentials, the credentials are composed of the organization + * ID and a JSON API key (write only). */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authenticationType") @JsonTypeName("gcpCredentials") @@ -84,13 +84,15 @@ public final class GcpCredentialsDetailsProperties extends AuthenticationDetails @JsonProperty(value = "clientX509CertUrl", required = true) private String clientX509CertUrl; - /** Creates an instance of GcpCredentialsDetailsProperties class. */ + /** + * Creates an instance of GcpCredentialsDetailsProperties class. + */ public GcpCredentialsDetailsProperties() { } /** * Get the organizationId property: The organization ID of the GCP cloud account. - * + * * @return the organizationId value. */ public String organizationId() { @@ -99,7 +101,7 @@ public String organizationId() { /** * Set the organizationId property: The organization ID of the GCP cloud account. - * + * * @param organizationId the organizationId value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -110,7 +112,7 @@ public GcpCredentialsDetailsProperties withOrganizationId(String organizationId) /** * Get the type property: Type field of the API key (write only). - * + * * @return the type value. */ public String type() { @@ -119,7 +121,7 @@ public String type() { /** * Set the type property: Type field of the API key (write only). - * + * * @param type the type value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -130,7 +132,7 @@ public GcpCredentialsDetailsProperties withType(String type) { /** * Get the projectId property: Project ID field of the API key (write only). - * + * * @return the projectId value. */ public String projectId() { @@ -139,7 +141,7 @@ public String projectId() { /** * Set the projectId property: Project ID field of the API key (write only). - * + * * @param projectId the projectId value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -150,7 +152,7 @@ public GcpCredentialsDetailsProperties withProjectId(String projectId) { /** * Get the privateKeyId property: Private key ID field of the API key (write only). - * + * * @return the privateKeyId value. */ public String privateKeyId() { @@ -159,7 +161,7 @@ public String privateKeyId() { /** * Set the privateKeyId property: Private key ID field of the API key (write only). - * + * * @param privateKeyId the privateKeyId value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -170,7 +172,7 @@ public GcpCredentialsDetailsProperties withPrivateKeyId(String privateKeyId) { /** * Get the privateKey property: Private key field of the API key (write only). - * + * * @return the privateKey value. */ public String privateKey() { @@ -179,7 +181,7 @@ public String privateKey() { /** * Set the privateKey property: Private key field of the API key (write only). - * + * * @param privateKey the privateKey value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -190,7 +192,7 @@ public GcpCredentialsDetailsProperties withPrivateKey(String privateKey) { /** * Get the clientEmail property: Client email field of the API key (write only). - * + * * @return the clientEmail value. */ public String clientEmail() { @@ -199,7 +201,7 @@ public String clientEmail() { /** * Set the clientEmail property: Client email field of the API key (write only). - * + * * @param clientEmail the clientEmail value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -210,7 +212,7 @@ public GcpCredentialsDetailsProperties withClientEmail(String clientEmail) { /** * Get the clientId property: Client ID field of the API key (write only). - * + * * @return the clientId value. */ public String clientId() { @@ -219,7 +221,7 @@ public String clientId() { /** * Set the clientId property: Client ID field of the API key (write only). - * + * * @param clientId the clientId value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -230,7 +232,7 @@ public GcpCredentialsDetailsProperties withClientId(String clientId) { /** * Get the authUri property: Auth URI field of the API key (write only). - * + * * @return the authUri value. */ public String authUri() { @@ -239,7 +241,7 @@ public String authUri() { /** * Set the authUri property: Auth URI field of the API key (write only). - * + * * @param authUri the authUri value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -250,7 +252,7 @@ public GcpCredentialsDetailsProperties withAuthUri(String authUri) { /** * Get the tokenUri property: Token URI field of the API key (write only). - * + * * @return the tokenUri value. */ public String tokenUri() { @@ -259,7 +261,7 @@ public String tokenUri() { /** * Set the tokenUri property: Token URI field of the API key (write only). - * + * * @param tokenUri the tokenUri value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -270,7 +272,7 @@ public GcpCredentialsDetailsProperties withTokenUri(String tokenUri) { /** * Get the authProviderX509CertUrl property: Auth provider x509 certificate URL field of the API key (write only). - * + * * @return the authProviderX509CertUrl value. */ public String authProviderX509CertUrl() { @@ -279,7 +281,7 @@ public String authProviderX509CertUrl() { /** * Set the authProviderX509CertUrl property: Auth provider x509 certificate URL field of the API key (write only). - * + * * @param authProviderX509CertUrl the authProviderX509CertUrl value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -290,7 +292,7 @@ public GcpCredentialsDetailsProperties withAuthProviderX509CertUrl(String authPr /** * Get the clientX509CertUrl property: Client x509 certificate URL field of the API key (write only). - * + * * @return the clientX509CertUrl value. */ public String clientX509CertUrl() { @@ -299,7 +301,7 @@ public String clientX509CertUrl() { /** * Set the clientX509CertUrl property: Client x509 certificate URL field of the API key (write only). - * + * * @param clientX509CertUrl the clientX509CertUrl value to set. * @return the GcpCredentialsDetailsProperties object itself. */ @@ -310,77 +312,55 @@ public GcpCredentialsDetailsProperties withClientX509CertUrl(String clientX509Ce /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (organizationId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property organizationId in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property organizationId in model GcpCredentialsDetailsProperties")); } if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property type in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property type in model GcpCredentialsDetailsProperties")); } if (projectId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property projectId in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property projectId in model GcpCredentialsDetailsProperties")); } if (privateKeyId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateKeyId in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property privateKeyId in model GcpCredentialsDetailsProperties")); } if (privateKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateKey in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property privateKey in model GcpCredentialsDetailsProperties")); } if (clientEmail() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientEmail in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientEmail in model GcpCredentialsDetailsProperties")); } if (clientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientId in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientId in model GcpCredentialsDetailsProperties")); } if (authUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property authUri in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property authUri in model GcpCredentialsDetailsProperties")); } if (tokenUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tokenUri in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property tokenUri in model GcpCredentialsDetailsProperties")); } if (authProviderX509CertUrl() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property authProviderX509CertUrl in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property authProviderX509CertUrl in model GcpCredentialsDetailsProperties")); } if (clientX509CertUrl() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientX509CertUrl in model GcpCredentialsDetailsProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientX509CertUrl in model GcpCredentialsDetailsProperties")); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalData.java index 4dabcf13f820..43504796b61c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalData.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The gcpOrganization data. */ +/** + * The gcpOrganization data. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("GcpOrganizationalData") @JsonSubTypes({ @JsonSubTypes.Type(name = "Organization", value = GcpOrganizationalDataOrganization.class), - @JsonSubTypes.Type(name = "Member", value = GcpOrganizationalDataMember.class) -}) + @JsonSubTypes.Type(name = "Member", value = GcpOrganizationalDataMember.class) }) @Immutable public class GcpOrganizationalData { - /** Creates an instance of GcpOrganizationalData class. */ + /** + * Creates an instance of GcpOrganizationalData class. + */ public GcpOrganizationalData() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataMember.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataMember.java index 7fda4d5a6317..188ad3f1d076 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataMember.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataMember.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The gcpOrganization data for the member account. */ +/** + * The gcpOrganization data for the member account. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "organizationMembershipType") @JsonTypeName("Member") @Fluent @@ -26,14 +28,16 @@ public final class GcpOrganizationalDataMember extends GcpOrganizationalData { @JsonProperty(value = "managementProjectNumber") private String managementProjectNumber; - /** Creates an instance of GcpOrganizationalDataMember class. */ + /** + * Creates an instance of GcpOrganizationalDataMember class. + */ public GcpOrganizationalDataMember() { } /** * Get the parentHierarchyId property: If the multi cloud account is not of membership type organization, this will * be the ID of the project's parent. - * + * * @return the parentHierarchyId value. */ public String parentHierarchyId() { @@ -43,7 +47,7 @@ public String parentHierarchyId() { /** * Set the parentHierarchyId property: If the multi cloud account is not of membership type organization, this will * be the ID of the project's parent. - * + * * @param parentHierarchyId the parentHierarchyId value to set. * @return the GcpOrganizationalDataMember object itself. */ @@ -54,7 +58,7 @@ public GcpOrganizationalDataMember withParentHierarchyId(String parentHierarchyI /** * Get the managementProjectNumber property: The GCP management project number from organizational onboarding. - * + * * @return the managementProjectNumber value. */ public String managementProjectNumber() { @@ -63,7 +67,7 @@ public String managementProjectNumber() { /** * Set the managementProjectNumber property: The GCP management project number from organizational onboarding. - * + * * @param managementProjectNumber the managementProjectNumber value to set. * @return the GcpOrganizationalDataMember object itself. */ @@ -74,7 +78,7 @@ public GcpOrganizationalDataMember withManagementProjectNumber(String management /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java index fc324cde8326..d573f0c0e127 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** The gcpOrganization data for the parent account. */ +/** + * The gcpOrganization data for the parent account. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "organizationMembershipType") @JsonTypeName("Organization") @Fluent @@ -40,14 +42,16 @@ public final class GcpOrganizationalDataOrganization extends GcpOrganizationalDa @JsonProperty(value = "organizationName", access = JsonProperty.Access.WRITE_ONLY) private String organizationName; - /** Creates an instance of GcpOrganizationalDataOrganization class. */ + /** + * Creates an instance of GcpOrganizationalDataOrganization class. + */ public GcpOrganizationalDataOrganization() { } /** * Get the excludedProjectNumbers property: If the multi cloud account is of membership type organization, list of * accounts excluded from offering. - * + * * @return the excludedProjectNumbers value. */ public List excludedProjectNumbers() { @@ -57,7 +61,7 @@ public List excludedProjectNumbers() { /** * Set the excludedProjectNumbers property: If the multi cloud account is of membership type organization, list of * accounts excluded from offering. - * + * * @param excludedProjectNumbers the excludedProjectNumbers value to set. * @return the GcpOrganizationalDataOrganization object itself. */ @@ -69,7 +73,7 @@ public GcpOrganizationalDataOrganization withExcludedProjectNumbers(List /** * Get the serviceAccountEmailAddress property: The service account email address which represents the organization * level permissions container. - * + * * @return the serviceAccountEmailAddress value. */ public String serviceAccountEmailAddress() { @@ -79,7 +83,7 @@ public String serviceAccountEmailAddress() { /** * Set the serviceAccountEmailAddress property: The service account email address which represents the organization * level permissions container. - * + * * @param serviceAccountEmailAddress the serviceAccountEmailAddress value to set. * @return the GcpOrganizationalDataOrganization object itself. */ @@ -91,7 +95,7 @@ public GcpOrganizationalDataOrganization withServiceAccountEmailAddress(String s /** * Get the workloadIdentityProviderId property: The GCP workload identity provider id which represents the * permissions required to auto provision security connectors. - * + * * @return the workloadIdentityProviderId value. */ public String workloadIdentityProviderId() { @@ -101,7 +105,7 @@ public String workloadIdentityProviderId() { /** * Set the workloadIdentityProviderId property: The GCP workload identity provider id which represents the * permissions required to auto provision security connectors. - * + * * @param workloadIdentityProviderId the workloadIdentityProviderId value to set. * @return the GcpOrganizationalDataOrganization object itself. */ @@ -112,7 +116,7 @@ public GcpOrganizationalDataOrganization withWorkloadIdentityProviderId(String w /** * Get the organizationName property: GCP organization name. - * + * * @return the organizationName value. */ public String organizationName() { @@ -121,7 +125,7 @@ public String organizationName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java index ac6bbd2acf3f..45d89bb89da7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The details about the project represented by the security connector. */ +/** + * The details about the project represented by the security connector. + */ @Fluent public final class GcpProjectDetails { /* @@ -34,13 +36,15 @@ public final class GcpProjectDetails { @JsonProperty(value = "projectName", access = JsonProperty.Access.WRITE_ONLY) private String projectName; - /** Creates an instance of GcpProjectDetails class. */ + /** + * Creates an instance of GcpProjectDetails class. + */ public GcpProjectDetails() { } /** * Get the projectNumber property: The unique GCP Project number. - * + * * @return the projectNumber value. */ public String projectNumber() { @@ -49,7 +53,7 @@ public String projectNumber() { /** * Set the projectNumber property: The unique GCP Project number. - * + * * @param projectNumber the projectNumber value to set. * @return the GcpProjectDetails object itself. */ @@ -60,7 +64,7 @@ public GcpProjectDetails withProjectNumber(String projectNumber) { /** * Get the projectId property: The GCP Project id. - * + * * @return the projectId value. */ public String projectId() { @@ -69,7 +73,7 @@ public String projectId() { /** * Set the projectId property: The GCP Project id. - * + * * @param projectId the projectId value to set. * @return the GcpProjectDetails object itself. */ @@ -80,7 +84,7 @@ public GcpProjectDetails withProjectId(String projectId) { /** * Get the workloadIdentityPoolId property: The GCP workload identity federation pool id. - * + * * @return the workloadIdentityPoolId value. */ public String workloadIdentityPoolId() { @@ -89,7 +93,7 @@ public String workloadIdentityPoolId() { /** * Get the projectName property: GCP project name. - * + * * @return the projectName value. */ public String projectName() { @@ -98,7 +102,7 @@ public String projectName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectEnvironmentData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectEnvironmentData.java index 68697c94c1f4..84cacbffcf5a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectEnvironmentData.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectEnvironmentData.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The GCP project connector environment data. */ +/** + * The GCP project connector environment data. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "environmentType") @JsonTypeName("GcpProject") @Fluent @@ -26,13 +28,21 @@ public final class GcpProjectEnvironmentData extends EnvironmentData { @JsonProperty(value = "projectDetails") private GcpProjectDetails projectDetails; - /** Creates an instance of GcpProjectEnvironmentData class. */ + /* + * Scan interval in hours (value should be between 1-hour to 24-hours) + */ + @JsonProperty(value = "scanInterval") + private Long scanInterval; + + /** + * Creates an instance of GcpProjectEnvironmentData class. + */ public GcpProjectEnvironmentData() { } /** * Get the organizationalData property: The Gcp project's organizational data. - * + * * @return the organizationalData value. */ public GcpOrganizationalData organizationalData() { @@ -41,7 +51,7 @@ public GcpOrganizationalData organizationalData() { /** * Set the organizationalData property: The Gcp project's organizational data. - * + * * @param organizationalData the organizationalData value to set. * @return the GcpProjectEnvironmentData object itself. */ @@ -52,7 +62,7 @@ public GcpProjectEnvironmentData withOrganizationalData(GcpOrganizationalData or /** * Get the projectDetails property: The Gcp project's details. - * + * * @return the projectDetails value. */ public GcpProjectDetails projectDetails() { @@ -61,7 +71,7 @@ public GcpProjectDetails projectDetails() { /** * Set the projectDetails property: The Gcp project's details. - * + * * @param projectDetails the projectDetails value to set. * @return the GcpProjectEnvironmentData object itself. */ @@ -70,9 +80,29 @@ public GcpProjectEnvironmentData withProjectDetails(GcpProjectDetails projectDet return this; } + /** + * Get the scanInterval property: Scan interval in hours (value should be between 1-hour to 24-hours). + * + * @return the scanInterval value. + */ + public Long scanInterval() { + return this.scanInterval; + } + + /** + * Set the scanInterval property: Scan interval in hours (value should be between 1-hour to 24-hours). + * + * @param scanInterval the scanInterval value to set. + * @return the GcpProjectEnvironmentData object itself. + */ + public GcpProjectEnvironmentData withScanInterval(Long scanInterval) { + this.scanInterval = scanInterval; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsListResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsListResponse.java new file mode 100644 index 000000000000..f60c947fad02 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsListResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of GetSensitivitySettingsListResponse. + */ +public interface GetSensitivitySettingsListResponse { + /** + * Gets the value property: The value property. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsListResponseInner object. + * + * @return the inner object. + */ + GetSensitivitySettingsListResponseInner innerModel(); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponse.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponse.java new file mode 100644 index 000000000000..7db855c1ede4 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponse.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner; + +/** + * An immutable client-side representation of GetSensitivitySettingsResponse. + */ +public interface GetSensitivitySettingsResponse { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The sensitivity settings properties. + * + * @return the properties value. + */ + GetSensitivitySettingsResponseProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.security.fluent.models.GetSensitivitySettingsResponseInner object. + * + * @return the inner object. + */ + GetSensitivitySettingsResponseInner innerModel(); +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponseProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponseProperties.java new file mode 100644 index 000000000000..a15a267937fc --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponseProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.UUID; + +/** + * The sensitivity settings properties. + */ +@Fluent +public final class GetSensitivitySettingsResponseProperties { + /* + * List of selected sensitive info types' IDs. + */ + @JsonProperty(value = "sensitiveInfoTypesIds") + private List sensitiveInfoTypesIds; + + /* + * The order of the sensitivity threshold label. Any label at or above this order will be considered sensitive. If + * set to -1, sensitivity by labels is turned off + */ + @JsonProperty(value = "sensitivityThresholdLabelOrder") + private Float sensitivityThresholdLabelOrder; + + /* + * The id of the sensitivity threshold label. Any label at or above this rank will be considered sensitive. + */ + @JsonProperty(value = "sensitivityThresholdLabelId") + private UUID sensitivityThresholdLabelId; + + /* + * Microsoft information protection built-in and custom information types, labels, and integration status. + */ + @JsonProperty(value = "mipInformation") + private GetSensitivitySettingsResponsePropertiesMipInformation mipInformation; + + /** + * Creates an instance of GetSensitivitySettingsResponseProperties class. + */ + public GetSensitivitySettingsResponseProperties() { + } + + /** + * Get the sensitiveInfoTypesIds property: List of selected sensitive info types' IDs. + * + * @return the sensitiveInfoTypesIds value. + */ + public List sensitiveInfoTypesIds() { + return this.sensitiveInfoTypesIds; + } + + /** + * Set the sensitiveInfoTypesIds property: List of selected sensitive info types' IDs. + * + * @param sensitiveInfoTypesIds the sensitiveInfoTypesIds value to set. + * @return the GetSensitivitySettingsResponseProperties object itself. + */ + public GetSensitivitySettingsResponseProperties withSensitiveInfoTypesIds(List sensitiveInfoTypesIds) { + this.sensitiveInfoTypesIds = sensitiveInfoTypesIds; + return this; + } + + /** + * Get the sensitivityThresholdLabelOrder property: The order of the sensitivity threshold label. Any label at or + * above this order will be considered sensitive. If set to -1, sensitivity by labels is turned off. + * + * @return the sensitivityThresholdLabelOrder value. + */ + public Float sensitivityThresholdLabelOrder() { + return this.sensitivityThresholdLabelOrder; + } + + /** + * Set the sensitivityThresholdLabelOrder property: The order of the sensitivity threshold label. Any label at or + * above this order will be considered sensitive. If set to -1, sensitivity by labels is turned off. + * + * @param sensitivityThresholdLabelOrder the sensitivityThresholdLabelOrder value to set. + * @return the GetSensitivitySettingsResponseProperties object itself. + */ + public GetSensitivitySettingsResponseProperties + withSensitivityThresholdLabelOrder(Float sensitivityThresholdLabelOrder) { + this.sensitivityThresholdLabelOrder = sensitivityThresholdLabelOrder; + return this; + } + + /** + * Get the sensitivityThresholdLabelId property: The id of the sensitivity threshold label. Any label at or above + * this rank will be considered sensitive. + * + * @return the sensitivityThresholdLabelId value. + */ + public UUID sensitivityThresholdLabelId() { + return this.sensitivityThresholdLabelId; + } + + /** + * Set the sensitivityThresholdLabelId property: The id of the sensitivity threshold label. Any label at or above + * this rank will be considered sensitive. + * + * @param sensitivityThresholdLabelId the sensitivityThresholdLabelId value to set. + * @return the GetSensitivitySettingsResponseProperties object itself. + */ + public GetSensitivitySettingsResponseProperties withSensitivityThresholdLabelId(UUID sensitivityThresholdLabelId) { + this.sensitivityThresholdLabelId = sensitivityThresholdLabelId; + return this; + } + + /** + * Get the mipInformation property: Microsoft information protection built-in and custom information types, labels, + * and integration status. + * + * @return the mipInformation value. + */ + public GetSensitivitySettingsResponsePropertiesMipInformation mipInformation() { + return this.mipInformation; + } + + /** + * Set the mipInformation property: Microsoft information protection built-in and custom information types, labels, + * and integration status. + * + * @param mipInformation the mipInformation value to set. + * @return the GetSensitivitySettingsResponseProperties object itself. + */ + public GetSensitivitySettingsResponseProperties + withMipInformation(GetSensitivitySettingsResponsePropertiesMipInformation mipInformation) { + this.mipInformation = mipInformation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mipInformation() != null) { + mipInformation().validate(); + } + } +} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponsePropertiesMipInformation.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponsePropertiesMipInformation.java new file mode 100644 index 000000000000..fa0a02f11ba0 --- /dev/null +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GetSensitivitySettingsResponsePropertiesMipInformation.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.security.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Microsoft information protection built-in and custom information types, labels, and integration status. + */ +@Fluent +public final class GetSensitivitySettingsResponsePropertiesMipInformation { + /* + * Microsoft information protection integration status + */ + @JsonProperty(value = "mipIntegrationStatus") + private MipIntegrationStatus mipIntegrationStatus; + + /* + * List of Microsoft information protection sensitivity labels + */ + @JsonProperty(value = "labels") + private List